Broken Command?
#1

error 030: compound statement not closed at the end of file (started at line 176)

(174)public OnPlayerCommandText(playerid, cmdtext[])
(175){
(176) if(!strcmp(cmdtext, "/CTAB", true))
(177) {
(17 if (gTeam[playerid] == TEAM_CT)
(179) {
(180) GivePlayerWeapon(playerid, 23, 200);
(181) GivePlayerWeapon(playerid, 31, 120);
(182) } else {
(183) SendClientMessage(playerid, 0xFF0000FFF, "You are not a CounterTerorist.");
(184) }
(185) return 1;
(186)}
(187) return 0;

Please help.
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/CTAB", true))
    {
        if (gTeam[playerid] == TEAM_CT)
        {
            GivePlayerWeapon(playerid, 23, 200);
            GivePlayerWeapon(playerid, 31, 120);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FFF, "You are not a CounterTerorist.");
        }
        return 1;
    }

}
return 0;
Reply
#3

Quote:
Originally Posted by PeteShag
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/CTAB", true))
    {
        if (gTeam[playerid] == TEAM_CT)
        {
            GivePlayerWeapon(playerid, 23, 200);
            GivePlayerWeapon(playerid, 31, 120);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FFF, "You are not a CounterTerorist.");
        }
        return 1;
    }

}
return 0;
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/CTAB", true))
    {
        if (gTeam[playerid] == TEAM_CT)
        {
            GivePlayerWeapon(playerid, 23, 200);
            GivePlayerWeapon(playerid, 31, 120);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FFF, "You are not a CounterTerorist.");
        }
        return 1;
    }
return 0;
}
**
Reply
#4

Thanks, but now OnPlayerCommandText doesent return a value, wtf.
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/ctab", true))
    {
        if (gTeam[playerid] == TEAM_CT)
        {
            GivePlayerWeapon(playerid, 23, 200);
            GivePlayerWeapon(playerid, 31, 120);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FFF, "You are not a CounterTerorist.");
        }
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)