Jump to content
  • 0

Problema /quitjob


Balvin[]

Question

Am comanda asta si doresc sa o trec pe zcmd am include tot dar cum o fac.

 

 


    if(strcmp(cmd, "/quitjob", true) == 0)
    {
        if(IsPlayerConnected(playerid))
           {
               if(gPlayerLogged[playerid] != 0)
               {
                if(PlayerInfo[playerid][pJob] > 0)
                {
                    if(PlayerInfo[playerid][pDonateRank] > 0)
                    {
                        if(PlayerInfo[playerid][pContractTime] >= 0)
                        {
                            SendClientMessage(playerid, -1, "* 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, -1, 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, -1, string);
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, -1, ""ALBASTRU2"Nu ai nici un job !");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, -1, ""ALBASTRU2"Nu esti conectat !");
                return 1;
            }
        }
        return 1;
    }

Si vreau cand dai /quitjob sa nu mai ramana 5 ore pana sa imi expire ca nu gasesc orele alea 5. Multumesc

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.