29.01.2018, 13:53
The manual vehicle and lights is not used, but the lights are still turning on when its darker or smth. I got the same cmd for the engine, but it works correctly.
Код:
CMD:svetla(playerid,params[])
{
new string[128];
new engine,lights,alarm,doors,bonnet,boot,objective;
if(IsPlayerInAnyVehicle(playerid))
{
if(Lights[playerid] == 0)
{
format(string, sizeof(string), "%s turns the lights on", RemoveUnderScore(playerid));
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 10.0, 5000);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_INFO, "[!]{FFFFFF} You turned the lights on");
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, 1 , alarm , doors, bonnet, boot, objective);
Lights[playerid] = 1;
}
else
{
format(string, sizeof(string), "%s turns the lights off.", RemoveUnderScore(playerid));
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 10.0, 5000);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_INFO, "[!]{FFFFFF} You turned off the lights");
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , bonnet , boot , objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , 0 , alarm , doors , bonnet , boot , objective);
Lights[playerid] = 0;
}
}
return 1;
}


