Backupclear not work
#1

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;

Reply
#2

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

Thank you dude! + REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)