Admin level/ranks - 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 level/ranks (
/showthread.php?tid=600487)
Admin level/ranks -
CSLangdale - 08.02.2016
Can someone tell me please how to change the chats so instead of Level 4 admin it says head admin?
Re: Admin level/ranks -
Joron - 08.02.2016
U mean make ranks?
Re: Admin level/ranks -
JamalMaddox - 08.02.2016
Just search level 4 admin and replace it with Head Admin. You also can admin color in chats ands admin commands like orange.
Re: Admin level/ranks -
CSLangdale - 08.02.2016
Код:
if (strcmp("/admins", cmdtext, true, 10) == 0)
{
new count, bool:online, string[128], AdminRank[70], name[24];
for(new i,g=GetMaxPlayers(); i < g; i++)
{
if(IsPlayerConnected(i))
{
if(1 <= pAdminLevel[i]/*<<<Change this var to yours*/ <= 99999)
{
online = true;
switch(pAdminLevel[i]) /*Change this var to yours*/
{
case 1: AdminRank = "Moderator";
case 2: AdminRank = "Junior Admin";
case 3: AdminRank = "General Admin";
case 4: AdminRank = "Senior Admin";
case 1337: AdminRank = "Head Admin";
case 1338: AdminRank = "Scripter";
case 1339: AdminRank = "Head Scripter";
case 99998: AdminRank = "Co-Owner";
case 99999: AdminRank = "Owner";
}
GetPlayerName(i, name, sizeof(name));
format(string,sizeof(string), "%s %s [%s],",string, name, AdminRank);
count++;
if(count == 4)
{
format(string,sizeof(string),"Admins: %s",string);
SendClientMessage(playerid, -1, string);
string = "";
count = 0;
}
}
}
}
if(count)
{
format(string,sizeof(string),"Admins: %s",string);
SendClientMessage(playerid, -1, string);
}
if(!online) SendClientMessage(playerid, -1,"No Admin online in the list.");
return 1;
}
i did try this and i get like 4 errors from it
i tried changing "level 4 admin" like you said but thats not in the script
Re: Admin level/ranks -
CSLangdale - 08.02.2016
Код:
if (strcmp(cmd, "/admins", true) ==0 )
{
new count = 0;
SendClientMessage(playerid, COLOR_BLUE, "----------[Online Staff Team]-----------");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 0)
{
format(string, 256, "Admin %s (id: %d) - Off duty.", GetPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
{
format(string, 256, "Admin %s (id: %d) - On duty.", GetPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
count++;
}
if(PlayerInfo[i][pModerator] >= 1 && AdminDuty[i] == 0)
{
format(string, 256, "Moderator %s (id: %d) - Off duty.", GetPlayerNameEx(i), i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
if(PlayerInfo[i][pModerator] >= 1 && AdminDuty[i] == 1)
{
format(string, 256, "Moderator %s (id: %d) - On duty.", GetPlayerNameEx(i), i);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"They're not staff members online.");
}
SendClientMessage(playerid, COLOR_BLUE, "----------------------------------------");
return 1;
}
This is what /admin code i have in the script at the moment
Re: Admin level/ranks -
Prokill911 - 08.02.2016
So create a function which stores the admins name according to rank.
Re: Admin level/ranks -
Joron - 08.02.2016
Delete This... nvrm