Problem with command
#3

Try it this way:
pawn Код:
CMD:quitjob(playerid,params[])
{
    if(PlayerInfo[playerid][pJob] == 0)
        return SendClientMessage(playerid, COLOR_GREY, "You do not have a job!");

    SendClientMessage(playerid, COLOR_WHITE, "You have quit a job!");
    PlayerInfo[playerid][pJob] = 0;
    PlayerInfo[playerid][pChar] = 0;
    PlayerInfo[playerid][pContractTime] = 0;
    SetPlayerToTeamColor(playerid);
    return 1;
}
You don't have to check if the player who types the command is connected. It makes no sense at all.
Reply


Messages In This Thread
Problem with command - by UnknownGamer - 17.09.2012, 23:37
AW: Problem with command - by arvifilter - 18.09.2012, 00:06
Re: Problem with command - by antonio112 - 18.09.2012, 00:35
Re: Problem with command - by trapstar2020 - 18.09.2012, 03:14
Re: Problem with command - by UnknownGamer - 18.09.2012, 10:18
Re: Problem with command - by clarencecuzz - 18.09.2012, 10:23
Re: Problem with command - by Devilxz97 - 18.09.2012, 10:28

Forum Jump:


Users browsing this thread: 1 Guest(s)