/pullover problems
#2

pawn Код:
if(strcmp(cmd, "/pullover", true) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(IsPlayerInAnyVehicle(giveplayerid))
            {
                if(gTeam[playerid] == TEAM_POLICE)
                {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_GREEN, "/pullover ID - Ask the player to pull over");
                }
                    giveplayerid = ReturnUser(tmp);
                    if(IsPlayerConnected(giveplayerid))
                {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "%s has asked you to pullover",sendername);
                    GameTextForPlayer(giveplayerid, string, 3500, 5);
                    //GameTextForPlayer(playerid, "~g~ Pullover request sent", 3500, 3);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_RED, "The player is not in a vehicle");
                }
            }
                    else
            {
                SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle");
                }
            }
        }
    }
    return 1;
}
Sorry about the indentations.. blame the forum. Paste it in and fix them. The problem was that you had
pawn Код:
return 1;
everywhere. You only need 1 -- at the bottom of the command between the last 2 closing brackets.
Reply


Messages In This Thread
/pullover problems - by BizzyD - 26.03.2011, 13:38
Re: /pullover problems - by austin070 - 26.03.2011, 14:48
Re: /pullover problems - by BizzyD - 26.03.2011, 15:16
Re: /pullover problems - by BizzyD - 26.03.2011, 15:53
Re: /pullover problems - by BizzyD - 26.03.2011, 19:13
Re: /pullover problems - by austin070 - 26.03.2011, 19:47
Re: /pullover problems - by admantis - 26.03.2011, 20:00
Re: /pullover problems - by BizzyD - 26.03.2011, 20:22
Re: /pullover problems - by MadeMan - 26.03.2011, 21:27
Re: /pullover problems - by Maxips2 - 26.03.2011, 21:30

Forum Jump:


Users browsing this thread: 1 Guest(s)