hlmod.hu
https://hlmod.hu/

Hs nél írás hudba
https://hlmod.hu/viewtopic.php?f=29&t=15803
Oldal: 1 / 1

Szerző:  parodyshelf [2014.05.10. 22:56 ]
Hozzászólás témája:  Hs nél írás hudba

Sziasztok
Valaki csinálni nekem egy olyan plugint,ha valaki ad egy hst random kiir egy szoveget-persze amit en alitok be!h az mi legyen
Ugy kene,h pl ezlegyen %playername% oriasi hst adott %playername%-nek
Elore is koszi

Szerző:  DeR0iD [2014.05.11. 11:49 ]
Hozzászólás témája:  Re: Hs nél írás hudba

teszteltem mukodik!
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "New Plug-In"
  5. #define VERSION "1.0"
  6. #define AUTHOR "author"
  7.  
  8.  
  9. public plugin_init() {
  10. register_plugin(PLUGIN, VERSION, AUTHOR)
  11. register_event("DeathMsg","death","a")
  12. }
  13. public death() {
  14. new killer = read_data(1)
  15. new victim = read_data(2)
  16. new fej = read_data(3)
  17. if(killer == victim)
  18. {
  19. return PLUGIN_HANDLED;
  20. }
  21. if(fej){
  22. new nev_killer[32],nev_victim[32]
  23. get_user_name(killer,nev_killer,charsmax(nev_killer))
  24. get_user_name(victim,nev_victim,charsmax(nev_victim))
  25. set_hudmessage(0, 255, 0, -1.0, 0.31, 0, 6.0, 2.0)
  26. switch(random_num(1,1)){
  27. case 1 : show_hudmessage(0, "%s oriasi hst adott %s-nek",nev_killer,nev_victim)
  28. }
  29. }
  30. return PLUGIN_CONTINUE;
  31. }
  32.  

Kép

Szerző:  parodyshelf [2014.05.11. 12:42 ]
Hozzászólás témája:  Re: Hs nél írás hudba

Deroid koszonom szepen de az a kerdesem hogyan tudok ujat hozzadni?

Szerző:  CrB [2014.05.11. 12:43 ]
Hozzászólás témája:  Re: Hs nél írás hudba

try
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "New Plug-In"
  5. #define VERSION "1.0"
  6. #define AUTHOR "author"
  7.  
  8. new const uzik[][] = {
  9. "%s adott %s -nek egy fejest",
  10. "%s oriasi hst adott %s-nek",
  11. "%s lekapta %s fejet"
  12. }
  13.  
  14. public plugin_init() {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16. register_event("DeathMsg","death","a")
  17. }
  18. public death() {
  19.  
  20. new killer = read_data(1)
  21. new victim = read_data(2)
  22. new fej = read_data(3)
  23.  
  24.  
  25. if(fej && killer != victim)
  26. {
  27. new nev_killer[32],nev_victim[32]
  28. get_user_name(killer,nev_killer,charsmax(nev_killer))
  29. get_user_name(victim,nev_victim,charsmax(nev_victim))
  30. set_hudmessage(0, 255, 0, -1.0, 0.31, 0, 6.0, 2.0)
  31. show_hudmessage(0, "%s",uzik[random(sizeof(uzik))], nev_killer,nev_victim)
  32.  
  33. }
  34. return PLUGIN_CONTINUE;
  35. }

Szerző:  parodyshelf [2014.05.14. 21:48 ]
Hozzászólás témája:  Re: Hs nél írás hudba

Crazyboy nem egészen jo
Ezt irja pl:%s oriasi hst adott %s nek
Es igy irja h %s es helyere a nevet kene irnia :S
Megtudod oldani?

Szerző:  CrB [2014.05.15. 08:07 ]
Hozzászólás témája:  Re: Hs nél írás hudba

próbáld így:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "New Plug-In"
  5. #define VERSION "1.0"
  6. #define AUTHOR "author"
  7.  
  8. #define UZISZAM 3
  9. new const uzik[UZISZAM][] = {
  10. "%s adott %s -nek egy fejest",
  11. "%s oriasi hst adott %s-nek",
  12. "%s lekapta %s fejet"
  13. }
  14.  
  15. public plugin_init() {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17. register_event("DeathMsg","death","a")
  18. }
  19. public death() {
  20.  
  21. new killer = read_data(1)
  22. new victim = read_data(2)
  23. new fej = read_data(3)
  24.  
  25.  
  26. if(fej && killer != victim)
  27. {
  28. new nev_killer[32],nev_victim[32]
  29. get_user_name(killer,nev_killer,charsmax(nev_killer))
  30. get_user_name(victim,nev_victim,charsmax(nev_victim))
  31. set_hudmessage(0, 255, 0, -1.0, 0.31, 0, 6.0, 2.0)
  32. show_hudmessage(0,uzik[ random_num(0,UZISZAM-1) ],nev_killer,nev_victim)
  33.  
  34. }
  35. return PLUGIN_CONTINUE;
  36. }

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