/admins :-o WTF???
#1

guys im using ladmin but in a prob

i tried the cmd /admins
but it didn't worked
nothing happened in ladmin no names of admins displaying
what should i do

im using gm GOLDEN SATDM

can someone please tell me how can i add /admins cmd to ladmin
Reply
#2

Check if you have /admins command in your script. If no then you have to make one.
Reply
#3

if you have an old godfather GM search CMD:admins the requiermemnts to see the admins list are backwards it is an easy fix
Reply
#4

it is not there what should i do now how do i make please tell me
Reply
#5

Then you need a /admins command.
Reply
#6

dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
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);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}

it is dcmd can u convert it to zcmd
Reply
#7

Use the CODE tag. Makes it easier to read.
Reply
#8

this is a simple one for IG admin lvls not rcon admins
Код:
CMD:admins(playerid, params[])
{
    SendClientMessageEx(playerid, COLOR_GRAD1, "Admins Online:");
    foreach(Player, i) {
        if(PlayerInfo[i][pAdmin] >= 2 && PlayerInfo[i][pAdmin] <= PlayerInfo[playerid][pAdmin]) {
            new string[128], sstring[128], rtoken;
            new strFromFile[128];
            new month, day, year;
            new playern[MAX_PLAYER_NAME];
            GetPlayerName(i, playern, sizeof(playern));
            getdate(year, month, day);
            format(sstring,sizeof(sstring),"admins/rtokens/%s[%d'%d'%d]",playern,month,day,year);
            if(fexist(sstring)) {
                new File: file = fopen(sstring, io_read);
                if(file) {
                    fread(file, strFromFile);
                    fclose(file);
                    rtoken = strval(strFromFile);
                }
            }
            if(PlayerInfo[playerid][pAdmin] >= 3) {
                //    fill in admin lvls and what to show other admins
                if(PlayerInfo[i][pAdmin] == 2) {
                    format(string, sizeof(string), "*Player Admin: %s (Reports Today: %d)", GetPlayerNameEx(i), rtoken);
//something like that
        }
			else {
//this sows for players
                if(PlayerInfo[i][pAdmin] == 2) {
                    format(string, sizeof(string), "*Admin: %s", GetPlayerNameEx(i));
///things like that make one for each admin lvl
             }
            if(PlayerInfo[i][pBanAppealer]) strcat(string, " [BA]");
            if(PlayerInfo[i][pShopTech]) strcat(string, " [ST]");
            if(PlayerInfo[i][pFactionModerator]) strcat(string, " [FMOD]");
            if(PlayerInfo[i][pGangModerator]) strcat(string, " [GMOD]");
            SendClientMessageEx(playerid, COLOR_GRAD2, string);
        }
    }
    SendClientMessageEx(playerid, COLOR_GRAD1, "If you have questions regarding gameplay, or the server use /newb.");
    SendClientMessageEx(playerid, COLOR_GRAD1, "If you see suspicious happenings/players /report [id] [reason].");
    return 1;
}
Reply
#9

sorry
this
Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
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);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
to this format

Код:
if (strcmp(cmdtext, "/admins", true)== 0
that in this format
Reply
#10

Next time use pawn tags to paste a code:
pawn Код:
CDM:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
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);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)