Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: [IF] mariomako poslato Jun 29, 2010, 14:26:46 POSLE PODNE

Naslov: /quitjob pomoc
Poruka od: [IF] mariomako poslato Jun 29, 2010, 14:26:46 POSLE PODNE
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?
Naslov: Odg: /quitjob pomoc
Poruka od: [ED] ZicMortal poslato Jun 29, 2010, 14:58:27 POSLE PODNE
Maknut ce posao onome koji upise /quitjob..
Naslov: Odg: /quitjob pomoc
Poruka od: [IF] mariomako poslato Jun 29, 2010, 15:34:40 POSLE PODNE
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