13.01.2019, 12:49
(
Последний раз редактировалось Kevinas100; 13.01.2019 в 15:06.
)
PHP код:
if(newkeys == KEY_FIRE && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(masina.sviesos[vehicleid] == 0)
{
SetVehicleParamsEx(vehicleid, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
GameTextForPlayer(playerid,"~w~Ijungei ~y~sviesas",5000,6);
masina.sviesos[vehicleid] = 1;
}
else
{
SetVehicleParamsEx(vehicleid, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
GameTextForPlayer(playerid,"~w~Isjungei ~y~sviesas",5000,6);
masina.sviesos[vehicleid] = 0;
}
}
EDIT:
it works, but only shows if the lights are on when you exit the vehicle