Help with DeletePlayer3DTextLabel! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with DeletePlayer3DTextLabel! (
/showthread.php?tid=423119)
Help with DeletePlayer3DTextLabel! -
lean1337 - 16.03.2013
Hi, basicly I made an /ame command, evrything works fine, the TEXT gets attached to the player and all, however, it dosent get removed!
pawn Код:
new Text3D: ame[MAX_PLAYERS];
LEANCMD:(ame)
{
new Float:X, Float:Y, Float:Z;
new sendername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
if(isnull(params)) return SCM(playerid,COLOR_GREY,"USAGE: /ame [action]");
printf("%s", string);
GetPlayerPos( playerid, X, Y, Z );
format(string,sizeof(string), "%s %s",GetICName(playerid), params);
ame[playerid] = Create3DTextLabel(string, COLOR_PURPLE, 30.0, 40.0, 65.0, 40.0, 0);
Attach3DTextLabelToPlayer(ame[playerid], playerid, 0.0, 0.0, 0.3);
SetTimerEx("amee", 5000, false, "i", playerid);
SendClientMessage(playerid, COLOR_PURPLE, "-> %s", params);
return 1;
}
The command and here is the forward for it to get deleted after 5 seconds. but it wont get deleted and stays above the player all the time.
pawn Код:
forward amee(playerid);
public amee(playerid)
{
DeletePlayer3DTextLabel(playerid, ame[playerid]);
return 1;
}
when I compile I also get a warning..
Код:
(4555) : warning 213: tag mismatch
on this line
pawn Код:
forward amee(playerid);
public amee(playerid)
{
----> DeletePlayer3DTextLabel(playerid, ame[playerid]);
return 1;
}
DeletePlayer3DTextLabel(playerid, ame[playerid]);
Thanks!