y it doesnt work? - 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: y it doesnt work? (
/showthread.php?tid=238229)
y it doesnt work? -
[ProX]BlueFire - 11.03.2011
y It Doesnt Work?
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_JUMP))
{
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 20.0);
}
return 1;
}
plz answer
Re: y it doesnt work? -
Hornet600 - 11.03.2011
What about test it them if it dont works and you cant fix it ask for help?
Re: y it doesnt work? -
Roomeo - 11.03.2011
he tested i guess
Re: y it doesnt work? -
HyperZ - 11.03.2011
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_JUMP)
{
new Float:Velocity[3];
GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
SetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2] + 20.0);
}
return 1;
}
Re: y it doesnt work? -
[ProX]BlueFire - 11.03.2011
it still doesnt work...
And YES
i tested it before....
Re: y it doesnt work? -
HyperZ - 11.03.2011
Quote:
Originally Posted by [ProX]BlueFire
it still doesnt work...
And YES
i tested it before....
|
Use this, This is working i've tested.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_JUMP)
{
new Float:Velocity[3];
GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
SetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2] + 20.0);
}
return 1;
}
Re: y it doesnt work? -
Sasino97 - 11.03.2011
Quote:
Originally Posted by [ProX]BlueFire
y It Doesnt Work?
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_JUMP))
{
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 20.0);
}
return 1;
}
plz answer 
|
Strange it doesn't work, because I got a GM that use KEY_JUMP to set player's Z + 40
Re: y it doesnt work? -
[ProX]BlueFire - 11.03.2011
k works thx =D