always checking vehicle?
#5

UNTESTED

pawn Код:
//On Top
new TruckTimer[MAX_PLAYERS];

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][0] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][1] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][2] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][3] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][4])
    {
       TruckTimer[playerid] = SetTimerEx("IsTrailer",1000,true,"i",playerid);
    }
    return 1;
}

forward IsTrailer(playerid);
public IsTrailer(playerid)
{
    //Check if trailer is attached
    return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
        if(GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][0] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][1] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][2] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][3] || GetPlayerVehicleID(playerid) == JobInfo[JOB_TRUCKER][jCars][4])
        {
        KillTimer(TruckTimer[playerid]);      
        }  
    return 1;
}
Reply


Messages In This Thread
always checking vehicle? - by oblexive - 13.07.2012, 04:03
Re: always checking vehicle? - by Yuryfury - 13.07.2012, 04:08
Re: always checking vehicle? - by [MM]RoXoR[FS] - 13.07.2012, 04:30
Re: always checking vehicle? - by oblexive - 13.07.2012, 04:39
Re: always checking vehicle? - by [MM]RoXoR[FS] - 13.07.2012, 05:08
Re: always checking vehicle? - by oblexive - 13.07.2012, 05:35
Re: always checking vehicle? - by PrawkC - 13.07.2012, 05:48
Re: always checking vehicle? - by oblexive - 13.07.2012, 05:53
Re: always checking vehicle? - by oblexive - 13.07.2012, 05:58

Forum Jump:


Users browsing this thread: 1 Guest(s)