hlmod.hu
https://hlmod.hu/

Élet!Raj!
https://hlmod.hu/viewtopic.php?f=9&t=6054
Oldal: 1 / 1

Szerző:  ChaspeR [2012.09.23. 13:53 ]
Hozzászólás témája:  Élet!Raj!

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fun>
  3. #include <zombieplague>
  4.  
  5. new const item_name[] = "Elet"
  6. new g_itemid_buyhp
  7. new hpamount
  8.  
  9. public plugin_init()
  10. {
  11. register_plugin("[ZP] elet vasarlas", "1.0", "T[h]E Dis[as]teR")
  12. hpamount = register_cvar("zp_buyhp_amount", "1000")
  13. g_itemid_buyhp = zp_register_extra_item(item_name, 72, ZP_TEAM_HUMAN & ZP_TEAM_ZOMBIE)
  14. }
  15. public zp_extra_item_selected(id,itemid)
  16. {
  17. if(!is_user_alive(id))
  18.  
  19. return PLUGIN_HANDLED;
  20.  
  21. if(itemid==g_itemid_buyhp)
  22. {
  23. if(zp_get_user_ammo_packs(id) < 5)
  24. {
  25. client_print(id, print_chat,"[ZP] Nincs eleg tolteny csomagod!");
  26. return PLUGIN_HANDLED;
  27. }
  28. else
  29. {
  30. set_user_health(id,get_user_health(id)+get_pcvar_num(hpamount));
  31. zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) - 5);
  32. client_print(id, print_chat,"[ZP] Vettel eletet!");
  33. }
  34. }
  35. return PLUGIN_CONTINUE;
  36. }
  37. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  38. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
  39. */


Meg lehetne oldani , hogy raj módban 2000HP felett ne lehessen több életet venni ?! De a többi módban igen :)

Szerző:  VirTuaL ~` [2012.09.23. 13:55 ]
Hozzászólás témája:  Re: Élet!Raj!

Tehát ha raj mód van,akkor egy személy max 2x vehesse meg?

Szerző:  ChaspeR [2012.09.23. 13:57 ]
Hozzászólás témája:  Re: Élet!Raj!

Igen.

Szerző:  HunGamer [2012.09.23. 14:18 ]
Hozzászólás témája:  Re: Élet!Raj!

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fun>
  3. #include <hamsandwich>
  4. #include <zombieplague>
  5.  
  6. new const item_name[] = "Elet"
  7. new g_itemid_buyhp
  8. new hpamount
  9. new count[33]
  10.  
  11. public plugin_init()
  12. {
  13. register_plugin("[ZP] elet vasarlas", "1.0", "T[h]E Dis[as]teR")
  14. RegisterHam(Ham_Spawn, "player", "Eledes", 1)
  15. hpamount = register_cvar("zp_buyhp_amount", "1000")
  16. g_itemid_buyhp = zp_register_extra_item(item_name, 72, ZP_TEAM_HUMAN & ZP_TEAM_ZOMBIE)
  17. }
  18. public zp_extra_item_selected(id,itemid)
  19. {
  20. if(!is_user_alive(id))
  21. return PLUGIN_HANDLED
  22.  
  23. if(itemid==g_itemid_buyhp)
  24. {
  25. if(zp_get_user_ammo_packs(id) < 5)
  26. {
  27. client_print(id, print_chat,"[ZP] Nincs eleg tolteny csomagod!"
  28. return PLUGIN_HANDLED
  29. }
  30. if(zp_is_swarm_round() && ++count[id] >= 2)
  31. {
  32. client_print(id, print_chat,"[ZP] Raj modban csak 2x hasznalhatod!")
  33. return PLUGIN_HANDLED
  34. }
  35. set_user_health(id,get_user_health(id)+get_pcvar_num(hpamount))
  36. zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) - 5)
  37. client_print(id, print_chat,"[ZP] Vettel eletet!")
  38. }
  39. return PLUGIN_CONTINUE
  40. }
  41. public Eledes(id)
  42. {
  43. count[id] = 0
  44. }
  45.  

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/