[HELP] job quit
#1

Hello I have command job quit and know I have 5 hours of job contract and know I go /jobquit and it says You can not quit, you're done 5 of the required five hours of contract!

here is the command

pawn Код:
CMD:jobquit(playerid,params[])
{
    if(PlayerInfo[playerid][Job] == 0) return SCM(playerid,COLOR_GRAD2,"{F81414}[Greska!] {C3C3C3}You have no job!");
    if (0 <= PlayerInfo[playerid][JobContract] <= 5) return SCMF(playerid,COLOR_LIGHTBLUE,"You can not quit, you're done %d of the required five hours of contract!",PlayerInfo[playerid][JobContract]);
    PlayerInfo[playerid][Job] = 0;
    PlayerInfo[playerid][JobContract] = 0;
    SCM(playerid,COLOR_YELLOW,"*You have quit from the job.");
    return 1;
}
Reply
#2

pawn Код:
CMD:jobquit(playerid,params[])
{
    if(PlayerInfo[playerid][Job] == 0) return SCM(playerid,COLOR_GRAD2,"{F81414}[Greska!] {C3C3C3}You have no job!");
    if (0 <= PlayerInfo[playerid][JobContract] < 5) return SCMF(playerid,COLOR_LIGHTBLUE,"You can not quit, you're done %d of the required five hours of contract!",PlayerInfo[playerid][JobContract]); // This line was incorrect as you've done if the player has less then or five hours of work. You need just the < symbol.
    PlayerInfo[playerid][Job] = 0;
    PlayerInfo[playerid][JobContract] = 0;
    SCM(playerid,COLOR_YELLOW,"*You have quit from the job.");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)