/admins problems
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	  if (strcmp(cmdtext, "/admins", true) == 0)
 	   {
 	   if(IsPlayerConnected(playerid))
	      {
	        SendClientMessage(playerid, COLOR_WHITE, " ");
	        SendClientMessage(playerid, COLOR_WHITE, "{FF0000}||~||..::Las Ventures Role Play Admins::..||~||");
	        for(new i = 0; i < MAX_PLAYERS; i++)
	            {
	                if(IsPlayerConnected(i))
	                {
		                  if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 7)
		                  {
		                    new admtext[64];
		                    new string[128];
		                    if(PlayerInfo[i][pAdmin] == 6) { admtext = "Owner"; }
		                    else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
		                 	else if(PlayerInfo[i][pAdmin] == 4) { admtext = "High Administrator"; }
		                    else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Administrator"; }
		                    else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Junior Administrator"; }
		                    else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Administrator"; }
		                    else { admtext = "Moderator"; }
		                    GetPlayerName(i, sendername, sizeof(sendername));
		                    if(AdminDuty[i] == 0)
		                    {
		                    format(string, 256, "%s ( %s )", sendername, admtext);
		                    SendClientMessage(playerid, COLOR_WHITE, string);
		                    }
		                    else
		                    {
		                    format(string, 256, "{FF0000}%s ( %s )", sendername, admtext);
		                    SendClientMessage(playerid, COLOR_WHITE, string);
                    		}
                          }
		     }
                }
       	  }
          return 1;
   	  }
	return 0;
}
here's the warning

C:\Documents and Settings\InitialUser\My Documents\Downloads\samp03csvr_R2-2_win32\gamemodes\LVRP.pwn(185) : warning 217: loose indentation
C:\Documents and Settings\InitialUser\My Documents\Downloads\samp03csvr_R2-2_win32\gamemodes\LVRP.pwn(187) : warning 217: loose indentation
Reply
#2

WHere is the 185 and 187 Line ? in this code I can't see
Reply
#3

Quote:
Originally Posted by CrisTany
Посмотреть сообщение
WHere is the 185 and 187 Line ? in this code I can't see
Oh sorry

185 - return1;
187 - return0;
Reply
#4

anyone? :S
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/admins", true) == 0) {
        if(IsPlayerConnected(playerid)) {
            SendClientMessage(playerid, COLOR_WHITE, " ");
            SendClientMessage(playerid, COLOR_WHITE, "{FF0000}||~||..::Las Ventures Role Play Admins::..||~||");
            for(new i = 0; i < MAX_PLAYERS; i++) {
                if(IsPlayerConnected(i)) {
                    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 7) {
                        new admtext[64];
                        new string[128];
                        if(PlayerInfo[i][pAdmin] == 6) { admtext = "Owner"; }
                        else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
                        else if(PlayerInfo[i][pAdmin] == 4) { admtext = "High Administrator"; }
                        else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Administrator"; }
                        else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Junior Administrator"; }
                        else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Administrator"; }
                        else { admtext = "Moderator"; }
                        GetPlayerName(i, sendername, sizeof(sendername));
                        if(AdminDuty[i] == 0) {
                            format(string, 256, "%s ( %s )", sendername, admtext);
                            SendClientMessage(playerid, COLOR_WHITE, string);
                        }
                        else {
                            format(string, 256, "{FF0000}%s ( %s )", sendername, admtext);
                            SendClientMessage(playerid, COLOR_WHITE, string);
                        }
                    }
                }
            }
        }
        return 1;
    }
    return 0;
}
Reply
#6

thanks pal worked DD yay ty
Reply
#7

Код:
if (strcmp(cmdtext, "/admins", true) == 0)
 	   {
 	   if(IsPlayerConnected(playerid))
	      {
	        SendClientMessage(playerid, COLOR_WHITE, " ");
	        SendClientMessage(playerid, COLOR_WHITE, "{FF0000}||~||..::Las Ventures Role Play Admins::..||~||");
	        for(new i = 0; i < MAX_PLAYERS; i++)
	            {
	                if(IsPlayerConnected(i))
	                {
		                  if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 7)
		                  {
		                    new admtext[64];
		                    new string[128];
		                    if(PlayerInfo[i][pAdmin] == 6) { admtext = "Owner"; }
		                    else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
		                 	else if(PlayerInfo[i][pAdmin] == 4) { admtext = "High Administrator"; }
		                    else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Administrator"; }
		                    else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Junior Administrator"; }
		                    else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Administrator"; }
		                    else { admtext = "Moderator"; }
		                    GetPlayerName(i, sendername, sizeof(sendername));
		                    if(AdminDuty[i] == 0)
		                    {
		                    format(string, 256, "%s ( %s )", sendername, admtext);
		                    SendClientMessage(playerid, COLOR_WHITE, string);
		                    }
		                    else
		                    {
		                    format(string, 256, "{FF0000}%s ( %s )", sendername, admtext);
		                    SendClientMessage(playerid, COLOR_WHITE, string);
                    		}
                          }
		     }
                }
       	  }
         return 1;
        }
 return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)