Can this be changed please, Thanks! - 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: Can this be changed please, Thanks! (
/showthread.php?tid=291190)
Can this be changed please, Thanks! -
seanny - 18.10.2011
NEVERMIND, I never explained it well, Moderator Delete this Post!
Hello, I am still a noob at Scripting and I need this changed, If I get it changed and I read the Lines then it will help me learn And Then Next Time, I'll Make one on my own
Let me explain
Here is an Example Code
pawn Code:
format(string, 256, "[ONLINE]: %s (%s): %s [ID: %d] (on duty)", admtext, PlayerInfo[i][pAdmName], sendername, i);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
Here is my Piece of Code:
PS: I want so that Admins with pSpecOps are NOT shown on the list
pawn Code:
if(strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Admins Online:");
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] > 0)
{
if(PlayerInfo[i][pAdmin] <= PlayerInfo[playerid][pAdmin])
{
//----------------------------------------------
new division[64];
if(PlayerInfo[i][pSpecOps] == 1)
{
division = "SO";
}
else if(PlayerInfo[i][pBanAppealer] == 1)
{
division = "BA";
}
else if(PlayerInfo[i][pGangMod] == 1)
{
division = "GM";
}
else if(PlayerInfo[i][pGangMod] == 0 && PlayerInfo[i][pBanAppealer] == 0 && PlayerInfo[i][pSpecOps] == 0)
{
division = "None";
}
//----------------------------------------------
new atext[64];
if(PlayerInfo[i][pAdmin] == 1)
{
atext = "Moderator";
}
else if(PlayerInfo[i][pAdmin] == 2)
{
atext = "Junior Admin";
}
else if(PlayerInfo[i][pAdmin] == 3)
{
atext = "General Admin";
}
else if(PlayerInfo[i][pAdmin] == 4)
{
atext = "Senior Admin";
}
else if(PlayerInfo[i][pAdmin] == 1337)
{
atext = "Head Admin";
}
else if(PlayerInfo[i][pAdmin] == 1338)
{
atext = "Head Admin";
}
else if(PlayerInfo[i][pAdmin] == 99999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 9999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 99999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 999999999)
{
atext = "Executive Admin";
}
format(string, sizeof(string), "[%s]: %s *[%s]*", atext, PlayerName(i), division);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "If you have questions regarding gameplay, or the server use /new.");
SendClientMessage(playerid, COLOR_GRAD2, "If you see suspicious happenings/players /report [id] [reason].");
}
}
return 1;
}
Re: Can this be changed please, Thanks! -
Hiddos - 18.10.2011
This is for not showing 'iSpecOps' people. Search for the line with the comment behind it.
pawn Code:
if(strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Admins Online:");
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] > 0)
{
if(PlayerInfo[i][pAdmin] <= PlayerInfo[playerid][pAdmin])
{
if(PlayerInfo[i][pSpecOps] == 1) continue; // Continue means that it'll skip this loop 'number', so instead of doing like 1, 2, 3, it'll do 1, 3. For Example
//----------------------------------------------
new division[64];
else if(PlayerInfo[i][pBanAppealer] == 1)
{
division = "BA";
}
else if(PlayerInfo[i][pGangMod] == 1)
{
division = "GM";
}
else if(PlayerInfo[i][pGangMod] == 0 && PlayerInfo[i][pBanAppealer] == 0 && PlayerInfo[i][pSpecOps] == 0)
{
division = "None";
}
//----------------------------------------------
new atext[64];
if(PlayerInfo[i][pAdmin] == 1)
{
atext = "Moderator";
}
else if(PlayerInfo[i][pAdmin] == 2)
{
atext = "Junior Admin";
}
else if(PlayerInfo[i][pAdmin] == 3)
{
atext = "General Admin";
}
else if(PlayerInfo[i][pAdmin] == 4)
{
atext = "Senior Admin";
}
else if(PlayerInfo[i][pAdmin] == 1337)
{
atext = "Head Admin";
}
else if(PlayerInfo[i][pAdmin] == 1338)
{
atext = "Head Admin";
}
else if(PlayerInfo[i][pAdmin] == 99999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 9999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 99999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 999999999)
{
atext = "Executive Admin";
}
format(string, sizeof(string), "[%s]: %s *[%s]*", atext, PlayerName(i), division);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "If you have questions regarding gameplay, or the server use /new.");
SendClientMessage(playerid, COLOR_GRAD2, "If you see suspicious happenings/players /report [id] [reason].");
}
}
return 1;
}
Anything else you need help with? Don't be afraid of not being able to explain things well, a lot of people aren't able to (I'm one of those people).