Police car sirens
#1

Hello, maybe somebody knows bug with police car. I am creating gamemode from scratch and when I enter police car and turn on the sirens it doesn't glowing, the police light object also not glowing, it's glowing only when you are in tunning shop. But when I copy my code of police light attaching to another gamemode everything okay.
Reply
#2

erm no its like that in default that they glow only during night / evening time.
Reply
#3

Any solution for that?
Reply
#4

You have to have SetWeather(2); thats the only way it works and

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION)) && IsPlayerInAnyVehicle(playerid))
    {
        if(!pLightStatus[playerid])
        {
            SendClientMessage(playerid, COLOR_GREEN, "(INFO) Emergency lighting activated.");
            pLightObject[playerid] = CreateObject(18646, 0, 0, 0, 0, 0, 0);
            AttachObjectToVehicle(pLightObject[playerid], GetPlayerVehicleID(playerid), -0.34, -0.17, 0.89,   -2.00, 0.00, 4.00);
            pLightStatus[playerid] = true;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREEN, "(INFO) Emergency lighting de-activated.");
            DestroyObject(pLightObject[playerid]);
            pLightStatus[playerid] = false;
        }
    }
    return 1;
}
pawn Код:
new bool:pLightStatus[MAX_PLAYERS];//global variable
new pLightObject[MAX_PLAYERS];//global variable
Press 2 for the light
Reply
#5

Okay, I'll try it soon and post the result here
Reply
#6

Thanks for vincee Everything works fine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)