SA-MP Forums Archive
[HELP]I need car jump script - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]I need car jump script (/showthread.php?tid=155625)



[HELP]I need car jump script - OmarEco - 19.06.2010

in server Awesome stuntages 87.98.254.97:7778
there is car jump by press + or 2 i need this script for my server 217.139.199.10:7777


Re: [HELP]I need car jump script - OmarEco - 19.06.2010

help me


Re: [HELP]I need car jump script - Flashy - 19.06.2010

You must use functions.

GetPlayerPos and SetPlayerPos next.
Learn to use it on SAMP Wiki.


Re: [HELP]I need car jump script - OmarEco - 20.06.2010

can you learn me how


Re: [HELP]I need car jump script - OmarEco - 21.06.2010

can any bode make one for me



Re: [HELP]I need car jump script - Hiddos - 21.06.2010

GetVehicleVelocity(vehicle,x,y,z);
SetVehicleVelocity(vehicle,x,y,z+2);


Re: [HELP]I need car jump script - OmarEco - 21.06.2010

Quote:
Originally Posted by Hiddos
GetVehicleVelocity(vehicle,x,y,z);
SetVehicleVelocity(vehicle,x,y,z+2);
ok but where i pase that


Re: [HELP]I need car jump script - artex91 - 21.06.2010

Read this: http://forum.sa-mp.com/index.php?topic=177667.0


Re: [HELP]I need car jump script - DJDhan - 21.06.2010

Quote:
Originally Posted by omarhassan
Quote:
Originally Posted by Hiddos
GetVehicleVelocity(vehicle,x,y,z);
SetVehicleVelocity(vehicle,x,y,z+2);
ok but where i pase that
Under OnPlayerKeyStateChange.



Re: [HELP]I need car jump script - Niixie - 21.06.2010

Its very basic Omarhassan.
Heres what i found on the wiki page, and made a few changes.

Код:
//Top of script
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_SUBMISSION))
	{
        new Float:x, Float:y, Float:z;
        if(IsPlayerInAnyVehicle(playerid))
        {
			GetVehicleVelocity(vehicle,x,y,z);
            SetVehicleVelocity(vehicle,x,y,z+2);
		}
		else
		{
			GetPlayerVelocity(playerid, x, y, z);
            SetPlayerVelocity(playerid, x, y, z + 2.0);
        }
	}
	return 1;
}
There, if you are on foot, you get 2 meters up in the air. if you are in car, you get 2 meters up in the air.