Admin Skin
#1

I am having problems creating a skin only for admins to use.

Here are the codes I have so far.

I have this under GameModeInit
pawn Код:
//Adminstator Skin
    AddPlayerClass(294,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1); // Adminstators Skin
I then have this further down my script.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    GetPlayerSkin(playerid);
    if(IsPlayerAdmin(playerid))
    {
          if(classid == 294)
          {
        SendClientMessage(playerid, 0xB60000FF, "Welcome Admin");
     }
     else
     {
        GameTextForPlayer(playerid, "You aren't an Admin!", 5000, 5);
        return 0;
   }
}
    SetupPlayerForClassSelection(playerid);
    return 1;
}
It all compiles correctly but when I go in-game to test it, the skin doesnt say Welcome Admin when we select it and anybody can select it, I only want admins to be able to use it.

Thanks.
Reply


Messages In This Thread
Admin Skin - by G*Mafia - 26.04.2011, 13:57
Re: Admin Skin - by Scenario - 26.04.2011, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)