How can I set speed limit?
#1

Hey, I wonder how can I set a speed limit for certain vehicles, so they wont go faster then 10 mph.
Reply
#2

Setting that on vehicles will just piss people off in my opinion, however..if you wanna do it for bicycles or what ever... https://sampwiki.blast.hk/wiki/SetVehicleVelocity

Use that with your speed system, so if the vehicle speed is greater than 10 MPH, set it to 10.

your speed system will look something like this
pawn Код:
GetVehicleVelocity(GetPlayerVehicleID(playerid), svx[playerid], svy[playerid], svz[playerid]);
    s10[playerid] = floatsqroot(((svx[playerid]*svx[playerid])+(svy[playerid]*svy[playerid]))+(svz[playerid]*svz[playerid]))*100;
    s2[playerid] = floatround(s10[playerid],floatround_round);
    format(s3[playerid],32,"%i", s2[playerid]);
    PlayerTextDrawSetString(playerid, Dash5, s3[playerid]);
Reply
#3

I appreciate the help mate, but I didn't quite get it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)