SA-MP Forums Archive
/admins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /admins (/showthread.php?tid=158154)



/admins - Master™ - 08.07.2010

Ok, I have an /admins command i would like to change something but im not sure how??
Here it is:
Код:
if (strcmp(cmd, "/admins", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
			SendClientMessage(playerid, COLOR_RED, " ** Admins Online: **");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				    if(PlayerInfo[i][pAdmin] >= 1)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "|*| Admin: %s |*|", sendername);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
				}
			}
		}
		return 1;
	}
Well im owner and when someone does /admins i want it to show me as Owner: %s
instead of Admin: %s


things to add:
Owner: %s - my name "Luco_Corleone"
Co-Cowner: %s - his name "Anderson_Matthews"


Re: /admins - [HiC]TheKiller - 08.07.2010

pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
{
    new Pname[24];
    SendClientMessage(playerid, COLOR_RED, " ** Admins Online: **");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        GetPlayerName(i, Pname, 24);
        if(!strcmp(Pname, "Luco_Corleone", true)
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE,  "|*| Owner: Luco_Corleone |*|");
            continue;
        }
        if(!strcmp(Pname, "Anderson_Matthews", true)
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE,  "|*| Co-Owner: Anderson_Matthews |*|");
            continue;
        }
        if(IsPlayerConnected(i))
        {
           
            if(PlayerInfo[i][pAdmin] >= 1)
            {
                GetPlayerName(i, Pname, sizeof(Pname));
                format(string, 256, "|*| Admin: %s |*|", Pname);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            }
      }
      return 1;
}



Re: /admins - Master™ - 08.07.2010

Gives me errors