15.08.2010, 20:22
i have a speedometer and i want to edit this filescript when a player reaches 80 km/h all cops recive a message with name a player and his speed?
well as i dont know to script of ur speedometer i cant help O.o |
Why don't you show use some code? Posts like 'Don't work' are not very informative.
WHAT doesn't work? Do you have errors? How did you code it? |
stock GetPlayerSpeed(playerid,bool:kmh)
{
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);
}