[HELP] cops recive message if people drive to fast - 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: [HELP] cops recive message if people drive to fast (
/showthread.php?tid=107669)
[HELP] cops recive message if people drive to fast -
darkhuman - 10.11.2009
i wanna make a script that if players drive to fast then the cops receive a Message that people are driving to fast.
i wanna know if that is posible to make and how.
i know its something with the GetPlayerSpeed but i cannot work with it.
can someone help me ?
Re: [HELP] cops recive message if people drive to fast -
Kurence - 10.11.2009
GetVehicleVelocity?
Re: [HELP] cops recive message if people drive to fast -
miokie - 10.11.2009
Or
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);
}
(Created By 'Misco')
Re: [HELP] cops recive message if people drive to fast -
darkhuman - 10.11.2009
but how to make it that its showing to cops ?
Re: [HELP] cops recive message if people drive to fast -
WrathOfGenesis - 10.11.2009
1. Use Miokie's GetPlayerSpeed to see what a players speed is
2. If its higher than X, loop through all players
3. if the player currently being looped is a cop, send a message
Re: [HELP] cops recive message if people drive to fast -
darkhuman - 10.11.2009
ok thanks