hlmod.hu
https://hlmod.hu/

Csapattárs neve a feje fölé
https://hlmod.hu/viewtopic.php?f=29&t=6853
Oldal: 1 / 1

Szerző:  paintballer [ 2012.12.17. 17:16 ]
Hozzászólás témája:  Csapattárs neve a feje fölé

Sziasztok

Egy olyan plugint szeretnék, ami a saját csapattársaid nevét kiírja a fejük fölé.
Falon át ne látszódjon csak ha látod is a társadat.

Szerző:  fuck604 [ 2012.12.18. 14:50 ]
Hozzászólás témája:  Re: Csapattárs neve a feje fölé

nemtom mükdöik-e teszteld!
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <chr_engine>
  4.  
  5. new maxdistance
  6.  
  7. #define EDIT "Petrik"
  8.  
  9. public plugin_init()
  10. {
  11. register_plugin("asdasdasd", "1.0", "ghw_cronic")
  12. register_forward(FM_PlayerPreThink,"FM_PreThink")
  13. maxdistance = register_cvar( "amx_maxdistance", "100" )
  14.  
  15. }
  16.  
  17. public FM_PreThink(id)
  18. {
  19. if(!is_user_alive(id))
  20. return PLUGIN_CONTINUE
  21.  
  22.  
  23. if(is_user_connected(id)){
  24.  
  25.  
  26. static Float:origin[3], players[32], num, num2, team
  27. team = get_user_team(id)
  28. arrayset(players,0,32)
  29.  
  30. pev(id ,pev_origin,origin)
  31. get_players_distance(origin,players,num,"a")
  32.  
  33. static Float:hudpos[2]
  34. static Float:distance
  35. static Float:origin2[3]
  36. num2=0
  37. for(new i=0;i<num;i++)
  38. {
  39.  
  40. if(players[i] && get_user_team(players[i])== team)
  41. {
  42. pev(players[i],pev_origin,origin2)
  43. if(get_hudmessage_locs(id,origin2,hudpos))
  44. {
  45. origin2[2] + 10
  46. distance = vector_distance(origin,origin2)
  47.  
  48. new name[18]
  49. get_user_name(players[i] ,name, 17)
  50. num2++
  51.  
  52. if(distance >= get_pcvar_num(maxdistance))
  53. continue
  54.  
  55. set_hudmessage(255,0,0,hudpos[0],hudpos[1],0,6.0,0.2,0.1, 0.2,num2)
  56. show_hudmessage(id, "%s",name)
  57.  
  58. if(num2==4) break;
  59. }
  60. }
  61. }
  62.  
  63. }
  64. return PLUGIN_CONTINUE
  65. }
  66.  


INC
Eredeti Plugin

Szerző:  paintballer [ 2012.12.19. 14:16 ]
Hozzászólás témája:  Re: Csapattárs neve a feje fölé

Ez csak akkor írja ki a nevét ha ráviszem a célkeresztet és nem a feje fölé hanem az emberbe..
Azért köszi, hogy utánanéztél.

Szerző:  fuck604 [ 2012.12.19. 15:43 ]
Hozzászólás témája:  Re: Csapattárs neve a feje fölé

tesztelted vagy csak mondtad? mert biztos hogy NEM

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