Simple issue.... - 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: Simple issue.... (
/showthread.php?tid=303483)
Simple issue.... -
Dokins - 13.12.2011
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?
Re: Simple issue.... -
GamingTurf - 13.12.2011
pawn Код:
if(Faction[playerid] != 1 || 2 || 3) { return SendClientMessage(playerid, COLOUR_GREY, "You cannot use this."); }
Re: Simple issue.... -
Babul - 13.12.2011
Код:
if(Faction[playerid]<1 || Faction[playerid]>3) return SendClientMessage(playerid, COLOUR_GREY, "You cannot use this.");
Re: Simple issue.... -
GamingTurf - 13.12.2011
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.
Re: Simple issue.... -
Tigerkiller - 13.12.2011
if(Faction[playerid] !=1 || Faction[playerid] != 3) return error msg
not tested
faction 1 and 3 dont get (error msg)
Re: Simple issue.... -
MP2 - 13.12.2011
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.
Re: Simple issue.... -
MP2 - 13.12.2011
-forum bug caused double post-
Re: Simple issue.... -
antonio112 - 13.12.2011
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.");