/engine command
#3

Try this, not tested though.
pawn Код:
if(!strcmp(cmdtext, "/engine", true)) {
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You are not in any vehicle.")
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "You need to be the driver.");
    new veh = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
    if(engine) SetVehicleParamsEx(veh, 0, lights, alarm, doors, bonnet, boot, objective);
    else SetVehicleParamsEx(veh, 1, lights, alarm, doors, bonnet, boot, objective);
    return 1;
}
Reply


Messages In This Thread
/engine command - by nmader - 16.02.2012, 23:09
Re: /engine command - by [Diablo] - 16.02.2012, 23:16
Re: /engine command - by Toreno - 16.02.2012, 23:20

Forum Jump:


Users browsing this thread: 1 Guest(s)