Placing Text Above Someone
#5

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 ^^.

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;
}
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.
Reply


Messages In This Thread
Placing Text Above Someone - by TKZ227 - 08.07.2010, 20:10
Re: Placing Text Above Someone - by CAR - 08.07.2010, 20:15
Re: Placing Text Above Someone - by Hiddos - 08.07.2010, 20:29
Re: Placing Text Above Someone - by [XST]O_x - 08.07.2010, 20:39
Re: Placing Text Above Someone - by Hiddos - 08.07.2010, 20:42

Forum Jump:


Users browsing this thread: 1 Guest(s)