16.03.2013, 17:59
Hi, basicly I made an /ame command, evrything works fine, the TEXT gets attached to the player and all, however, it dosent get removed!
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.
when I compile I also get a warning..
on this line
DeletePlayer3DTextLabel(playerid, ame[playerid]);
Thanks!
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;
}
pawn Код:
forward amee(playerid);
public amee(playerid)
{
DeletePlayer3DTextLabel(playerid, ame[playerid]);
return 1;
}
Код:
(4555) : warning 213: tag mismatch
pawn Код:
forward amee(playerid);
public amee(playerid)
{
----> DeletePlayer3DTextLabel(playerid, ame[playerid]);
return 1;
}
Thanks!