SA-MP Forums Archive
[Request] Anti-Speed MAX 3s, (350 km) +REP - 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: [Request] Anti-Speed MAX 3s, (350 km) +REP (/showthread.php?tid=335526)



[Request] Anti-Speed MAX 3s, (350 km) +REP - .Skool_. - 18.04.2012

Hello, and wanted a system that kind, if the player is in > s-0-b-e-i-t < and press the R key and banished him, but I wanted him cheking only one time ..
To summarize: If it reaches 350km in 3 seconds and it banned! Thank you.


Re: [Request] Anti-Speed MAX 3s, (350 km) +REP - zSuYaNw - 18.04.2012

you can use:
pawn Код:
stock GetPlayerSpeed(playerid,bool:kmh) // by misco
{
  new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
  if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
  rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
  return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
to get player velocity.


Re: [Request] Anti-Speed MAX 3s, (350 km) +REP - .Skool_. - 18.04.2012

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
you can use:
pawn Код:
stock GetPlayerSpeed(playerid,bool:kmh) // by misco
{
  new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
  if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
  rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
  return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
to get player velocity.
but he picks up speed?