*** This topic title is not descriptive.
#1

Hey all, I wanted to add leo factions into my script as i have only PD as it.But the cmds of Leo can be only used by PD, which i want to make available to other LEO factions which i add, in all of the LEO cmds to figure out wheather players a cop or not IsACop is used so i want to make the LEO factions i make fall in the IsACop.Heres the stock.PD is fac 1.As you can see below.
Код:
stock IsACop(playerid)
{
	if(PlayerInfo[playerid][pFac] = 1) return 1;
	return 0;
}
Reply
#2

u should add something new like, so any player in certain factions ftype will b 1 and will be a cop
PHP код:
pFType(faction type
pawn Код:
stock IsACop(playerid)
{
    if(PlayerInfo[playerid][pFType] = 1) return 1;
    return 0;
}
or u can use "or"
pawn Код:
stock IsACop(playerid)
{
    if(PlayerInfo[playerid][pFac] = 1||PlayerInfo[playerid][pFac] = 2) return 1;
    return 0;
}
Reply
#3

Thank you helped me i used the or method but was needed to be something like this or i got errors.
Код:
stock IsACop(playerid)
{
    if(PlayerInfo[playerid][pFac] == 1 || PlayerInfo[playerid][pFac] == 2) return 1;
    return 0;
}
Reply
#4

if(PlayerInfo[playerid][pFac] == 1)
You had 1 = sign?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)