[Include] SpeedCapture - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] SpeedCapture (
/showthread.php?tid=578953)
SpeedCapture -
UltraScripter - 23.06.2015
Hi everyone i created new include that gets vehicle speed if the player is over the speed limit or not
hare some example how to use
pawn Код:
//Usage:
CaptureSpeed(playerid, vehicleid, Float:limit, money, message[], color);
GetVehicleSpeed(vehicleid);
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInRangeOfPoint(playerid, 40.0, 2048.4485, 1233.3395, 10.4040))
{
CaptureSpeed(playerid, vehicleid, 100, -200, "You drive more than 100 kmh -$200!.", 0xFF0000FF);
}
you also can get vehicle speed
pawn Код:
new Str[256], vehicleid = GetPlayerVehicleID(playerid);
format(Str, 256, "Kmh %i", GetVehicleSpeed(vehicleid));
SendClientMessage(playerid, -1, Str);
Solidifles link:
http://www.solidfiles.com/d/e00320538b/
pastebin link:
http://pastebin.com/QgabeHkk
Re: Speecapture -
LazyB0y - 23.06.2015
Nice!
Re: Speecapture -
UltraScripter - 23.06.2015
thank you
Re: SpeedCapture -
Jakwob - 23.06.2015
Nice work mate
Re: SpeedCapture -
Crayder - 23.06.2015
Add a new optional param to GetVehicleSpeed to toggle MPH.
pawn Код:
GetVehicleSpeed(vehicleid, bool:mph = false)
{
//CURRENT CODE
if(mph)
speed * 0.621371;
//RETURN SPEED
}
Re: SpeedCapture -
ZaBraNjeNi - 24.06.2015
Nice bro. Very useful!
Thank you.
Re: SpeedCapture -
UltraScripter - 24.06.2015
thank you all
and Crayder thx for the suggestion
Re: SpeedCapture -
kyriakos587 - 24.06.2015
Nice!
Re: SpeedCapture -
UltraScripter - 24.06.2015
thx mate
Re: SpeedCapture -
Private200 - 25.06.2015
Well, if you gonna take the player money from the function, if there's server anti-money-cheat then the player will get banned. So, you either remove that function or you just warn the player that something like that might happen.