Simple issue....
#1

pawn Код:
if(Faction[playerid] != 1 || 2 || 3)return SendClientMessage(playerid, COLOUR_GREY, "You cannot use this.");
This doesnt work correctly, I set myself to faction 1.... returned the client message... What should it be?
Reply
#2

pawn Код:
if(Faction[playerid] != 1 || 2 || 3) { return SendClientMessage(playerid, COLOUR_GREY, "You cannot use this."); }
Reply
#3

Код:
if(Faction[playerid]<1 || Faction[playerid]>3) return SendClientMessage(playerid, COLOUR_GREY, "You cannot use this.");
Reply
#4

Quote:
Originally Posted by Babul
Посмотреть сообщение
Код:
if(Faction[playerid]<1 || Faction[playerid]>3) return SendClientMessage(playerid, COLOUR_GREY, "You cannot use this.");
Won't work. If you read his code he also didn't want Faction[playerid] 2 to use it.
Reply
#5

if(Faction[playerid] !=1 || Faction[playerid] != 3) return error msg

not tested

faction 1 and 3 dont get (error msg)
Reply
#6

Quote:
Originally Posted by GamingTurf
Посмотреть сообщение
Won't work. If you read his code he also didn't want Faction[playerid] 2 to use it.
2 isn't less than 1 or higher than 3 - it will work fine.
Reply
#7

-forum bug caused double post-
Reply
#8

If you want your code to work, you have to 'recheck' the faction id like:
pawn Код:
if(Faction[playerid] != 1 || Faction[playerid] != 2 || Faction[playerid] != 3)return SendClientMessage(playerid, COLOUR_GREY, "You cannot use this.");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)