#include <a_samp>
#include <zcmd>
#define PLAYERS 200
new Text:Name;
new strt[256];
public OnPlayerConnect(playerid)
{
Name = TextDrawCreate(1.000000, 328.000000," ");
TextDrawBackgroundColor(Name, 255);
TextDrawFont(Name, 2);
TextDrawLetterSize(Name, 0.500000, 1.000000);
TextDrawColor(Name, 16711935);
TextDrawSetOutline(Name, 1);
TextDrawSetProportional(Name, 1);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawHideForAll(Name);
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawHideForPlayer(playerid,Name);
return 1;
}
if(IsPlayerConnected(playerid))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
format(strt,sizeof(strt),"Nick: ~b~%s",name);
TextDrawSetString(Name,strt);
TextDrawShowForPlayer(playerid,Name);
}
return 1;
}
COMMAND
nhaoff(playerid,params[])
{
TextDrawHideForPlayer(playerid,Name);
return 1;
}