22.05.2015, 14:08
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
if(newstate == PLAYER_STATE_DRIVER) {
new motor, farois, alarme, portas, capo, mala, objetivo;
GetVehicleParamsEx(GetPlayerVehicleID(playerid), motor, farois, alarme, portas, capo, mala, objetivo);
switch(GetVehicleModel(GetPlayerVehicleID(playerid))) {
case 509, 510, 481: SetVehicleParamsEx(GetPlayerVehicleID(playerid), true, farois, alarme, portas, capo, mala, objetivo);
default: SetVehicleParamsEx(GetPlayerVehicleID(playerid), false, farois, alarme, portas, capo, mala, objetivo);
}
return 1;
}
}
PHP код:
ManualVehicleEngineAndLights();
PHP код:
public OnPlayerExitVehicle(playerid, vehicleid) {
new motor, farois, alarme, capo, mala, portas, objetivo;
GetVehicleParamsEx(vehicleid, motor, farois, alarme, capo, mala, portas, objetivo);
SetVehicleParamsEx(vehicleid, false, farois, alarme, capo, mala, portas, objetivo);
return 1;
}