16.02.2013, 01:07
So I have tried almost everything, but I cant get this command to start a vehicle, but not turn it off
If someone could make it so that will turn on the engine, that would be great because it is not working.
Also, could someone make it is this command /e is only doable if you own the vehicle? I use AdvancedVehicleSystem, and I CAN NOT get it to work.
Thank you SA:MP community, you're awesome.
Код:
CMD:hotwire(playerid, params[]) { if(GetPlayerState(playerid) != 2)return SendClientMessage(playerid, GREY, "You must be a driver to use this command."); new vehicle = GetPlayerVehicleID(playerid); if(Engine[vehicle] == 1) { 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); HotWired[vehicle] = 1; SendClientMessage(playerid, GREY, "Now you can't turn off your car?"); } return 1; }
Also, could someone make it is this command /e is only doable if you own the vehicle? I use AdvancedVehicleSystem, and I CAN NOT get it to work.
Код:
CMD:e(playerid, params[]) { if(GetPlayerState(playerid) != 2)return SendClientMessage(playerid, GREY, "You can't start a started car."); 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 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); } return 1; }