Faction Help command/line
#1

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

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");
Reply
#3

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");
Reply
#4

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 !

Reply
#5

Thanks alot all of you!!
Reply
#6

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.");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)