Question Speed - 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)
+--- Thread: Question Speed (
/showthread.php?tid=391108)
Question Speed -
Akcent_Voltaj - 09.11.2012
hi i dont know the max for hacks cause if i jump off the chiliad i get speed hack and i dont want to.only if i have speed hack.
PHP код:
if(GetPlayerSpeed(playerid) >= 300 && (GetPlayerState(playerid)== PLAYER_STATE_DRIVER))
PHP код:
stock GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 155.0;
return floatround(ST[3]);
}
Re: Question Speed -
Faisal_khan - 09.11.2012
Maximum speed of a vehicle is 198km/h.
Re: Question Speed -
mincer - 09.11.2012
try to check if player is near chilliad.
Re: Question Speed -
Akcent_Voltaj - 09.11.2012
i mean the fastest speed with hack..