Job help
#1

Hello,
Today i made a job system with checkpoint... but the checkpoint and the cmd is work every time.. i mean if i not in the current vehicle how can i use /work? also if go to the checkpoint with any cars or in foot its also work xd... so can i have any idea how to fix it? and i have some questions.. i added 2 missions. But how can i make it as a random?
Reply
#2

REMOVED
Reply
#3

Sent My full script in you'r pm. Please give me it after you fix it.
Reply
#4

I'm not going to fix your script, do it yourself.

Whatever you need, it's probably extremely easy. Just search it.

Plus, like I said, I have no idea what you want.

Use ******.
Reply
#5

Who can help me?
Reply
#6

Send me the script, I'll try to fix it.
Reply
#7

Here it is:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/work", cmdtext, true, 10) == 0)
    {
	  if(GetVehicleModel(GetPlayerVehicleID(playerid) == 519 || 592 || 520))
   	  {
       PilotJob[playerid] = 1;
  	   SetPlayerCheckpoint(playerid, -1301.9893,-347.4291,14.1484,3.50);
  	   SendClientMessage(playerid, -1,"{CE0000}You started a mission,Go to SF Airport Gate 2 to start the flight!");
       return 1;
       }
       else
	   SendClientMessage(playerid, -1,"You have to be on a plane to start the flight!");
    }
    return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid) == 519 || 592 || 520))
     {
         SendClientMessage(playerid, -1, "Job: You can start the flight by using {00FF00}/work");
     }
     else
     SendClientMessage(playerid,-1,"Sorry You can't start mission if you don't type /work");
     return 0;
}
Reply
#8

Jesus dude, here, learn to script before you ask for help.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/work", cmdtext, true, 10) == 0)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 519 || GetVehicleModel(vehicleid) == 592 || GetVehicleModel(vehicleid) == 520)
        {
           PilotJob[playerid] = 1;
           SetPlayerCheckpoint(playerid, -1301.9893,-347.4291,14.1484,3.50);
           SendClientMessage(playerid, -1,"{CE0000}You started a mission,Go to SF Airport Gate 2 to start the flight!");
           return 1;
        }
        else SendClientMessage(playerid, -1,"You have to be on a plane to start the flight!");
    }
    return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 519 || GetVehicleModel(vehicleid) == 592 || GetVehicleModel(vehicleid) == 520)
    {
        SendClientMessage(playerid, -1, "Job: You can start the flight by using {00FF00}/work");
    }
    else SendClientMessage(playerid,-1,"Sorry You can't start mission if you don't type /work");
    return 0;
}
Reply
#9

Код:
D:\Trucking\filterscripts\Pilot.pwn(38) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#10

Woops, my mistake

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 519 || GetVehicleModel(vehicleid) == 592 || GetVehicleModel(vehicleid) == 520)
    {
        SendClientMessage(playerid, -1, "Job: You can start the flight by using {00FF00}/work");
    }
    else SendClientMessage(playerid,-1,"Sorry You can't start mission if you don't type /work");
    return 0;
}
Only removed the new vehicleid
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)