[pomoc] dijalog

Započeo sampzone, Maj 17, 2011, 15:14:09 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

mod koji ja korisitm: BU

problem: pokuso sam da napravim kada neko kuca /admini da mi pokaze u dijalogu ali nije mi uspjelo 10 puta sam pokusavo i nista ne izbaci.....sada bih vas molio da mi pomognete oko toga....pls

dio skripte: evo vam admin komanda moja:
if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/admini", true) == 0)
{
        if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_RED, " ");
        SendClientMessage(playerid, COLOR_RED, "-| Balkan Samp-Zone Admini |-");
foreach (Player, i)
{
    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1341 || PlayerInfo[i][pGm] >=1)
    {
    new admtext[64];
        if(PlayerInfo[i][pAdmin] == 1340) { admtext = "Vlasnik"; }
        else if(PlayerInfo[i][pAdmin] == 1339) { admtext = "Suvlasnik"; }
    else if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Skripter"; }
    else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Head Admin"; }
    else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Admin lvl 4"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Admin lvl 3"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Admin lvl 2"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Moderator"; }
else if(PlayerInfo[i][pGm] == 1) { admtext = "GameMaster"; }
else { admtext = "Gamemoderator"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 1)
{
    format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else if(GmDuty[i] == 1)
{
    format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
return 1;
}


slike:/

Hvala za pomoc unaprijed!

Probaj ovo....

if (strcmp(cmd, "/admins", true) == 0)
   {
        if(IsPlayerConnected(playerid))
       {
         SendClientMessage(playerid, COLOR_GRAD1, "Online Admins");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[pAdmin] == 1)
                {
                  if(OnDuty[playerid] == 1)
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 1: %s | On Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
                  else
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 1: %s | Off Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
               }
               if(PlayerInfo[pAdmin] == 2)
                   {
                  if(OnDuty[playerid] == 1)
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 2: %s | On Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
                  else
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 2: %s | Off Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
               }
               if(PlayerInfo[pAdmin] == 3)
                {
                  if(OnDuty[playerid] == 1)
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 3: %s | On Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
                  else
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 3: %s | Off Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
               }
                if(PlayerInfo[pAdmin] == 4)
                {
                  if(OnDuty[playerid] == 1)
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 4: %s | On Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
                  else
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 4: %s | Off Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
               }
               if(PlayerInfo[pAdmin] == 1337)
                {
                  if(OnDuty[playerid] == 1)
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 1337: %s | On Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
                  else
                  {
                     GetPlayerName(i, sendername, sizeof(sendername));
                     format(string, 256, "Admin lvl 1337: %s | Off Duty", sendername);
                     SendClientMessage(playerid, COLOR_RED, string);
                  }
               }
            }
         }
      }
      return 1;
   }

Meni netreba admin komanda meni treba da se online admini pokazu u dijalogu...

ali Hvala na trudu  :)

dao ti je komandu za online admine.

Uglavnom nesto neradi... a i treba mi u dialogu.. ali sam rekao momku hvala za trud  ;)

mozda nisi definiro COLOR_RED.. ja sam izprobo i radi i.. to jest za Online admine da se pokazu

ma nije to meni treba u dialogu.. a nije to problem nesto drugo..


evo greske..
C:\DOCUME~1\Brkovic\Desktop\BUMOD~1\GAMEMO~1\BALKAN~1.PWN(15898) : warning 219: local variable "health" shadows a variable at a preceding level
C:\DOCUME~1\Brkovic\Desktop\BUMOD~1\GAMEMO~1\BALKAN~1.PWN(36584) : error 032: array index out of bounds (variable "PlayerInfo")
C:\DOCUME~1\Brkovic\Desktop\BUMOD~1\GAMEMO~1\BALKAN~1.PWN(36599) : error 032: array index out of bounds (variable "PlayerInfo")
C:\DOCUME~1\Brkovic\Desktop\BUMOD~1\GAMEMO~1\BALKAN~1.PWN(36614) : error 032: array index out of bounds (variable "PlayerInfo")
C:\DOCUME~1\Brkovic\Desktop\BUMOD~1\GAMEMO~1\BALKAN~1.PWN(36629) : error 032: array index out of bounds (variable "PlayerInfo")
C:\DOCUME~1\Brkovic\Desktop\BUMOD~1\GAMEMO~1\BALKAN~1.PWN(36644) : error 032: array index out of bounds (variable "PlayerInfo")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.