22.05.2014, 10:03
Hello I have for job command /quit and when player type that command his job contract is set to 0 only if he has done 5 hours of job. But the problem is I have 0 jobcontract and I type /quit and it says you are done 0 of 5 hours of job contract if you know what I mean? Thanks, and I'm set player job contract in code where he get a job? Thanks again.
pawn Код:
CMD:quit(playerid,params[])
{
if(gPlayerLogged[playerid] != 1)
{
SCM(playerid,COLOR_GRAD2,"{FFFFFF}[{F81414}G-Protect{FFFFFF}] {C3C3C3}You are not logged in!");
return 1;
}
if(PlayerInfo[playerid][Job] == 0) return SCM(playerid,COLOR_GRAD2,"{F81414}(Odbijeno!) {C3C3C3}You can't quit when you have no job!");
if(PlayerInfo[playerid][JobContract] < 5) return SCMF(playerid,SVIJETLOPLAVA,"You can't quit, you are done %d hours of 5 job contract !",PlayerInfo[playerid][JobContract]);
PlayerInfo[playerid][Job] = 0;
PlayerInfo[playerid][JobContract] = 0;
SCM(playerid,COLOR_YELLOW,"*You are quit from job.");
return 1;
}