*** This topic title is not descriptive. - 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: *** This topic title is not descriptive. (
/showthread.php?tid=390601)
*** This topic title is not descriptive. -
Laure - 07.11.2012
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;
}
Re: Stock Help. -
Glad2BeHere - 07.11.2012
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;
}
Re: Stock Help. -
Laure - 07.11.2012
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;
}
Re: Stock Help. -
cosbraa - 07.11.2012
if(PlayerInfo[playerid][pFac] == 1)
You had 1 = sign?