Job help -
Tuntun - 19.06.2013
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?
Re: Job help -
Kindred - 19.06.2013
REMOVED
Re: Job help -
Tuntun - 19.06.2013
Sent My full script in you'r pm. Please give me it after you fix it.
Re: Job help -
Kindred - 19.06.2013
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
******.
Re: Job help -
Tuntun - 19.06.2013
Who can help me?
Re: Job help -
JimmyCh - 19.06.2013
Send me the script, I'll try to fix it.
Re: Job help -
Tuntun - 19.06.2013
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;
}
Re: Job help -
Kindred - 19.06.2013
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;
}
Re: Job help -
Tuntun - 19.06.2013
Код:
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.
Re: Job help -
Kindred - 19.06.2013
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