Szerző Téma: LADMIN  (Megtekintve 1055 alkalommal)

LADMIN
« Dátum: 2010. augusztus 31. - 14:55:07 »
0 Show voters
Üdv, ezt a függvényt ki szeretném venni a Ladminból hogy ne legyen /admins parancs.
 
dcmd_admins(playerid,params[]) {
    #pragma unused params
new Count[2], i, string[128];
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
if(PlayerInfo[Level] > 0) Count[0]++;
if(IsPlayerAdmin(i)) Count[1]++;
}
    #if defined HIDE_ADMINS
if(PlayerInfo[playerid][Level] == 0) {
if(Count[0] >= 1) {
   format(string, sizeof(string), \"There are %d Administrators online. Use /report <id> <reason> if you suspect a player of cheating\", Count[0]);
   return SendClientMessage(playerid, blue, string);
} else return SendClientMessage(playerid, blue, \"No Administrators online\");
}
#endif
if( (Count[0] == 0 && Count[1] == 0) || (Count[0] == 0 && Count[1] >= 1 && PlayerInfo[playerid][Level] == 0) ) return SendClientMessage(playerid, blue, \"No Administrators online\");
if(Count[0] == 1) {
    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] > 0) {
   format(string, sizeof(string), \"Adminok és munkások: (%d)%s [%d]\", i, PlayerName2(i), PlayerInfo[Level] ); SendClientMessage(playerid, blue, string);
}
}
if(Count[0] > 1) {
    new x; format(string, sizeof(string), \"Adminok és munkások: \");
    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] > 0)
{
   format(string,sizeof(string),\"%s(%d)%s [%d]\",string,i,PlayerName2(i),PlayerInfo[Level]);
   x++;
   if(x >= 5) {
       SendClientMessage(playerid, blue, string); format(string, sizeof(string), \"Adminok és munkások: \"); x = 0;
   }
   else format(string, sizeof(string), \"%s,  \", string);
    }
if(x <= 4 && x > 0) {
   string[strlen(string)-3] = \'.\';
    SendClientMessage(playerid, blue, string);
}
}
if( (Count[1] == 1) && (PlayerInfo[playerid][Level] > 0) ) {
    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)) {
   format(string, sizeof(string), \"Fõadminok: (%d)%s\", i, PlayerName2(i)); SendClientMessage(playerid, COLOR_WHITE, string);
}
}
if(Count[1] > 1) {
   new x; format(string, sizeof(string), \"Fõadminok: \");
    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
   format(string,sizeof(string),\"%s(%d)%s\",string,i,PlayerName2(i));
   x++;
   if(x >= 5) {
      SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), \"Fõadminok: \"); x = 0;
   }
   else format(string, sizeof(string), \"%s,  \", string);
    }
if(x <= 4 && x > 0) {
   string[strlen(string)-3] = \'.\';
    SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1;
}

 
De ha kiveszem:
: error 017: undefined symbol \"dcmd_admins\"

 
Mindez a ladminba

Nem elérhető nyE

  • 1745
    • Profil megtekintése
LADMIN
« Válasz #1 Dátum: 2010. augusztus 31. - 14:59:50 »
0 Show voters
Az OnPlayerCommandedText alatt is kikell törölni.
4500 sor kb.
De amúgy van egy olyan fefináció hogy \"hide admins\" a 25. sorban.

LADMIN
« Válasz #2 Dátum: 2010. augusztus 31. - 15:06:37 »
0 Show voters
Azt a definíciót ha definálom akkor nem lesz /admins? Mert a modomba sajátot írtam.

LADMIN
« Válasz #3 Dátum: 2010. augusztus 31. - 15:37:29 »
0 Show voters
Kitöröltem nincs hiba a pawnoba, de felborul a rend. Az 1 es admin is tudja amit a 10 es.... Máshogy kellene megoldani.

LADMIN
« Válasz #4 Dátum: 2010. augusztus 31. - 21:20:21 »
0 Show voters
Ha definiálod hogy HIDE_ADMINS a mod elején,akkor kiirja,hogy hány admin van a szerveren de a nevüket nem sorolja fel.

LADMIN
« Válasz #5 Dátum: 2010. szeptember 01. - 17:46:28 »
0 Show voters
ha van még egy admins parancsod akkor azt a /jeleset nevezd át pl /adminok -ra és akkor ezzel nem kell szórakozni  :)

Nem elérhető BeNiBoY

  • 1342
    • Profil megtekintése
LADMIN
« Válasz #6 Dátum: 2010. szeptember 01. - 18:54:59 »
0 Show voters
Idézetet írta: Szilord date=1283355988\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"3077\" data-ipsquote-contentclass=\"forums_Topic
ha van még egy admins parancsod
 
ezt emg hogy érted? xD 2db /admins? xD

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal