I cannot make lights ON when it's daytime..
When is night it works with KEY_YES or CMD anyway, i make all right, but what i need to do ongamemodeinit?
PHP код:
new vehicle = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
if(lights == 1)
{
SetVehicleParamsEx(vehicle,engine,0,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,-1,"You've turned on the lights!");
}
else
{
SetVehicleParamsEx(vehicle,engine,1,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,-1,"You've turned off the lights!");
}