Hunter Jump - 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)
+--- Thread: Hunter Jump (
/showthread.php?tid=476834)
Hunter Jump -
samp_boy - 20.11.2013
Hi Guys How Are You
look i need a help i'm looking for a High Jump Ability Like Hunter On Left 4 Dead
Thanks
Re: Hunter Jump - Patrick - 20.11.2013
This maybe inaccurate but this code help you, if you press SHIFT it will increase the player Position X & Z by 3(Edit if it's too high/low)
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK)
{
new Float:Coordinates[4];
GetPlayerPos(playerid, Coordinates[0], Coordinates[1], Coordinates[2]), GetPlayerFacingAngle(playerid, Coordinates[3]);
SetPlayerPos(playerid, Coordinates[0]+3, Coordinates[1], Coordinates[2]+3); //increasing the Coordinate 'Z' by 3 | increase the Coordinate 'X' by 3
SetPlayerFacingAngle(playerid, Coordinates[3]);
}
return true;
}
Re: Hunter Jump -
whando - 20.11.2013
Just edit the gravity
.
Код:
if(strcmp(cmd, "/setgravity", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 6) //edit to your admin level.
{
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SyntaxMessage(playerid, "/setgravity [number]");
return 1;
}
new Float:grav;
grav = floatstr(tmp);
SetGravity(grav);
SendClientMessage(playerid, GREY, "Gravity has been set for everyone.");
}
return 1;
}
Re: Hunter Jump -
RayDcosta - 20.11.2013
if its for all players you can login as rcon and edit the gravity, else try that command bound to SHIFT
Re: Hunter Jump -
samp_boy - 22.11.2013
Alright Thanks Guys
Re: Hunter Jump -
samp_boy - 22.11.2013
i got it:
Код:
new Float:x,Float:y,Float:z;
GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
SetPlayerVelocity(playerid,Float:x*2.0,Float:y*1.0,Float:z+0.8* 1.2);