hlmod.hu
https://hlmod.hu/

Csak halott lássa
https://hlmod.hu/viewtopic.php?f=10&t=18952
Oldal: 2 / 2

Szerző:  CrB [ 2015.01.14. 20:04 ]
Hozzászólás témája:  Re: Csak halott lássa

Igen ezzel eléred h csak az látja aki meghal ő is csak 5 mp ig
xXlederXxHUN írta:
plugin_init-be:
SMA Forráskód: [ Mindet kijelol ]
  1. register_event("DeathMsg", "death", "a")


valahova a pluginba:
SMA Forráskód: [ Mindet kijelol ]
  1. public death()
  2. {
  3. new aldozat = read_data(2)
  4. if(is_user_connected(aldozat))
  5. {
  6. set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 5.0)
  7. show_hudmessage(aldozat,"Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
  8. }
  9. }


Tessék amit kértél:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define PLUGIN "Frags CT of TE"
  5. #define VERSION "1.0"
  6. #define AUTHOR "pixxa112"
  7.  
  8. new ctfrags = 0
  9. new tfrags = 0
  10.  
  11. public plugin_init() {
  12.  
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_event("DeathMsg", "halal", "a");
  15. register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
  16. register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
  17.  
  18. set_task(5.0, "hud")
  19. }
  20.  
  21. public round_first()
  22.  
  23. ctfrags = 0, tfrags = 0
  24.  
  25. public halal()
  26. {
  27. static killer
  28. killer = read_data(1);
  29. if(get_user_team(killer) == 2)
  30. ctfrags++
  31. if(get_user_team(killer) == 1)
  32. tfrags++
  33.  
  34. return PLUGIN_CONTINUE
  35.  
  36. }
  37.  
  38. public hud()
  39. {
  40.  
  41. new players[32],num
  42. get_players(players, num, "bch")
  43. for(new i = 0; i<=num; i++)
  44. {
  45. new id = players[i]
  46. set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 5.0)
  47. show_hudmessage(id,"Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
  48. }
  49. set_task(5.0, "hud")
  50. }

Szerző:  Fantom [ 2015.01.14. 20:24 ]
Hozzászólás témája:  Re: Csak halott lássa

crazyboy írta:
Igen ezzel eléred h csak az látja aki meghal ő is csak 5 mp ig
xXlederXxHUN írta:
plugin_init-be:
SMA Forráskód: [ Mindet kijelol ]register_event("DeathMsg", "death", "a")

valahova a pluginba:
SMA Forráskód: [ Mindet kijelol ]public death()
{
new aldozat = read_data(2)
if(is_user_connected(aldozat))
{
set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 5.0)
show_hudmessage(aldozat,"Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
}
}


Tessék amit kértél:
SMA Forráskód: [ Mindet kijelol ]#include <amxmodx>
#include <cstrike>
 
#define PLUGIN "Frags CT of TE"
#define VERSION "1.0"
#define AUTHOR "pixxa112"
 
new ctfrags = 0
new tfrags = 0
 
public plugin_init() {
 
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "halal", "a");
register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
 
set_task(5.0, "hud")
}
 
public round_first()
 
ctfrags = 0, tfrags = 0
 
public halal()
{
static killer
killer = read_data(1);
if(get_user_team(killer) == 2)
ctfrags++
if(get_user_team(killer) == 1)
tfrags++
 
return PLUGIN_CONTINUE
 
}
 
public hud()
{
 
new players[32],num
get_players(players, num, "bch")
for(new i = 0; i<=num; i++)
{
new id = players[i]
set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 5.0)
show_hudmessage(id,"Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
}
set_task(5.0, "hud")
}


Most se jó az élő is lássa :(

Szerző:  CrB [ 2015.01.14. 20:29 ]
Hozzászólás témája:  Re: Csak halott lássa

érdekes.. leteszteltem nálam működik

Szerző:  Fantom [ 2015.01.14. 20:37 ]
Hozzászólás témája:  Re: Csak halott lássa

crazyboy írta:
érdekes.. leteszteltem nálam működik


Kép

Szerző:  CrB [ 2015.01.14. 20:47 ]
Hozzászólás témája:  Re: Csak halott lássa

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define PLUGIN "Frags CT of TE"
  5. #define VERSION "1.0"
  6. #define AUTHOR "pixxa112"
  7.  
  8. new ctfrags = 0
  9. new tfrags = 0
  10.  
  11. public plugin_init() {
  12.  
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_event("DeathMsg", "halal", "a");
  15. register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
  16. register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
  17.  
  18. set_task(3.0, "hud", 0,_,_,"b")
  19. }
  20.  
  21. public round_first()
  22. {
  23. ctfrags = 0
  24. tfrags = 0
  25. }
  26.  
  27. public halal()
  28. {
  29. static killer
  30. killer = read_data(1);
  31. if(get_user_team(killer) == 2)
  32. ctfrags++
  33. if(get_user_team(killer) == 1)
  34. tfrags++
  35.  
  36. return PLUGIN_CONTINUE
  37.  
  38. }
  39.  
  40. public hud()
  41. {
  42.  
  43. new players[32],num
  44. get_players(players, num, "bch")
  45. for(new i = 0; i<num; i++)
  46. {
  47. new id = players[i]
  48. set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 3.0)
  49. show_hudmessage(id,"Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
  50. }
  51. }
  52.  


Kép
Kép

Szerző:  Fantom [ 2015.01.14. 20:52 ]
Hozzászólás témája:  Re: Csak halott lássa

[ablak]
crazyboy írta:
SMA Forráskód: [ Mindet kijelol ]#include <amxmodx>
#include <cstrike>

#define PLUGIN "Frags CT of TE"
#define VERSION "1.0"
#define AUTHOR "pixxa112"

new ctfrags = 0
new tfrags = 0

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "halal", "a");
register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")

set_task(3.0, "hud", 0,_,_,"b")
}

public round_first()
{
ctfrags = 0
tfrags = 0
}

public halal()
{
static killer
killer = read_data(1);
if(get_user_team(killer) == 2)
ctfrags++
if(get_user_team(killer) == 1)
tfrags++

return PLUGIN_CONTINUE

}

public hud()
{

new players[32],num
get_players(players, num, "bch")
for(new i = 0; i<num; i++)
{
new id = players[i]
set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 3.0)
show_hudmessage(id,"Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
}
}


Kép
Kép
[/ablak]

Ez már jó
Köszi szépen! :)

Szerző:  RaZzoR [ 2015.01.15. 09:35 ]
Hozzászólás témája:  Re: Csak halott lássa

SMA Forráskód: [ Mindet kijelol ]
  1. public hud() {
  2. new players[32], num
  3. get_players(players, num)
  4.  
  5. for(new i; i < num; i++) {
  6. if(!is_user_alive(players[i]) {
  7. set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 5.0)
  8. show_hudmessage(players[i], "Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
  9. }
  10. }
  11.  
  12. set_task(5.0, "hud")
  13. }

Szerző:  CrB [ 2015.01.15. 17:58 ]
Hozzászólás témája:  Re: Csak halott lássa

Így lehet egyszerűbb lett vna de ez eszembe se jutott :D

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