hlmod.hu
https://hlmod.hu/

újraéledés
https://hlmod.hu/viewtopic.php?f=9&t=10230
Oldal: 1 / 1

Szerző:  pixxa112 [ 2013.08.16. 15:51 ]
Hozzászólás témája:  újraéledés

Hali.

Valaki tudna linkelni egy olyan újraéledést, hogy:

Csak hallottak tudjanak újraéledni automatikusan, és bugg esetén egy /ujra parancs is jó lenne :D
És ha elő írja be, hogy /ujra akkor ki írja a chatbe neki ezt: Csak hallottak tudnak újraéledni.

Lehetőleg ne ezt:
http://amxmodx.crys.hu/site/?p=pluginz&c=l&f=125165

Előre is köszi.

Szerző:  crazy` [ 2013.08.16. 16:38 ]
Hozzászólás témája:  Re: újraéledés

tessék parancsolni :D

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3.  
  4. #define PLUGIN "Ujra"
  5. #define VERSION "1.0"
  6. #define AUTHOR "crazy"
  7.  
  8. public plugin_init() {
  9. register_plugin(PLUGIN, VERSION, AUTHOR)
  10. register_event("DeathMsg", "halalevent", "a")
  11. register_clcmd("say /ujra", "ujrael")
  12. register_clcmd("team_say /ujra", "ujrael")
  13. }
  14. public halalevent()
  15. {
  16. new id=read_data(2)
  17. set_task(0.1,"ujrael",id)
  18. }
  19. public ujrael(id)
  20. {
  21. if (!is_user_alive(id))
  22. {
  23. ExecuteHam(Ham_CS_RoundRespawn, id)
  24. }
  25. else
  26. {
  27. client_print(id, print_chat, "Csak halottak tudnak ujraeledni!")
  28. }
  29. }

Szerző:  pixxa112 [ 2013.08.17. 13:50 ]
Hozzászólás témája:  Re: újraéledés

crazy` írta:
tessék parancsolni :D

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3.  
  4. #define PLUGIN "Ujra"
  5. #define VERSION "1.0"
  6. #define AUTHOR "crazy"
  7.  
  8. public plugin_init() {
  9. register_plugin(PLUGIN, VERSION, AUTHOR)
  10. register_event("DeathMsg", "halalevent", "a")
  11. register_clcmd("say /ujra", "ujrael")
  12. register_clcmd("team_say /ujra", "ujrael")
  13. }
  14. public halalevent()
  15. {
  16. new id=read_data(2)
  17. set_task(0.1,"ujrael",id)
  18. }
  19. public ujrael(id)
  20. {
  21. if (!is_user_alive(id))
  22. {
  23. ExecuteHam(Ham_CS_RoundRespawn, id)
  24. }
  25. else
  26. {
  27. client_print(id, print_chat, "Csak halottak tudnak ujraeledni!")
  28. }
  29. }


Köszi :D

Szerző:  pixxa112 [ 2013.08.17. 21:53 ]
Hozzászólás témája:  Re: újraéledés

És azt még bele tudod írni, hogy ha valaki specben akar újraéledni akkor kiírja neki ezt az üzenetet:

Sajnálom, de ez csak akkor használható ha valamelyik csapatban játszol.

Szerző:  crazy` [ 2013.08.17. 22:09 ]
Hozzászólás témája:  Re: újraéledés

bocsi, de csak így sikerült:
teszteld:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <hamsandwich>
  4.  
  5. #define PLUGIN "Ujra"
  6. #define VERSION "1.0"
  7. #define AUTHOR "crazy"
  8.  
  9. public plugin_init() {
  10. register_plugin(PLUGIN, VERSION, AUTHOR)
  11. register_event("DeathMsg", "halalevent", "a")
  12. register_clcmd("say /ujra", "ujrael")
  13. register_clcmd("team_say /ujra", "ujrael")
  14. }
  15. public halalevent()
  16. {
  17. new id=read_data(2)
  18. set_task(0.1,"ujrael",id)
  19. }
  20. public ujrael(id)
  21. {
  22. new halott = !is_user_alive(id)
  23. new CsTeams:userteam = cs_get_user_team(id)
  24. if(userteam == CS_TEAM_SPECTATOR && halott)
  25. {
  26. client_print(id, print_chat, "Elok es spectatorban levok nem hasznalhatjak ezt a paranacsot!")
  27. }
  28. else
  29. {
  30. ExecuteHam(Ham_CS_RoundRespawn,id)
  31. }
  32.  
  33. }

Szerző:  crazy` [ 2013.08.17. 22:09 ]
Hozzászólás témája:  Re: újraéledés

bocsi, de csak így sikerült:
teszteld:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <hamsandwich>
  4.  
  5. #define PLUGIN "Ujra"
  6. #define VERSION "1.0"
  7. #define AUTHOR "crazy"
  8.  
  9. public plugin_init() {
  10. register_plugin(PLUGIN, VERSION, AUTHOR)
  11. register_event("DeathMsg", "halalevent", "a")
  12. register_clcmd("say /ujra", "ujrael")
  13. register_clcmd("team_say /ujra", "ujrael")
  14. }
  15. public halalevent()
  16. {
  17. new id=read_data(2)
  18. set_task(0.1,"ujrael",id)
  19. }
  20. public ujrael(id)
  21. {
  22. new elo = is_user_alive(id)
  23. new CsTeams:userteam = cs_get_user_team(id)
  24. if(userteam == CS_TEAM_SPECTATOR && elo)
  25. {
  26. client_print(id, print_chat, "Elok es spectatorban levok nem hasznalhatjak ezt a paranacsot!")
  27. }
  28. else
  29. {
  30. ExecuteHam(Ham_CS_RoundRespawn,id)
  31. }
  32.  
  33. }

Szerző:  pixxa112 [ 2013.08.17. 22:13 ]
Hozzászólás témája:  Re: újraéledés

Köszi, működik :D

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