25.09.2010, 13:30
(
Последний раз редактировалось Slice; 13.12.2011 в 13:54.
)
sup,
Basically, this will limit the vehicle max speed (per-player configuration). You can, for example, slow down the hydra or make fast boats.. not so fast. I believe it works with any vehicle.
I did this just as a test thing, but I figured some people here might find it useful so I made a simple FS for it.
How do I get started with this?
First off,
Try it on to see if it works. Load the filterscript, go ingame, and log in with /rcon login.
Now, use the testing command /myspeedcap to see if it works. An example of a value that feels like 50 km/h is 0.3.
So.. simply:
/myspeedcap 0.3
Put the macros below in your other scripts and do this for example:
Another example that enables speed cap only for the NRG:
Put this in other scripts so they can change the speed cap easily.
Download!
Download filterscript version: speedcap.pwn.
Download include version (by RealCop228): speedcap.inc. Note that it requires the latest version of YSI.
Video
I can't upload videos from where I'm at (well I could, but it would take a lifetime). It'd be cool if anyone could make a quick video that demonstrates this in a good way.
Basically, this will limit the vehicle max speed (per-player configuration). You can, for example, slow down the hydra or make fast boats.. not so fast. I believe it works with any vehicle.
I did this just as a test thing, but I figured some people here might find it useful so I made a simple FS for it.
How do I get started with this?
First off,
Try it on to see if it works. Load the filterscript, go ingame, and log in with /rcon login.
Now, use the testing command /myspeedcap to see if it works. An example of a value that feels like 50 km/h is 0.3.
So.. simply:
/myspeedcap 0.3
Put the macros below in your other scripts and do this for example:
pawn Код:
SetPlayerSpeedCap( playerid, 0.3 );
pawn Код:
public OnPlayerEnterVehicle( playerid, vehicleid, ispassenger )
{
new modelid = GetVehicleModel( vehicleid );
if ( modelid == 522 ) // 522 - NRG-500
SetPlayerSpeedCap( playerid, 0.4 );
else
DisablePlayerSpeedCap( playerid );
}
pawn Код:
#define SetPlayerSpeedCap(%0,%1) CallRemoteFunction( "SetPlayerSpeedCap", "if", %0, %1 )
#define DisablePlayerSpeedCap(%0) CallRemoteFunction( "DisablePlayerSpeedCap", "i", %0 )
Download filterscript version: speedcap.pwn.
Download include version (by RealCop228): speedcap.inc. Note that it requires the latest version of YSI.
Video
I can't upload videos from where I'm at (well I could, but it would take a lifetime). It'd be cool if anyone could make a quick video that demonstrates this in a good way.