07.05.2015, 15:12
PHP код:
new veiculoid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
if ((newkeys & KEY_YES) && !(oldkeys & KEY_YES) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if (IsPlayerInAnyVehicle(playerid))
{
if(lights == VEHICLE_PARAMS_OFF)
{
SetVehicleParamsEx(veiculoid, engine, VEHICLE_PARAMS_ON, false, doors, bonnet, boot, objective);
GameTextForPlayer(playerid, "~w~farois ~b~~h~ligados~w~.", 1000, 5);
}
else
if(lights == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(veiculoid, engine, VEHICLE_PARAMS_OFF, false, doors, bonnet, boot, objective);
GameTextForPlayer(playerid, "~w~farois ~r~desligados~w~.", 1000, 5);
}
}
}