Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: aXXo on Aug 01, 2015, 01:37 PM

Title: [Snippet] Longjump
Post by: aXXo on Aug 01, 2015, 01:37 PM
While trying to add player's speed as a drug effect, I realized that player.Speed only works when a player is not colliding against anything. It only works when a player is in mid-air. As soon as you touch the ground(or any other collision), the speed changes to default as per GTA:VC physics.

Speedhacks did not become a reality, but here is a snippet that makes the player jump higher. This is very inconsistent in a crowded server due to performance issues, but the code and the idea can be implemented.

Code
Pastebin (http://pastebin.com/SxdcdFUY)

Usage
To enable a player's longjump, create an instance of the CLongjump class. Parameter: player instance.
Example:
function onPlayerSpawn( player )
{
     local pLongjump = CLongjump( player );
}