Jump to content
  • 0
Sign in to follow this  
Zeko

Problema job farmer /work

Question

2 answers to this question

Recommended Posts

  • 0

Din ce cred, problema ta este de aici:

 

if(JobWorking[playerid] == 1 && gLastCar[playerid] == JobVehicle[playerid]) {
        if(PlayerInfo[playerid][pJob] == 1) {
            SCM(playerid, COLOR_GREY, "Job esuat! Ai parasit vehiculul.");
            if(playerObject[playerid] != 0) DestroyPlayerObject(playerid, playerObject[playerid]), playerObject[playerid] = 0;
            if(playerObject2[playerid] != 0) DestroyObject(playerObject2[playerid]), playerObject2[playerid] = 0;
            JobWorking[playerid] = 0;
            PlayerTextDrawHide(playerid, JobTD);
            if(JobVehicle[playerid] != 0) { DestroyVehicle(JobVehicle[playerid]); JobVehicle[playerid] = 0; }
            if(Trailer[playerid] != 0) { DestroyVehicle(Trailer[playerid]); Trailer[playerid] = 0;  }
            PlayerTextDrawHide(playerid, InfosTD);
            DisablePlayerCheckpointEx(playerid);
            DisablePlayerRaceCheckpointEx(playerid);
            CP[playerid] = 0;
            JobVehicle[playerid] = 0;
            RemovePlayerAttachedObject(playerid, 2);
            RemovePlayerAttachedObject(playerid, 6);
            JobDeelay[playerid][PlayerInfo[playerid][pJob]] = 180; 
        }
        else JobLeftTime[playerid] = 120;  
    }

Nu ai nicio verificare care sa deduca daca jucatorul este sau nu in masina.

Trebuie sa o creezi.

if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
	if(JobWorking[playerid] == 1 && gLastCar[playerid] == JobVehicle[playerid]) {
        if(PlayerInfo[playerid][pJob] == 1) {
            SCM(playerid, COLOR_GREY, "Job esuat! Ai parasit vehiculul.");
            if(playerObject[playerid] != 0) DestroyPlayerObject(playerid, playerObject[playerid]), playerObject[playerid] = 0;
            if(playerObject2[playerid] != 0) DestroyObject(playerObject2[playerid]), playerObject2[playerid] = 0;
            JobWorking[playerid] = 0;
            PlayerTextDrawHide(playerid, JobTD);
            if(JobVehicle[playerid] != 0) { DestroyVehicle(JobVehicle[playerid]); JobVehicle[playerid] = 0; }
            if(Trailer[playerid] != 0) { DestroyVehicle(Trailer[playerid]); Trailer[playerid] = 0;  }
            PlayerTextDrawHide(playerid, InfosTD);
            DisablePlayerCheckpointEx(playerid);
            DisablePlayerRaceCheckpointEx(playerid);
            CP[playerid] = 0;
            JobVehicle[playerid] = 0;
            RemovePlayerAttachedObject(playerid, 2);
            RemovePlayerAttachedObject(playerid, 6);
            JobDeelay[playerid][PlayerInfo[playerid][pJob]] = 180; 
        }
        else JobLeftTime[playerid] = 120;  
    }
}

 

Share this post


Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.