Pawno [SOLVED]
#1

Hai, When i try to add a little bit of code the Pawno compiler crashes, and when i dont have that little code, i will compile fine My code is
pawn Код:
if(IsCopBan[playerid] == 0)
   
        if(gTeam[playerid] == TEAM_COPS)
        {


            GivePlayerWeapon(playerid, 3, 1);
            GivePlayerWeapon(playerid, 22, 500);
            GivePlayerWeapon(playerid, 25, 400);
            GivePlayerWeapon(playerid, 29, 250);
        }
        return 1;
    }

    if(IsCopBan[playerid] == 1)
    {
        SendClientMessage(playerid, -1, "{FF0000}[ATTENTION]{FFFFFF}: You are currently {FF0000}Cop Banned{FFFFFF} and can currently not use this class");
        ForceClassSelection(playerid);
        TogglePlayerSpectating(playerid, true);
        TogglePlayerSpectating(playerid, false);
        return 1;
    }
and i putted it onplayerspawn, but when i run the compiling, it crashes
Reply
#2

pawn Код:
if(IsCopBan[playerid] == 0)
{
    if(gTeam[playerid] == TEAM_COPS)
    {
        GivePlayerWeapon(playerid, 3, 1);
        GivePlayerWeapon(playerid, 22, 500);
        GivePlayerWeapon(playerid, 25, 400);
        GivePlayerWeapon(playerid, 29, 250);
    }
    return 1;
}
if(IsCopBan[playerid] == 1)
{
    SendClientMessage(playerid, -1, "{FF0000}[ATTENTION]{FFFFFF}: You are currently {FF0000}Cop Banned{FFFFFF} and can currently not use this class");
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);
    return 1;
}
Reply
#3

Thanks
Reply
#4

Always check for missing brackets.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)