Page 1 of 1

Time Presents

Posted: 26 Feb 2017, 00:41
by Night Fury
Hi, everyone. :)

Description:
  • This plugin will give the newly players escape coins like a gift/present when he stays certain amount of time.
    You can edit it as whatever you want.

Edit awards from here:

Code:
    1. #include <zombie_escape>
    2.  
    3. #define SMALL 50
    4. #define AVERAGE 100
    5. #define LARGE 150
    6.  
    7. public plugin_init()
    8. {
    9.     register_plugin("[ZE] Addons: Time Presents", "1.0", "Jack GamePlay")
    10. }
    11.  
    12. public client_putinserver(id)
    13. {
    14.     set_task(300.0, "small_present", id)
    15. }
    16.  
    17. public client_disconnect(id)
    18. {
    19.     if(task_exists(id))
    20.         remove_task(id)
    21. }
    22.  
    23. public small_present(id)
    24. {
    25.     ze_set_escape_coins(id, ze_get_escape_coins(id) + SMALL)
    26.     ze_colored_print(id, "!gYou got!y[!t%d!y] escape coins for playing on this server for !y[!t5!y] !gminutes!y.", AVERAGE)
    27.     set_task(300.0, "average_present", id)
    28. }
    29.  
    30. public average_present(id)
    31. {
    32.     ze_set_escape_coins(id, ze_get_escape_coins(id) + AVERAGE)
    33.     ze_colored_print(id, "!gYou got!y[!t%d!y] escape coins for playing on this server for !y[!t10!y] !gminutes!y.", AVERAGE)
    34.     set_task(600.0, "large_present", id)
    35. }
    36.  
    37. public large_present(id)
    38. {
    39.     ze_set_escape_coins(id, ze_get_escape_coins(id) + LARGE)
    40.     ze_colored_print(id, "!gYou got!y[!t%d!y] escape coins for playing on this server for !y[!t20!y] !gminutes!y.", LARGE)
    41. }

Re: Time Presents

Posted: 26 Feb 2017, 08:18
by Raheem
Nice one :D.

Re: Time Presents

Posted: 23 Jun 2017, 02:35
by Spir0x
Look at this i think ur cod is bugged


[Zombie Escape] You got 100 Nscape Coins, Oor that play on this server for ` minutes.

on my server.

Re: Time Presents

Posted: 23 Jun 2017, 14:06
by johnnysins2000
Spir0x wrote: 6 years ago Look at this i think ur cod is bugged


[Zombie Escape] You got 100 Nscape Coins, Oor that play on this server for ` minutes.

on my server.
It is not bug... it is just message :p

U can edit the sma and Write there whatever u think is correct for this

I think correct will be

You have got %d coins for Playing %s minutes in the server

Re: Time Presents

Posted: 23 Jun 2017, 14:10
by Spir0x
okey :/ i'll try to compile it again

Re: Time Presents

Posted: 23 Jun 2017, 22:28
by Raheem
For some reasons solution is to replace:
  1. ^x04 with !g
  2. ^x03 with !t
  3. ^x01 with !y
And it will show right things. Or another thing to leave space in ^x035 to ^x03 5 or if you do it like ^x035 the compiler think this whole is hexadecimal number ^x035.

03 = 0000 0011
035 = 0000 0011 0101

As you see different things....

Example of what i speak about:
    1. public small_present(id)
    2. {
    3.     ze_set_escape_coins(id, ze_get_escape_coins(id) + SMALL)
    4.     ze_colored_print(id, "^x04You got ^x03%d ^x04Escape Coins^x01, ^x04for that play on this server for ^x035 minutes^x01.", SMALL)
    5. }
TO
    1. public small_present(id)
    2. {
    3.     ze_set_escape_coins(id, ze_get_escape_coins(id) + SMALL)
    4.     ze_colored_print(id, "^x04You got ^x03%d^x04 Escape Coins^x01,^x04 for that play on this server for^x03 5 minutes^x01.", SMALL)
    5. }

Re: Time Presents

Posted: 24 Jun 2017, 06:58
by Night Fury
Thread updated. :D
Fixed the plugin timer.

Re: Time Presents

Posted: 24 Jun 2017, 14:36
by Spir0x
Nice Jack :) now it's very good :D
i'm using this : !gYou got!y[!t%d!y] !gescape coins for playing !y[!t20!y] !gminutes here!y.