23.08.2011, 16:57
(
Last edited by Hoss; 24/08/2011 at 09:46 AM.
)
Hello
I want to make /admins with dialogs
But i got some problems,with doing it
This is original /admins cmd wiht no dialogs
and i tried to make it with dialogs,but when i am typing /admins IG i am gettin only 1 admin line
Please help me
I want to make /admins with dialogs
But i got some problems,with doing it
This is original /admins cmd wiht no dialogs
pawn Code:
dcmd_admins(playerid,params[])
{
#pragma unused params
new string[128],amt;
string = "Admins: ";
if(IsPlayerAdmin(playerid) || Variables[playerid][Level] > 12)
{
foreach(Player,i)
{
if(Variables[i][Level] < 12 && Variables[i][Level] > 0)
{
format(string,128,"%s %s(%d)",string,RealName[i],Variables[i][Level]);
amt++;
}
}
}
else
{
foreach(Player,i)
{
if(Variables[i][Level] < 12 && Variables[i][Level] > 0)
{
format(string,128,"%s %s",string,RealName[i]);
amt++;
}
}
}
if(amt > 0)return SendClientMessage(playerid,MAIN_COLOR_2,string);
else return SendClientMessage(playerid,MAIN_COLOR_2,"No admins online.");
}
pawn Code:
dcmd_admins(playerid,params[])
{
#pragma unused params
new string[256];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Variables[i][Level] >0 && Variables[i][Level] < 10)
{
format(string, sizeof(string), "{FF0000}ADMINISTRATOR: %s ID[%d]{15D4ED}[Level %d]\n", RealName[i],playerid, Variables[i][Level]);
ShowPlayerDialog(playerid, 5591, 0, "{1B1BE0}Online Admins:", string, "Done", "");
}
}
return 1;
}