OPEV - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OPEV (
/showthread.php?tid=473990)
OPEV -
razvan123 - 05.11.2013
Hi,i have a problem.public OnPlayerEnterVehicle and OnPlayerEXitVehicle dont work,simply,nothing from this public dont work.look what i have on ExitVehicle
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_RED, " Ai coborat din masina iar aceasta a fost respawnata. ");
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_RED, " Ai coborat din masina iar aceasta a fost respawnata. ");
}
return 1;
}
Simply,when u exit the job vehicle,it doesnt respawn,nothing happens..
Thanks in advance.
Re: OPEV -
razvan123 - 06.11.2013
upp...
Re: OPEV -
SeniorGamer - 06.11.2013
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;
}