Bonus with Level

Gameplay Addons
Post Reply
User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 8 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

Bonus with Level

#1

Post by lizoumapper » 2 Weeks Ago

Bonus with Level
Description:
if you have level ex : 5 you will get Armor ...
Version 0.1 [Current Version]
- First Release
Note :
Any Dev you have idea poste in comment :)
You can change level :
  1. #define ITEMS1 5
  2. #define ITEMS2 10
  3. #define ITEMS3 15
  4. #define ITEMS4 20
  5. #define ITEMS5 25
Compile it and Enjoy :)
  1. #include <zombie_escape>
  2. #include <ze_levels>
  3. #include <fun>
  4.  
  5. #define ITEMS1 5
  6. #define ITEMS2 10
  7. #define ITEMS3 15
  8. #define ITEMS4 20
  9. #define ITEMS5 25
  10.  
  11. new Prefix[] = "[^4ZE^1]"
  12.  
  13. new Items[][] =
  14. {
  15.     "+50 Armor",
  16.     "+50 HP",
  17.     "+75 HP",
  18.     "+100 HP",
  19.     "Low Gravity"
  20. }
  21.  
  22. public plugin_init()
  23. {
  24.     register_plugin("[ZE] Bonus With Level", "0.1", "LiZou Mapper")
  25. }
  26.  
  27. public ze_user_humanized(id)
  28. {
  29.     if(ze_get_user_level(id) == ITEMS1)
  30.     {
  31.         set_user_armor(id, get_user_armor(id) +50)
  32.         client_print_color(id, print_chat, "%s You can get [^4%s^1]",Prefix,Items[0])
  33.     }
  34.    
  35.     if(ze_get_user_level(id) == ITEMS2)
  36.     {
  37.         set_user_health(id, get_user_health(id) +50)
  38.         client_print_color(id, print_chat, "%s You can get [^4%s^1]",Prefix,Items[1])
  39.     }
  40.    
  41.     if(ze_get_user_level(id) == ITEMS3)
  42.     {
  43.         set_user_health(id, get_user_health(id) +75)
  44.         client_print_color(id, print_chat, "%s You can get [^4%s^1]",Prefix,Items[2])
  45.     }
  46.  
  47.     if(ze_get_user_level(id) == ITEMS4)
  48.     {
  49.         set_user_health(id, get_user_health(id) +100)
  50.         client_print_color(id, print_chat, "%s You can get [^4%s^1]",Prefix,Items[3])
  51.     }
  52.    
  53.     if(ze_get_user_level(id) == ITEMS5)
  54.     {
  55.         set_user_gravity(id, 0.65)
  56.         client_print_color(id, print_chat, "%s You can get [^4%s^1]",Prefix,Items[4])
  57.     }  
  58.     return 1;
  59. }
I Love Learn Languages Programmations

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest