hlmod.hu
https://hlmod.hu/

fejlövés +300$
https://hlmod.hu/viewtopic.php?f=9&t=7651
Oldal: 1 / 1

Szerző:  bryan112.cfg [2013.03.09. 19:26 ]
Hozzászólás témája:  fejlövés +300$

Sziasztok.

Valaki ebbe a pluginba bele tudná írni ezt a szöveget ha fejest lövök?:
^x04[Server Fejloves] ^x01Gratulálok ^x04+300$ ^nkaptál a fejlövésért!

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. public plugin_init()
  5. {
  6. register_plugin("fejloves+300","1.0","Eg@r4$il{")
  7. register_event("Damage","event_damage","b","2!0"); // damage event
  8. register_cvar("amx_headshotmoney","300")
  9. }
  10.  
  11. public event_damage(id)
  12. {
  13. if(get_user_health(id)>0)return PLUGIN_CONTINUE
  14.  
  15. new weapon,bodypart,attacker = get_user_attacker(id, weapon, bodypart)
  16. if(get_user_health(id)<=0 && bodypart==1 && get_user_team(id)!=get_user_team(attacker))
  17. {
  18. ShowHud(attacker)
  19. fm_set_user_money(attacker,fm_get_user_money(attacker)+get_cvar_num("amx_headshotmoney")>16000?16000:fm_get_user_money(attacker)+get_cvar_num("amx_headshotmoney"))
  20. return PLUGIN_CONTINUE
  21. }
  22. return PLUGIN_CONTINUE
  23. }
  24.  
  25. stock fm_get_user_money(index)
  26. {
  27. return get_pdata_int(index,115)
  28. }
  29.  
  30. stock fm_set_user_money(index, money, flash = 1)
  31. {
  32. set_pdata_int(index, 115, money);
  33.  
  34. message_begin(MSG_ONE, get_user_msgid("Money"), _, index);
  35. write_long(money);
  36. write_byte(flash ? 1 : 0);
  37. message_end();
  38. }
  39.  
  40. public ShowHud(id)
  41. {
  42. set_hudmessage(51, 255, 0,0.87,0.83,1,3.0,3.0,0.1,0.2,2)
  43. show_hudmessage(id, "300$ fejlovesert",get_cvar_num("amx_headshotmoney")>16000?16000:get_cvar_num("amx_headshotmoney"))
  44. return PLUGIN_CONTINUE
  45. }
  46. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  47.   *{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1053 f0 fs16 n par }
  48.   */
  49.  

Szerző:  crazy` [2013.03.09. 22:23 ]
Hozzászólás témája:  Re: fejlövés +300$

tessék:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <colorchat>
  4.  
  5. public plugin_init()
  6. {
  7. register_plugin("fejloves+300","1.0","Eg@r4$il{")
  8. register_event("Damage","event_damage","b","2!0"); // damage event
  9. register_cvar("amx_headshotmoney","300")
  10. }
  11.  
  12. public event_damage(id)
  13. {
  14. if(get_user_health(id)>0)return PLUGIN_CONTINUE
  15.  
  16. new weapon,bodypart,attacker = get_user_attacker(id, weapon, bodypart)
  17. if(get_user_health(id)<=0 && bodypart==1 && get_user_team(id)!=get_user_team(attacker))
  18. {
  19. ColorChat(attacker, GREEN,"[Server Fejloves] ^x01Gratulálok ^x04+300$ ^nkaptál a fejlövésért!",get_cvar_num("amx_headshotmoney")>16000?16000:get_cvar_num("amx_headshotmoney"))
  20. fm_set_user_money(attacker,fm_get_user_money(attacker)+get_cvar_num("amx_headshotmoney")>16000?16000:fm_get_user_money(attacker)+get_cvar_num("amx_headshotmoney"))
  21. return PLUGIN_CONTINUE
  22. }
  23. return PLUGIN_CONTINUE
  24. }
  25.  
  26. stock fm_get_user_money(index)
  27. {
  28. return get_pdata_int(index,115)
  29. }
  30.  
  31. stock fm_set_user_money(index, money, flash = 1)
  32. {
  33. set_pdata_int(index, 115, money);
  34.  
  35. message_begin(MSG_ONE, get_user_msgid("Money"), _, index);
  36. write_long(money);
  37. write_byte(flash ? 1 : 0);
  38. message_end();
  39. }
  40. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  41.   *{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1053 f0 fs16 n par }
  42.   */
  43.  

Szerző:  bryan112.cfg [2013.03.11. 14:12 ]
Hozzászólás témája:  Re: fejlövés +300$

Köszi

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