Help with DeletePlayer3DTextLabel!
#1

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)