SA-MP Forums Archive
Faction Help command/line - 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: Faction Help command/line (/showthread.php?tid=451894)



Faction Help command/line - Pk93 - 19.07.2013

Hello I wud like to have help with my issesue i have with this command / Line

this is the original working one..

Код:
    if(PlayerInfo[playerid][pFaction] != LSPD) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction");
but i want to make it for FBI faction To and i was thinking like this but didnt work tho (iam not a scripter)
Код:
    if(PlayerInfo[playerid][pFaction] != LSPD != FBI) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction");
Here is the error i get
Код:
warning 213: tag mismatch
Help please


Re: Faction Help command/line - PrinceKumar - 19.07.2013

Try this first
pawn Код:
if(PlayerInfo[playerid][pFaction] != LSPD || !=FBI) return SCM(playerid, COLOR_LIGHTRED,"Invalid faction");
if it doesn't work so use this it will work properly
pawn Код:
if(PlayerInfo[playerid][pFaction] != LSPD || PlayerInfo[playerid][pFaction ]!=FBI) return SCM(playerid, COLOR_LIGHTRED,"Invalid faction");



Re: Faction Help command/line - Elie1996 - 19.07.2013

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
pawn Код:
if(PlayerInfo[playerid][pFaction] != LSPD || PlayerInfo[playerid][pFaction ]!=FBI) return SCM(playerid, COLOR_LIGHTRED,"Invalid faction");
This code is right, if though you want it to check whether he's Not LSPD OR FBI
If you want him Not to be either of them then use this:
pawn Код:
if(PlayerInfo[playerid][pFaction] != LSPD && PlayerInfo[playerid][pFaction ]!=FBI) return SCM(playerid, COLOR_LIGHTRED,"Invalid faction");



Re: Faction Help command/line - morocco - 19.07.2013

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
Try this first
pawn Код:
if(PlayerInfo[playerid][pFaction] != LSPD || !=FBI) return SCM(playerid, COLOR_LIGHTRED,"Invalid faction");
if it doesn't work so use this it will work properly
pawn Код:
if(PlayerInfo[playerid][pFaction] != LSPD || PlayerInfo[playerid][pFaction ]!=FBI) return SCM(playerid, COLOR_LIGHTRED,"Invalid faction");
Quote:
Originally Posted by Elie1996
Посмотреть сообщение
This code is right, if though you want it to check whether he's Not LSPD OR FBI
If you want him Not to be either of them then use this:
pawn Код:
if(PlayerInfo[playerid][pFaction] != LSPD && PlayerInfo[playerid][pFaction ]!=FBI) return SCM(playerid, COLOR_LIGHTRED,"Invalid faction");


Nice !!

but say to him " How " !

Pk93
try !




Re: Faction Help command/line - Pk93 - 19.07.2013

Thanks alot all of you!!


Re: Faction Help command/line - Pk93 - 19.07.2013

the same goes with this ?

the script should look like this ?

original
Код:
if(!CopDuty{playerid}) return SCM(playerid, COLOR_LIGHTRED, "You must be on duty.");
Edited one
Код:
 if(faction != LSPD) || (faction != FBI) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");