SA-MP Forums Archive
Admin class - 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: Admin class (/showthread.php?tid=427898)



Admin class - Lorenzosdm - 03.04.2013

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?


AW: Admin class - [AK]Nazgul - 03.04.2013

Where have you plsced the code?


Re: Admin class - Lorenzosdm - 03.04.2013

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


Re: Admin class - Lorenzosdm - 03.04.2013

nobody knows how?

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