27.11.2010, 02:28
(
Последний раз редактировалось Kitten; 13.08.2013 в 00:38.
)
------
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (!IsPlayerInAnyVehicle(playerid))
{
if (newkeys & KEY_JUMP)
{
new
Float: fVehX,
Float: fVehY,
Float: fVehZ
;
GetPlayerVelocity(playerid, fVehX, fVehY, fVehZ);
if (fVehZ == 0.0)
{
SetPlayerVelocity(playerid, fVehX, fVehY, 0.5);
}
}
}
return 1;
}
im not using it for a car but i made one but i failed gives me errors
pawn Код:
|
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(gTeam[playerid] != TEAM_HUNTER)
{
if ( PRESSED ( KEY_JUMP ) )
{
new Float:X1 , Float:Y1 , Float:Z1 ;
GetPlayerVelocity ( playerid, Float:X1, Float:Y1, Float:Z1 );
SetPlayerVelocity ( playerid, X1, Y1, 0.5 );
}
}
return 1;
}
SetPlayerVelocity ( playerid, X1, Y1, Z1+0.5 );
how about
pawn Код:
|
C:\Users\GM\Desktop\SA-MP\gamemodes\hvsz.pwn(141) : error 029: invalid expression, assumed zero C:\Users\GM\Desktop\SA-MP\gamemodes\hvsz.pwn(141) : warning 215: expression has no effect C:\Users\GM\Desktop\SA-MP\gamemodes\hvsz.pwn(141) : error 001: expected token: ";", but found ")" C:\Users\GM\Desktop\SA-MP\gamemodes\hvsz.pwn(141) : error 029: invalid expression, assumed zero C:\Users\GM\Desktop\SA-MP\gamemodes\hvsz.pwn(141) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(gTeam[playerid] != TEAM_HUNTER)
{
if ( PRESSED ( KEY_JUMP ) )
{
new Float:X1 , Float:Y1 , Float:Z1 ;
GetPlayerVelocity ( playerid, X1, Y1, Z1 );
SetPlayerVelocity ( playerid, X1, Y1, Z1 + 0.5 );
}
}
return 1;
}
pawn Код:
|
if(gTeam[playerid] != TEAM_HUNTER)