Flashing lights!
#1

Hey! I just wanted to ask if it's possible to make it so when a player unlocks his car, that it sets the car lights on then off immediately - just to add a little flash effect on the vehicle lights.

Here is the code.
PHP код:
CMD:lock(playeridparams[])
{
    new 
str[128], id GetNearestVehicle(playerid15.0);
     if(
id != INVALID_VEHICLE_ID)
     {
        if (
Vehicles[id][Owner] == Character[playerid][ID])
        {
            if(
Vehicles[id][Locked] == 0// IF IT ISNT LOCKED
            
{
                
SetVehicleParamsEx(idEngine[id], Lights[id], alarm[id], 1bonnet[id], boot[id], objective[id]);
                
doors[id] = 1;
                                
PlayerPlaySound(playerid10530.00.010.0);
                
GameTextForPlayer(playerid"LOCKED"20004);
                
// Lock the vehicle status
                
Vehicles[id][Locked] = 1;
            }
            else if (
Vehicles[id][Locked] == 1// IF IT IS LOCKED
            
{
                
SetVehicleParamsEx(idEngine[id], Lights[id], alarm[id], 0bonnet[id], boot[id], objective[id]);
                
doors[id] = 0;
                                 
PlayerPlaySound(playerid10520.00.010.0);
                
GameTextForPlayer(playerid"UNLOCKED"20004);
                                
// Vehicle lights flash here once
                // Unlock the vehicle status
                
Vehicles[id][Locked] = 0;
            }
        } 
Thank you.
Reply


Messages In This Thread
Flashing lights! - by aoky - 14.05.2017, 19:07
Re: Flashing lights! - by park4bmx - 14.05.2017, 21:54

Forum Jump:


Users browsing this thread: 1 Guest(s)