Please help me with this bit of script
#8

Try this:

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;
}
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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)