#1

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.
Reply
#2

upp...
Reply
#3

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)