02.12.2014, 20:46
How to make a stock, for checking if he got trailer attached + in the car with CARID?
EDIT: IsTrailerAttachedToVehicle This one,
EDIT: IsTrailerAttachedToVehicle This one,
IsAllOk(playerid, vehicleid)
{
if(vehicleid == 0 || !IsPlayerInVehicle(playerid, vehicleid)) return 0;
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
if(!IsTrailerAttachedToVehicle(vehicleid)) return 0;
return 1;
}
if(IsAllOk(playerid, GetPlayerVehicleID(playerid)))
{
// player is in vehicleid, driving and got attached trailer
}