Need Help of Admin System! -
MAFIAWARS - 21.09.2013
Hello Friends! I am really working hard to find or create the Admin Levels and the Command /admins to See the Online Admins But Always I failed
Can any one give me the Admin Levels Script and CMD of /admins to Show the Online Admins?
Re: Need Help of Admin System! -
MAFIAWARS - 21.09.2013
Please Help me! I am waiting.
Re: Need Help of Admin System! -
Konstantinos - 21.09.2013
Read the rules. It's against the rules to bump your threads every 20 minutes.. That's why most users avoid to reply to those threads.
Re: Need Help of Admin System! -
Vanter - 21.09.2013
can you please search before posting?
Re: Need Help of Admin System! -
MAFIAWARS - 21.09.2013
I already did. But couldn't find any useful Topic.
Re: Need Help of Admin System! -
Tom Kingston - 21.09.2013
Ugh, here
pawn Код:
CMD:admins(playerid, params[])
{
new string[256], pname[MAX_PLAYER_NAME];
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string), "%s - %d", pname, PlayerInfo[i][pAdmin]);
}
}
SendClientMessage(playerid, 0xAAAAAA, string);
return 1;
}
Re: Need Help of Admin System! -
Areax - 21.09.2013
First of all, you will need a register/login system! Here is a nice tutorial Click
Click!
And Then:
pawn Код:
CMD:admins(playerid, params[])
{
new count = 0, string[256];
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] == 1)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 1", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 2)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 2", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 3)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 3", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 4)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 4", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 5)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 5", string, GetName(i), i);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, "- No Admins Online at Time!");
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
}
return 1;
}
You will need ZCMD for that!
Re: Need Help of Admin System! -
MAFIAWARS - 21.09.2013
Thank you Areax, But I am finding these Errors:
PHP код:
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : warning 215: expression has no effect
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : error 001: expected token: ";", but found "]"
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : error 029: invalid expression, assumed zero
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: Need Help of Admin System! -
MAFIAWARS - 21.09.2013
And 678 is this Line:
PHP код:
if(PlayerInfo[i][pAdmin] == 1)
Re: Need Help of Admin System! -
Konstantinos - 21.09.2013
pawn Код:
CMD:admins( playerid, params[ ] )
{
new
count,
string[ 256 ]
;
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( !IsPlayerConnected( i ) ) continue;
if( PlayerInfo[ i ][ pAdmin ] > 0 )
{
new
temp[ 64 ],
name_[ MAX_PLAYER_NAME ]
;
GetPlayerName( i, name_, MAX_PLAYER_NAME );
format( temp, sizeof( temp ), "%s(%d) - Admin Level %d\n", name_, i, PlayerInfo[ i ][ pAdmin ] );
strcat( string, temp );
count++;
}
}
if(count == 0) SendClientMessage( playerid, 0xFF0000FF, "No Admins Online" );
else ShowPlayerDialog( playerid, 365, DIALOG_STYLE_MSGBOX, "Admin List", string, "Close", "" );
return 1;
}
Replace:
to what you use for the admin level.