Jump to content
  • 0

Help !!


AlexuTzuBss

Question

2 answers to this question

Recommended Posts

  • 0
forward FailJob(playerid, reason[]);
public FailJob(playerid, reason[])
{
    new string[256];
    format(string, sizeof(string), "Munca ta a esuat! Motiv: %s", reason);
    SCM(playerid, 0xFFFF00FF, string);
    DestroyVehicle(PlayerCar[playerid]);
    PlayerCar[playerid] = 0;
    JobWorking[playerid] = 0;
    DisablePlayerCheckpoint(playerid);
    JobCP[playerid] = 0;
    return 1;
}
forward FinishJob(playerid, reason[]);
public FinishJob(playerid, reason[])
{
    new string[256];
    format(string, sizeof(string), "Munca ta a esuat! Motiv: %s", reason);
	SCM(playerid, 0xFFFF00FF, string); // am adaugat asta ca sa afiseze textul
    DestroyVehicle(PlayerCar[playerid]);
    PlayerCar[playerid] = 0;
    JobWorking[playerid] = 0;
    DisablePlayerCheckpoint(playerid);
    JobCP[playerid] = 0;
    return 1;
} // aici ti-am sters o steluta cred ca era
public OnPlayerEnterCheckpoint(playerid)
{
    new string[256];
    switch(JobCP[playerid])
    {
        case 1:
        {
            DisablePlayerCheckpoint(playerid);
            JobCP[playerid] = 0;
            SCM(playerid, -1, "Acum poti folosi /work!");
        }
        case 2: SetPlayerCheckpoint(playerid, 2239.0498, 1286.7819, 10.8203, 5.0), JobCP[playerid] ++;
        case 3: SetPlayerCheckpoint(playerid, 2635.4045, 1850.0782, 11.0234, 5.0), JobCP[playerid] ++;
        case 4: SetPlayerCheckpoint(playerid, 2015.5530, 1151.5247, 10.8203, 5.0), JobCP[playerid] ++;
        case 5:
        {
            DisablePlayerCheckpoint(playerid);
            new money = 100000 + random(100000);
            format(string, sizeof(string), "Ai terminat de muncit si ai primit $%d", money);
            SCM(playerid, 0x00FFFFFF, string);
            GivePlayerMoney(playerid, money);
            FinishJob(playerid,"Sunt slab!"); //<----- AICI AM EROARE NR 2 
        }
    }
    return 1;
}

Deci nu ma mai pricep la dat explicatii, dar atunci cand folosesti functia FinishJob trebuie sa-i completezi toti parametri. Gen tu ai folosit doar FinishJob(playerid), dar nu ai completat si acel reason. Nu stiu daca e corect ce scriu, dar ar trebui sa mearga.

  • Thanks 1
Link to comment
Share on other sites

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.