How to create /admins - 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: How to create /admins (
/showthread.php?tid=326692)
How to create /admins -
HighPitchedVoice - 18.03.2012
I don't really get it because it always gives me errors, can someone make it for me??
Re: How to create /admins -
Shabi RoxX - 18.03.2012
What do you mean by /admins ? What this commnd will do ?
May be show your codes that you tried :
Re: How to create /admins -
niyaz - 18.03.2012
You can check on the filterscript section or script your and if there are errors please show us the errors
Re: How to create /admins -
Laronic - 18.03.2012
pawn Код:
COMMAND:admins(playerid, params[])
{
new count = 1, name[24], string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s%s\n", string, name);
count ++;
}
}
if(count != 1)
{
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "Online Admins", string, "OK", "");
}
else ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "[!] Online Admins", "No online admins", "OK", "");
}
Re: How to create /admins -
Spooky - 18.03.2012
pawn Код:
CMD:admins(playerid, params[])
{
new name[MAX_PLAYER_NAME], string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i);
{
if(IsPlayerAdmin(i);
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string),"%s", name);
SendClientMessage(playerid, -1, string);
}
}
}
return 1;
}
I think you need this right?
Re: How to create /admins -
James Coral - 18.03.2012
i useing that system
pawn Код:
dcmd_admins(playerid, params[])
{
#pragma unused params
new pname[MAX_PLAYER_NAME];
new string[128];
new admins = 0;
new admtext[64];
SendClientMessage(playerid,COLOR_BLUE,"-----------------------Administrators Online-------------------------");
for(new i = 0; i < MAX_PLAYERS; i++){
if (IsPlayerConnected(i)){
if(AdminLevel[playerid] >= 1) { admtext = "Moderator"; }
if(AdminLevel[playerid] >= 2) { admtext = "Global Moderator"; }
if(AdminLevel[playerid] >= 3) { admtext = "Administrator"; }
if(AdminLevel[playerid] >= 4) { admtext = "Operative Administrator"; }
if(AdminLevel[playerid] >= 5) { admtext = "Head Administrator"; }
if(AdminLevel[playerid] >= 6) { admtext = "Junior Administrator"; }
if(AdminLevel[playerid] >= 1336) { admtext = "Tester/Developer"; }
if(AdminLevel[playerid] >= 1337) { admtext = "Trusted Admin"; }
if(AdminLevel[playerid] >= 1338) { admtext = "Server Owner"; }
GetPlayerName(i, pname, 24);
format(string,sizeof string,"%s - %s", pname,admtext);
SendClientMessage(playerid,-1,string);
admins++;
}
}
if(admins == 0){
SendClientMessage(playerid, COLOR_WHITE, "Currently there are no admins online.");
}
return 1;//This Command is for SAN FIERRO COPS AND ROBBERS
}