Admins Team by User
#1

I searched every where,but I didn't found.I want to make that when I set player's adminlevel to 5 ,he can acces to admins team.

Код:
	if(gTeam[playerid] == TEAM_ADMINS )
	{
		if (IsPlayerAdmin(playerid))
		{
			ForceClassSelection(playerid);
			SetPlayerHealth(playerid, 0.0);
		}
	}
In here
Код:
if (IsPlayerAdmin(playerid))
how to change,that ?

I tried to change like: if (pAdminLevel = 5) XD,but it not works Xd
Reply
#2

IsPlayerAdmin() is for RCON administrators.

Can you show us your Player-Info enumeration.
Reply
#3

I addited registracion from tutorial.

Tutorial's file:

http://pastebin.com/Ygy5z1d8

Here is all script
Reply
#4

Something like this:
pawn Код:
if(PlayerInfo[playerid][pAdminLevel] >= 5)//if he's level 5 or more...
{
    return 1;
}
//if you want it for only level 5 admins change that '>=' sign to '=='
Reply
#5

Now all can acces to admins team XD .I getting these warnings :

Код:
C:\Users\bendra\Desktop\GnagZones\gamemodes\xLSTW.pwn(997) : warning 213: tag mismatch
C:\Users\bendra\Desktop\GnagZones\gamemodes\xLSTW.pwn(997) : warning 205: redundant code: constant expression is zero
Reply
#6

OMG!
Sorry, my code was totally wrong. I edited it and try it now.
Reply
#7

pawn Код:
if(PlayerInfo[playerid][pAdminLevel] >= 5)
Reply
#8

No,it still dies when I join to team. XD
Reply
#9

Ok,It works now

I made:

Код:
	if(gTeam[playerid] == TEAM_ADMINS )
	{
		if(PlayerInfo[playerid][pAdminLevel] == 0)
		{
			ForceClassSelection(playerid);
			SetPlayerHealth(playerid, 0.0);
		}
	}
That only admins with 1,2,3,4,5 level can acces this team.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)