19.10.2009, 23:14
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_CROUCH)
{
new
Float:x,
Float:y,
Float:z;
GetVehiclePos(playerid, x, y, z);
SetVehiclePos(playerid, x, y, z + 10.0); //This thing ^doesnt do anything at all (suppose to be a superjump for cars)
}
if(newkeys == KEY_FIRE)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:s[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid),s[0],s[1],s[2]);
s[0]=1.5*s[0];
s[1]=1.5*s[1];
s[2]=1.5*s[2];
SetVehicleVelocity(GetPlayerVehicleID(playerid),s[0],s[1],s[2]); // This thing ^ only works if you are pressing alt with no other keys pressed.
}
return 1;
}
return 1;
}
any help?