21.08.2014, 16:34
When a player spawns, I want a 3DTextLabel to appear at the place they spawned for specific players (Players that have some variable equal to 1) and after 15 seconds I want this label to be destroyed for all players which it was created for. So we will know who spawned where. And also I'd store a variable for the 3Dtextlabel for each player but then It wont work if you get multiple spawns at once. (It will override the other labels)
I tried this:
I tried this:
pawn Код:
foreach(new i : Player) // onplayerspawn
{
if(SomeVar[i] == 1)
{
new PlayerText3D:playertextid
playertextid = CreatePlayer3DTextLabel(i,"bla bla bla",0x008080FF,x,y,z,40.0);
SetTimerEx("DeleteLabel", 15000, false, "dd", i, playertextid); // warning 213: tag mismatch
}
}
forward DeleteLabel(playerid,labelid);
public DeleteLabel(playerid,labelid)
{
DeletePlayer3DTextLabel(playerid, PlayerText3D:labelid);
}