06.11.2013, 17:30
Do something like this.
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;
}