Moving Car, - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Moving Car, (
/showthread.php?tid=178724)
Moving Car, -
Hash [NL-RP] - 23.09.2010
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.
Re: Moving Car, -
The_Moddler - 23.09.2010
PLAYER_STATE_DRIVER or 2
Re: Moving Car, -
Hash [NL-RP] - 23.09.2010
Thats only if the player is in the Vehicle, Im Talking about when the vehicle
MOVES
Re: Moving Car, -
Mike_Peterson - 23.09.2010
GetVeloCity??
or
OnPlayerUpdate + Ifplayerisinvehicle + getplayerstate 2?
Re: Moving Car, -
wups - 23.09.2010
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.
}