15.02.2013, 08:18
I need to combine commands together, but I have no idea how to start
I was /e to be associated with /eo is that when /e is used it will start the car, and if /e is used again, it will stop it
/e
/eo
And I have been stumped on this for an hour
Can someone make it so that when using the following /hotwire script you CAN NOT turn the vehicle off?
I was /e to be associated with /eo is that when /e is used it will start the car, and if /e is used again, it will stop it
/e
Код:
CMD:e(playerid, params[]) { if(GetPlayerState(playerid) == 2) { new vehicle = GetPlayerVehicleID(playerid); if(Engine[vehicle] == 0) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); Engine[vehicle] = 1; SetVehicleParamsEx(vehicle, 1, lights, alarm, doors, bonnet, boot, 0); } } else return SendClientMessage(playerid, GREY, "You can't start a started car."); SendClientMessage(playerid, COLOR_YELLOW, "Use /eo to turn the engine off."); return 1; }
Код:
CMD:eo(playerid, params[]) { #pragma unused params if(GetPlayerState(playerid) == 2) { new vehicle = GetPlayerVehicleID(playerid); if(Engine[vehicle] == 1) { new engine, lights, alarm, doors, bonnet, boot, objective; Engine[vehicle] = 0; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicle, 0, lights, alarm, doors, bonnet, boot, 0); } else return SendClientMessage(playerid, GREY, "This vehicle's engine is already off."); } else return SendClientMessage(playerid, GREY, "You must be in the drivers seat of a vehicle."); return 1; }
Can someone make it so that when using the following /hotwire script you CAN NOT turn the vehicle off?
Код:
CMD:hotwire(playerid, params[]) { if(GetPlayerState(playerid) == 2) { new vehicle = GetPlayerVehicleID(playerid); if(Engine[vehicle] == 0) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); Engine[vehicle] = 1; SetVehicleParamsEx(vehicle, 1, lights, alarm, doors, bonnet, boot, 0); } } else return SendClientMessage(playerid, GREY, "You can't start a started car."); SendClientMessage(playerid, COLOR_YELLOW, "Use /eo to turn the engine off."); return 1; }