23.08.2012, 14:02
Hey i want make my admins command a dialog one so please help guys this is the code
CMD:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
Inter_SendClientMessage(playerid, green, " ");
Inter_SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
Inter_SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 2: {
AdmRank = "Moderator";
ChangeColor = Color_Moderator;
}
case 3: {
AdmRank = "Master Moderator";
ChangeColor = Color_Master_Moderator;
}
case 4: {
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
Inter_SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
Inter_SendClientMessage(playerid,red,"No admin online in the list");
Inter_SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
please dont tell me another one i just one this one please
CMD:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
Inter_SendClientMessage(playerid, green, " ");
Inter_SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
Inter_SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 2: {
AdmRank = "Moderator";
ChangeColor = Color_Moderator;
}
case 3: {
AdmRank = "Master Moderator";
ChangeColor = Color_Master_Moderator;
}
case 4: {
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
Inter_SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
Inter_SendClientMessage(playerid,red,"No admin online in the list");
Inter_SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
please dont tell me another one i just one this one please