Help with a /engine command.
#7

pawn Код:
CMD:engine(playerid, params[])
{
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
    new variables[7], vehicleid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vehicleid, variables[0], variables[1], variables[2], variables[3], variables[4], variables[5], variables[6]);
    if(variables[0] != VEHICLE_PARAMS_ON)
    {
        SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, variables[1], variables[2], variables[3], variables[4], variables[5], variables[6]);
    }
    else
    {
        SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, variables[1], variables[2], variables[3], variables[4], variables[5], variables[6]);
    }
    return 1;
}
Next time use WIKI to read all about function
Vehicle parameters have 3 states

#define VEHICLE_PARAMS_UNSET -1
#define VEHICLE_PARAMS_OFF 0
#define VEHICLE_PARAMS_ON 1
Reply


Messages In This Thread
Help with a /engine command. - by GrimR - 20.09.2011, 08:48
Re: Help with a /engine command. - by Wesley221 - 20.09.2011, 09:19
Re: Help with a /engine command. - by GrimR - 20.09.2011, 09:46
Re: Help with a /engine command. - by Wesley221 - 20.09.2011, 09:47
Re: Help with a /engine command. - by Basicz - 20.09.2011, 10:01
Re: Help with a /engine command. - by GrimR - 20.09.2011, 10:04
Re: Help with a /engine command. - by DRIFT_HUNTER - 20.09.2011, 10:40
Re: Help with a /engine command. - by GrimR - 20.09.2011, 10:56

Forum Jump:


Users browsing this thread: 1 Guest(s)