SA-MP Forums Archive
Backupclear not work - 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: Backupclear not work (/showthread.php?tid=577296)



Backupclear not work - Sn4ke2 - 10.06.2015

Hi, all /backupclear not work. tell me "You are not a COP"
PHP код:
CMD:backupclear(playerid,params[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"Trebuie sa te loghezi mai intai.");
    if(
IsPlayerConnected(playerid))
    {
        if(
IsACop(playerid))
        {
            
BackupClear(playerid0);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WHITE"{ED2D20}You are not a Cop.");
        }
    }
    return 
1;

PHP код:
public IsACop(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
leader PlayerInfo[playerid][pLeader];
        new 
member PlayerInfo[playerid][pMember];
        if(
member==|| member==|| member==3)
        {
            return 
1;
        }
        else if(
leader==|| leader==|| leader==3)
        {
            return 
1;
        }
    }
    return 
0;




Re: Backupclear not work - Ghazal - 10.06.2015

Try
pawn Код:
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2   || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1  || PlayerInfo[playerid][pMember] == 2  || PlayerInfo[playerid][pMember] == 3)
instead of
pawn Код:
if(IsACop(playerid))



Re: Backupclear not work - Sn4ke2 - 10.06.2015

Thank you dude! + REP