Admin class
#1

I got 3 classes, one of them is for admins i want now that only admin can spawn with those classes..

I got this:

pawn Код:
{

    SetPlayerPos(playerid,1721.9789,-1654.0396,20.9688);
    SetPlayerInterior(playerid, 18);
    SetPlayerFacingAngle(playerid, 0.6991);
    SetPlayerCameraPos(playerid,1724.2712,-1650.4583,20.2291);
    SetPlayerCameraLookAt(playerid,1721.8770,-1654.8148,20.9688);

    switch(classid)
    {
   
    case 0,1:
    {
        GameTextForPlayer(playerid, "~r~CRAZY", 1500, 5);
        SetPlayerTeam(playerid, TEAM_CRAZY);
        gTeam[playerid] = TEAM_CRAZY;
       
        SetPlayerColor(playerid, TEAM_CRAZY_C);
    }
    case 2,3:
    {
        GameTextForPlayer(playerid, "~b~BEAST", 1500, 5);
        SetPlayerTeam(playerid, TEAM_BEAST);
        gTeam[playerid] = TEAM_BEAST;
        SetPlayerColor(playerid, TEAM_BEAST_C);
    }
    case 4,5:
    {
  if(PlayerInfo[playerid][pAdmin] >= 1)
  {
        GameTextForPlayer(playerid, "~y~ADMIN",1500, 5);
        SetPlayerTeam(playerid, TEAM_ADMIN);
        gTeam[playerid] = TEAM_ADMIN;
        SetPlayerColor(playerid, TEAM_ADMIN_C);
  }
  else GameTextForPlayer(playerid,"~r~You are not an admin!",3000,5);
    }
    }
    return 1;
}
so how can i make that only admins can spawn with the admin classes?
Reply
#2

Where have you plsced the code?
Reply
#3

pawn Код:
public OnPlayerRequestClass(playerid, classid)
sorry forgot to copy that to
Reply
#4

nobody knows how?

((sorry for double post, i need it really))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)