10.08.2009, 16:51
Try this:
I don't think &= is an operator, and I also added a ! to stop you needing the { } bit.
Note: You'll need to put in the values, you had 2 for the playerid for some reason.
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(!IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)) //if the player ISN'T in the area
{
if(IsPlayerInAnyVehicle(playerid)) //if the player is in a vehicle
{
if(newkeys & 4)
{
new Float:ZAngle,Float:X,Float:Y,Float:Z,vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid,X,Y,Z);
GetVehicleZAngle(vehicleid,ZAngle);
SetVehicleZAngle(vehicleid,ZAngle);
SetVehiclePos(vehicleid,X,Y,Z+2);
}
}
}
return 1;
}
Note: You'll need to put in the values, you had 2 for the playerid for some reason.