Moving Car,
#1

I need this for a system that is almost made, i know you can trace the player if he is inside a vehicle with GetPlayerState, but is there anyway to Enable the function Only if the driver is driving the vehicle.
Thanks in advance.
Reply
#2

PLAYER_STATE_DRIVER or 2
Reply
#3

Thats only if the player is in the Vehicle, Im Talking about when the vehicle MOVES
Reply
#4

GetVeloCity??
or
OnPlayerUpdate + Ifplayerisinvehicle + getplayerstate 2?
Reply
#5

pawn Код:
stock GetSpeed(playerid)
{
    new Float:ST[3];
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    return floatround(1.61*floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 100.3);
}

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetSpeed(playerid))
{
 // Your func. here.
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)