03.04.2013, 17:36
I got 3 classes, one of them is for admins i want now that only admin can spawn with those classes..
I got this:
so how can i make that only admins can spawn with the admin 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;
}