View Single Post
Old 28/05/2020, 01:39 PM   #8
Little Clucker
Join Date: Apr 2020
Posts: 4
Reputation: 0
Default Re: trying to do IsPlayerOnVehicle

Originally Posted by GameOvr View Post
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
I changed your code because you had some mistakes. But, no help

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;

ChampDotChamp is offline   Reply With Quote