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;
}
}
it still doesn't put on vehicle lights, what's wrong? the gametextforplayer and enums work, but not setvehicleparams ;/