[Include] SpeedCapture
#1

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
Reply
#2

Nice!
Reply
#3

thank you
Reply
#4

Nice work mate
Reply
#5

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
}
Reply
#6

Nice bro. Very useful!
Thank you.
Reply
#7

thank you all
and Crayder thx for the suggestion
Reply
#8

Nice!
Reply
#9

thx mate
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)