SA-MP Forums Archive
OMG Not working car flash lights - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OMG Not working car flash lights (/showthread.php?tid=354462)



OMG Not working car flash lights - PaulDinam - 26.06.2012

I tried to make a check if he is in LSPD or in a vehicle but nothing... it just starting to flash..


CODE:

Код:
if(strcmp(cmd, "/lightsflash", true) ==0 || strcmp(cmd, "/lf", true) ==0)
		{
		if ((gTeam[playerid]) == 1)
		{
			if(!IsPlayerInAnyVehicle(playerid)) 
			{
				SendClientMessage(playerid, 0xFF0000FF, "You must be inside a vehicle!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] != 1 && PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2)
			{
			SendClientMessage(playerid, COLOR_GREY, "    You are not a policeman/fbi!");
			}
                new vehicleid = GetPlayerVehicleID(playerid);
				new panels,doors,lights,tires;
                GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
				Flasher[vehicleid] = 1;
		}
		return 1;
	}



Re: OMG Not working car flash lights - Robert_Crawford - 26.06.2012

pawn Код:
Flasher[vehicleid] = 1;
I do not belive there is a native function in samp for flashing lights. So therefore you need a function do you have one?


Re: OMG Not working car flash lights - PaulDinam - 26.06.2012

new Flasher[MAX_VEHICLES];

but the command is right?


Re: OMG Not working car flash lights - [KHK]Khalid - 26.06.2012

As far as I understood how your command supposed to work
pawn Код:
if(strcmp(cmd, "/lightsflash", true) ==0 || strcmp(cmd, "/lf", true) ==0)
{
    if ((gTeam[playerid]) == 1)
    {
        if(!IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid, 0xFF0000FF, "You must be inside a vehicle!");
            return 1;
        }
        if(PlayerInfo[playerid][pLeader] != 1 && PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2)
        {
            SendClientMessage(playerid, COLOR_GREY, "    You are not a policeman/fbi!");
            return 1;
        }
        new vehicleid = GetPlayerVehicleID(playerid);
        new panels,doors,lights,tires;
        GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
        Flasher[vehicleid] = 1;
    }
    return 1;
}



Re: OMG Not working car flash lights - PaulDinam - 26.06.2012

still the same..
if im not in vehicle it doesn't show the message


Re: OMG Not working car flash lights - [KHK]Khalid - 26.06.2012

You mean this message, "You must be inside a vehicle!"? Hmm maybe your team id wasn't 1? I mean:

pawn Код:
// this part, maybe your gTeam was not 1

if ((gTeam[playerid]) == 1)



Re: OMG Not working car flash lights - PaulDinam - 26.06.2012

i tried without this..
but it must show if im not inside avehicle


Re: OMG Not working car flash lights - Makaveli93 - 26.06.2012

I don't know, but maybe try replacing your color code? Try with
Код:
0xFFFFFFAA



Re: OMG Not working car flash lights - PaulDinam - 26.06.2012

tried.


Re: OMG Not working car flash lights - Makaveli93 - 26.06.2012

Check if you duplicated the command somewhere. Or if you're running any filterscripts.