/admins function
#4

new aDuty[MAX_PLAYERS]
new aHelper[MAX_PLAYERS]
rpn just get playername
Код:
CMD:admins(playerid, params[])
{
            new string[128];
	        new count = 0;
			SendClientMessage(playerid, COLOR_PURPLE, "|____________________Admins Online____________________|");
			{
			  if(aDuty[playerid] == 1)
			  {
				    if(PlayerInfo[playerid][pAdmin] >= 1)
				    {
						format(string, 256, "Administrator: - [Administrator: %s]",, RPN(playerid));
						SendClientMessage(playerid, COLOR_WHITE, string);
			  			count++;
					}
			   }
			}
			if(count == 0)
			{
				SendClientMessage(playerid, COLOR_WHITE, "[Error:] Currently no administrators");
			}
			SendClientMessage(playerid, COLOR_PURPLE, "______________________________________________________________________________________");
	    	return 1;
}
Код:
CMD:aduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(!aDuty[playerid])
	{
     	aDuty[playerid] = 1;
	}
	else
	{
		aDuty[playerid] = 0;
	}
	return 1;
}
REP ++ hope i helped u u can copy and paste the same thing twice switch aduty with aHelper the second time thats all PEACEMAN
Reply


Messages In This Thread
/admins function - by zionx08 - 23.09.2012, 05:15
Re: /admins function - by Passout - 23.09.2012, 05:29
Re: /admins function - by zionx08 - 23.09.2012, 05:39
Re: /admins function - by trapstar2020 - 23.09.2012, 06:36

Forum Jump:


Users browsing this thread: 1 Guest(s)