08.07.2010, 20:42
True that, but if he for example would like to show kills. Simple textdraws are win though. What I most like about those 3D texts is that you can simply place them anywhere. A must-have for roleplay servers, so you won't see armor/hp ^^.
Thingy for TD+1: GetPVarInt returns '0' when that PVar hasn't been set. The first player to spawn would get TD id 0, which is equal to not having created a textdraw.
BTW: Don't forget to destroy them at OnPlayerDisconnect.
pawn Код:
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid,"TD") == 0) {
new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof pName);
new TD = Create3DTextLabel(pName,0xff00ffff,0,0,080,0,0);
Attach3DTextLabelToPlayer(TD,playerid,0,0,2);
SetPVarInt(playerid,"TD",TD+1);
}
return 1;
}
BTW: Don't forget to destroy them at OnPlayerDisconnect.