02.01.2013, 19:22
Hello I was wondering if anyone knew how to script and engine on off command that works good for a rp server
COMMAND:engineon(playerid, params[])
{
new vehicleid, engine,lights,alarm,doors,bonnet,boot,objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
return 1;
}
COMMAND:engineoff(playerid, params[])
{
new vehicleid, engine,lights,alarm,doors,bonnet,boot,objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
return 1;
}
I've made one without any checking.
pawn Код:
|
ManualVehicleEngineAndLights();