TYUI

Name Textdraw by Miroslav

Oct 10th, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.70 KB | None | 0 0
  1. #include <a_samp>
  2. #define NadHlavou (10)
  3. new Text3D:NameTag[MAX_PLAYERS];
  4. new playerName[MAX_PLAYER_NAME];
  5.  
  6. public OnGameModeInit()
  7. {
  8.     SetNameTagDrawDistance(0.0);
  9.     ShowNameTags(false);
  10.     return 1;
  11. }
  12.  
  13. public OnPlayerConnect(playerid)
  14. {
  15.     playerName = p_name( playerid );
  16.     NameTag[playerid] = Create3DTextLabel( playerName, 0xFFFFFFFF, 0, 0, 0, NadHlavou, 0, 1 );
  17.     Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 0.2);
  18.     return 1;
  19. }
  20.  
  21. public OnPlayerDisconnect(playerid, reason)
  22. {
  23.     Delete3DTextLabel( NameTag[playerid] );
  24.     return 1;
  25. }
  26.  
  27. stock p_name( playerid )
  28. {
  29.     new p_namev[MAX_PLAYER_NAME];
  30.     GetPlayerName(playerid, p_namev, MAX_PLAYER_NAME);
  31.     return p_namev;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment