Help BUG
#3

This is because this code is running every time you spawn.
pawn Код:
public OnPlayerSpawn(playerid)
{
    UpdatePlayer3DTextLabelText(playerid, Text3D:label7, -1, " "); //---------------Added this line, to reset the textlabel before making a new one
    if(gTeam[playerid] == TEAM_GERMANY) {
        SetPlayerArmour(playerid, 100);
        new Text3D:label7 = Create3DTextLabel("GERMANY",TEAM_GERMANY_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
        SetPlayerTeam(playerid, 0);
        }
    else if(gTeam[playerid] == TEAM_IRAQ) {
        SetPlayerArmour(playerid, 100);
        new Text3D:label7 = Create3DTextLabel("IRAQ",TEAM_IRAQ_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
        SetPlayerTeam(playerid, 1);
    }
    else if(gTeam[playerid] == TEAM_RUSSIA) {
        SetPlayerArmour(playerid, 100);
        new Text3D:label7 = Create3DTextLabel("RUSSIA",TEAM_RUSSIA_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
        SetPlayerTeam(playerid, 2);
    }
    else if(gTeam[playerid] == TEAM_USA) {
        SetPlayerArmour(playerid, 100);
        new Text3D:label7 = Create3DTextLabel("USA",TEAM_USA_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
        SetPlayerTeam(playerid, 3);
    }
    else if(gTeam[playerid] == TEAM_BANGLADESH) {
        SetPlayerArmour(playerid, 100);
        new Text3D:label7 = Create3DTextLabel("BANGLADESH",TEAM_BANGLADESH_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
        SetPlayerTeam(playerid, 4);
    }
    return 1;
}
Reply


Messages In This Thread
Help BUG - by DaYviSoN - 07.05.2014, 21:38
Re: Help BUG - by RenSoprano - 07.05.2014, 21:54
Re: Help BUG - by Nathan_Taylor - 07.05.2014, 21:58
Re: Help BUG - by DaYviSoN - 07.05.2014, 22:30
Re: Help BUG - by UnknownGamer - 08.05.2014, 00:43
Re: Help BUG - by DaYviSoN - 08.05.2014, 01:17
Re: Help BUG - by DaYviSoN - 08.05.2014, 12:35
Re: Help BUG - by Nathan_Taylor - 08.05.2014, 17:50
Re: Help BUG - by DaYviSoN - 08.05.2014, 19:20
Re: Help BUG - by Nathan_Taylor - 08.05.2014, 19:30

Forum Jump:


Users browsing this thread: 1 Guest(s)