zz, imam gf mod i nece mi raditi /quitjob sve mi zove imate da radite jos 0 sati i nece mi dati otkaz evo komande i kako da napravim cim upisem tu komandu automatski mi prekine posao bez razliku dali imam odraboteno ili ne?
if(strcmp(cmd, "/quitjob", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] > 0)
{
if(PlayerInfo[playerid][pDonateRank] > 0)
{
if(PlayerInfo[playerid][pContractTime] >= 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You already forfilled your 1 hour Contract, and quited your Job.");
PlayerInfo[playerid][pJob] = 0;
PlayerInfo[playerid][pChar] = 0;
PlayerInfo[playerid][pContractTime] = 0;
}
else
{
new chours = 2 - PlayerInfo[playerid][pContractTime];
format(string, sizeof(string), "* You still have %d hours left to forfill and end your Contract.", chours / 2);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
else
{
if(PlayerInfo[playerid][pContractTime] >= 10)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You already forfilled your 5 hour Contract, and quited your Job.");
PlayerInfo[playerid][pJob] = 0;
PlayerInfo[playerid][pChar] = 0;
PlayerInfo[playerid][pContractTime] = 0;
}
else
{
new chours = 10 - PlayerInfo[playerid][pContractTime];
format(string, sizeof(string), "* You still have %d hours left to forfill and end your Contract.", chours / 2);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't even have a Job !");
}
}//not connected
return 1;
}
edit: napravio sam ovo
if(strcmp(cmd, "/quitjob", true)== 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Uspesno dadovte otkaz i poveke nemate rabota.");
PlayerInfo[playerid][pJob] = 0;
}
jel ce samo mene oduzet posao ili na svi online igraci?
Maknut ce posao onome koji upise /quitjob..
Citat: [ED] ZicMortal poslato Jun 29, 2010, 14:58:27 POSLE PODNE
Maknut ce posao onome koji upise /quitjob..
aha skontao sam xD mislim da je to jel ima playerid moze
LOCK