OMG Not working car flash lights
#1

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;
	}
Reply
#2

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?
Reply
#3

new Flasher[MAX_VEHICLES];

but the command is right?
Reply
#4

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;
}
Reply
#5

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

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)
Reply
#7

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

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

tried.
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)