Delete3DTextLabel
#1

Hello!

I getting a warning on this, how do i correct it?

i have tried these codes
pawn Код:
Delete3DTextLabel(Airwolves,playerid); //number of arguments does not match definition
Delete3DTextLabel(Text3D:Airwolves,playerid);//number of arguments does not match definition
Delete3DTextLabel(Text3D:Airwolves[playerid]);//gives errors
Reply
#2

Delete3DTextLabel(Airwolves);

Might Remove it For all Players..
Reply
#3

Did you define the label for all players? [MAX_PLAYERS]?

If this is the case use it like:
pawn Код:
//also create them as player labels

//and delete them like:
DeletePlayer3DTextLabel(playerid,Airwolves[playerid]);

//if u want to delete a global label use:
Delete3DTextLabel(Airwolves);
Reply
#4

Quote:
Originally Posted by Buzzbomb
Посмотреть сообщение
Delete3DTextLabel(Airwolves);

Might Remove it For all Players..
Thanks!

but of some reason it doesnt removes the label, and it shall removes for all players.

I have made it like this.
pawn Код:
public OnPlayerSpawn(playerid)
{
    new Text3D:Rookie = Create3DTextLabel("Rookie", 0xFF0000FF, 30.0, 40.0, 50.0, 40.0, 0);
    new Text3D:Airwolves = Create3DTextLabel("Airwolves", 0xAFAFAFAA, 30.0, 40.0, 50.0, 40.0, 0);
    new Text3D:Bluefoxes = Create3DTextLabel("Bluefoxes", 0x33CCFFAA, 30.0, 40.0, 50.0, 40.0, 0);
    new Text3D:Thunderbirds = Create3DTextLabel("Thunderbirds", 0xFFFF00AA, 30.0, 40.0, 50.0, 40.0, 0);

Attach3DTextLabelToPlayer(Rookie, playerid, 0.0, 0.0, 0.3);
Attach3DTextLabelToPlayer(Airwolves, playerid, 0.0, 0.0, 0.3);
Attach3DTextLabelToPlayer(Bluefoxes, playerid, 0.0, 0.0, 0.3);
Attach3DTextLabelToPlayer(Thunderbirds, playerid, 0.0, 0.0, 0.3);

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == 755)
    {
        new Text3D:Airwolves;
        new Text3D:Bluefoxes;
        new Text3D:Thunderbirds;
        if (response)
        {
            new string[120];
            format(string,sizeof(string),"You have resigned from %s", Organization[PlayerOrg[playerid]][Name]);
            SendClientMessage(playerid, COLOR_YELLOW, string);
            format(string,sizeof(string),"**%s has resigned from %s", PlayerName(playerid), Organization[PlayerOrg[playerid]][Name]);
            SendClientMessageToAllEx(playerid, COLOR_GREY, string);
            Delete3DTextLabel(Text3D:Airwolves);
            Delete3DTextLabel(Text3D:Bluefoxes);
            Delete3DTextLabel(Text3D:Thunderbirds);
           
            if (IsLeader(playerid))
            {
            new none[24];
            format(none,sizeof(none),"None");
            Organization[PlayerOrg[playerid]][Leader] = none;
            }
            ResetPlayerOrg(playerid);
            SavePlayerOrgInfo(playerid);
            SetPlayerTeam(playerid, 0);
            SetPlayerColor(playerid, COLOR_RED);
            SpawnPlayer(playerid);
            PlayerRank[playerid] = "None";
            SendClientMessageToAllEx(playerid, COLOR_GREY, string);
            Delete3DTextLabel(Text3D:Airwolves);
            Delete3DTextLabel(Text3D:Bluefoxes);
            Delete3DTextLabel(Text3D:Thunderbirds);
        }
I guess new "Text3D:Airwolves;" on "OnDialogResponse" is completely wrong bc it doesnt call these lines?
pawn Код:
new Text3D:Rookie = Create3DTextLabel("Rookie", 0xFF0000FF, 30.0, 40.0, 50.0, 40.0, 0);
    new Text3D:Airwolves = Create3DTextLabel("Airwolves", 0xAFAFAFAA, 30.0, 40.0, 50.0, 40.0, 0);
    new Text3D:Bluefoxes = Create3DTextLabel("Bluefoxes", 0x33CCFFAA, 30.0, 40.0, 50.0, 40.0, 0);
    new Text3D:Thunderbirds = Create3DTextLabel("Thunderbirds", 0xFFFF00AA, 30.0, 40.0, 50.0, 40.0, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)