Admins Team by User - 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: Admins Team by User (
/showthread.php?tid=221342)
Admins Team by User -
AqEeN - 05.02.2011
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
Re: Admins Team by User -
xRyder - 05.02.2011
IsPlayerAdmin() is for RCON administrators.
Can you show us your Player-Info enumeration.
Re: Admins Team by User -
AqEeN - 05.02.2011
I addited registracion from tutorial.
Tutorial's file:
http://pastebin.com/Ygy5z1d8
Here is all script
Re: Admins Team by User -
xRyder - 05.02.2011
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 '=='
Re: Admins Team by User -
AqEeN - 05.02.2011
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
Re: Admins Team by User -
xRyder - 05.02.2011
OMG!
Sorry, my code was totally wrong. I edited it and try it now.
Re: Admins Team by User -
MadeMan - 05.02.2011
pawn Код:
if(PlayerInfo[playerid][pAdminLevel] >= 5)
Re: Admins Team by User -
AqEeN - 05.02.2011
No,it still dies when I join to team. XD
Re: Admins Team by User -
AqEeN - 05.02.2011
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.