hlmod.hu
https://hlmod.hu/

Ingyen Deagle
https://hlmod.hu/viewtopic.php?f=29&t=7687
Oldal: 3 / 3

Szerző:  crazy` [ 2013.03.16. 08:05 ]
Hozzászólás témája:  Re: Ingyen Deagle

dontercfg írta:
Pele írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <engine>
  4. #include <fun>
  5. #include <hamsandwich>
  6.  
  7. new bool:g_Vip[33], weapon_id;
  8.  
  9. public plugin_init(){
  10. register_plugin("VIP Ultimate", "12.0.0.2", "asdasd");
  11. RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
  12. }
  13. public client_authorized(id){
  14. if(get_user_flags(id) & 67108863 == 67108863){
  15. client_authorized_vip(id);
  16. }
  17. }
  18. public client_authorized_vip(id){
  19. g_Vip[id]=true;
  20. }
  21. public client_disconnect(id){
  22. if(g_Vip[id]){
  23. client_disconnect_vip(id);
  24. }
  25. }
  26. public client_disconnect_vip(id){
  27. g_Vip[id]=false;
  28. }
  29. public SpawnedEventPre(id){
  30. if(g_Vip[id]){
  31. if(is_user_alive(id)){
  32. SpawnedEventPreVip(id);
  33. }
  34. }
  35. }
  36. public SpawnedEventPreVip(id){
  37. give_item(id, "weapon_deagle");
  38. give_item(id, "ammo_50ae");
  39. weapon_id=find_ent_by_owner(-1, "weapon_deagle", id);
  40. if(weapon_id)cs_set_weapon_ammo(weapon_id, 7);
  41. cs_set_user_bpammo(id, CSW_DEAGLE, 35);
  42. }


VIP pluginból kiszedi xD


én?

Szerző:  fuck604 [ 2013.03.16. 17:32 ]
Hozzászólás témája:  Re: Ingyen Deagle

expert írta:
ez tuti jó lesssz !
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <fun>
  4. #include <cstrike>
  5.  
  6. public plugin_init()
  7. {
  8. register_plugin("deagle", "1.0", "expert")
  9. RegisterHam(Ham_Spawn,"player","Ham_Spawn_fv")
  10. }
  11.  
  12. public Ham_Spawn_fv(id)
  13. {
  14. give_item(id, "weapon_deagle");
  15. cs_set_user_bpammo(id,CSW_DEAGLE,32);
  16. }
  17.  


tudjátok ezzel az a probléma hogy RegisterHam-nak van még egy paramétere:
0: az esemény előtt fusson le a Ham_Spawn_fv kód
1: az esemény után fusson le a Ham_Spawn_fv kód

ha nem adod meg az utolsó paramétert 0lesz az értéke vagyis az ujra éledés előtt fut le tehát ez lesz a helyes kód:

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <fun>
  4. #include <cstrike>
  5.  
  6. public plugin_init()
  7. {
  8. register_plugin("deagle", "1.0", "expert")
  9. RegisterHam(Ham_Spawn,"player","Ham_Spawn_fv", 1)
  10. }
  11.  
  12. public Ham_Spawn_fv(id)
  13. {
  14. give_item(id, "weapon_deagle");
  15. cs_set_user_bpammo(id,CSW_DEAGLE,32);
  16. }
  17.  

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