28.05.2020, 13:39
Quote:
You have to use MapAndreas include by Ryder to get this in the working state..
EDIT:I didnt test it or compile, if it's not working tell me |
pawn Code:
stock IsPlayerOnVehicle(playerid) // By GameOvr, just made for you :D
{
if(IsPlayerInAnyVehicle(playerid)) return INVALID_VEHICLE_ID;
new Float:x, Float:y, Float:z, Float:px, Float:py, Float:pz, Float:Zval;
GetPlayerPos(playerid, px, py, pz);
foreach(new i : Vehicle)
{
GetVehiclePos(i, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z) && jumping[playerid] == 0)
{
MapAndreas_FindZ_For2DCoord(px, py, Zval);
if(pz > Zval) return i;
}
}
return INVALID_VEHICLE_ID;
}