admin class problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: admin class problem (
/showthread.php?tid=249359)
admin class problem -
jonnyboy - 18.04.2011
Heya!
I got a problem here. im trying to make the admin class but i always doing it wrong
pawn Код:
if(GetPlayerTeam(playerid) == TEAM_ADMIN)
{
SetPlayerPos(playerid,2127.6040,2371.3657,10.5461);
SetPlayerHealth(playerid,100);
}
else if(!TEAM_ADMIN && PlayerInfo[playerid][AdminLevel] == 0)
{
GameTextForPlayer(playerid,"~w~YOU CANNOT USE THIS CLASS~n~YOU ARE NOT ADMIN~n~ ~b~GO PLAY SOME MORE",5000,3);
return 1;
}
did i do something wrong
when i spawn as JonnyBoy_2 (non admin) i can join the admin class and if i take JonnyBoy (real one) it works also
can some one tell me what i did wrong
Re: admin class problem -
AntiGen - 18.04.2011
Add this line:
Код:
if(!TEAM_ADMIN && PlayerInfo[playerid][AdminLevel] == 0)
{
GameTextForPlayer(playerid,"~w~YOU CANNOT USE THIS CLASS~n~YOU ARE NOT ADMIN~n~ ~b~GO PLAY SOME MORE",5000,3);
return 1;
}
On, Public OnPlayerRequestSpawn
Re: admin class problem -
jonnyboy - 18.04.2011
Quote:
Originally Posted by AntiGen
Add this line:
Код:
if(!TEAM_ADMIN && PlayerInfo[playerid][AdminLevel] == 0)
{
GameTextForPlayer(playerid,"~w~YOU CANNOT USE THIS CLASS~n~YOU ARE NOT ADMIN~n~ ~b~GO PLAY SOME MORE",5000,3);
return 1;
}
On, Public OnPlayerRequestSpawn
|
didn't work

(