IsPlayerXAdmin(playerid)) Problem
#1

I am using Xtreme Admin and I have this function in XtremeAdmin.inc:
pawn Code:
stock IsPlayerXAdmin(playerid) return (Variables[playerid][LoggedIn] && Variables[playerid][Level]) ? true:false;
This function works fine in the FilterScript. But I want to use it in my GameMode:
pawn Code:
#include "xadmin/XtremeAdmin.inc"
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        if(IsPlayerXAdmin(playerid))
        {
            SendClientMessage(playerid,orange,"You are an admin");
        }
        else
        {
            SendClientMessage(playerid,orange,"You are not an admin");
        }
        return 1;
    }
    return 0;
}
But the problem is, the game mode script doesn't recognise me as an admin. The filterscript works fine, but I wanna use this function in my Gamemode...
Reply


Messages In This Thread
IsPlayerXAdmin(playerid)) Problem - by Tigerbeast11 - 23.08.2011, 14:01
Re: IsPlayerXAdmin(playerid)) Problem - by Kingunit - 23.08.2011, 14:06
Re: IsPlayerXAdmin(playerid)) Problem - by Tigerbeast11 - 23.08.2011, 14:33
Re: IsPlayerXAdmin(playerid)) Problem - by =WoR=Varth - 24.08.2011, 07:26
Re: IsPlayerXAdmin(playerid)) Problem - by Tigerbeast11 - 24.08.2011, 08:49
Re: IsPlayerXAdmin(playerid)) Problem - by =WoR=Varth - 24.08.2011, 09:00
Re: IsPlayerXAdmin(playerid)) Problem - by Tigerbeast11 - 24.08.2011, 09:04

Forum Jump:


Users browsing this thread: 1 Guest(s)