Same faction as me - 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: Same faction as me (
/showthread.php?tid=332591)
Same faction as me -
AlXx - 08.04.2012
How can i do the check as if the other player is in the same faction as me?
Right now i have this thing, but i doesnt work.
pawn Код:
if(PlayerInfo[id][pFraks] == PlayerInfo[playerid][pFraks]) return SendClientMessage(playerid, -1, "See mдngija ei ole sinu fraktsioonist");
Re: Same faction as me -
Kindred - 08.04.2012
Did you define ID? It looks like it would work.
Re: Same faction as me -
AlXx - 08.04.2012
pawn Код:
new id,string[186];
if(sscanf(params,"ui",id)) return SendClientMessage(playerid,0x00FF00FF,"Kasutus: /vallanda <mдngijaid>");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,0x00FF00FF,"Selline mдngija puudub.");
if(PlayerInfo[playerid][pLiider] > 1) return SendClientMessage(playerid, -1, "Sa ei ole liider");
if(PlayerInfo[playerid][pLiider] == PlayerInfo[id][pFraks]) return SendClientMessage(playerid, -1, "See kasutaja ei ole sinu fraktsioonist");
This ise the whole code, what should i change?