07.01.2011, 16:37
Can someone send me an example for attaching 3DTextLabel to NPC ??
new Text3D:npc3DTextLabel[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 1; // We only deal with NPC players in this script
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"mynpc",true)) //put here your NPC name.
{
npc3DTextLabel[playerid] = Create3DTextLabel("bla bla bla",0x33FF33AA, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(npc3DTextLabel[playerid],playerid,0.0, 0.0, 0.7);
}
return 1;
}