Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //By UltraScripter ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //By UltraScripter ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- #if defined _SpeedCapture_included
- #endinput
- #define _SpeedCapture_included
- #endif
- /*
- native GetVehicleSpeed(vehicleid);
- native CaptureSpeed(playerid, vehicleid, Float:limit, bill, message[], color);
- */
- new Float:xvsx;
- new Float:yvsy;
- new Float:zvsz;
- new SpeedCaptureddd[MAX_PLAYERS];
- stock GetVehicleSpeed(vehicleid)
- {
- GetVehicleVelocity(vehicleid, xvsx, yvsy, zvsz);
- return floatround(floatsqroot(floatpower(xvsx, 2) + floatpower(yvsy, 2) + floatpower(zvsz, 2))*180.000, floatround_round);
- }
- stock CaptureSpeed(playerid, vehicleid, Float:limit, money, message[], color)
- {
- if(SpeedCaptureddd[playerid] == 1) return 0;
- else if(SpeedCaptureddd[playerid] == 0)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(GetVehicleSpeed(vehicleid) >= limit)
- {
- SendClientMessage(playerid, color, message);
- GivePlayerMoney(playerid, money);
- SpeedCaptureddd[playerid] = 1;
- SetTimerEx("LowerSpeedCapturedVar", 5000, false, "i", playerid);
- }
- }
- }
- return 1;
- }
- forward LowerSpeedCapturedVar(playerid);
- public LowerSpeedCapturedVar(playerid)
- {
- SpeedCaptureddd[playerid] = 0;
- return 1;
- }
- //By UltraScripter ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //By UltraScripter ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment