Admin System Help
#1

Hi Firends.How To Set This? Just Message To Admin Level 10 ?
This is code :
Код:
MessageToAdmins(COLOR_GREY,string);print(string);}
And This is My Admini LEvel 10

if(Account[playerid][pAdminlevel] == 10)
Reply
#2

Show the complete function 'MessageToAdmins'
Reply
#3

pawn Код:
CMD:a(playerid, params[])
{
    new string[128];
    if(Account[playerid][pAdminlevel] == 10)

    if(isnull(params)) return SendClientMessage(playerid, ADMIN_ACTION,"•• /a [ text ].");

    for(new j = 0; j < MAX_PLAYERS; j++) {
        if(IsPlayerConnected(j) && Account[j][pAdminlevel] == 10) {
        format(string, sizeof(string), "Admin Chat %s (id: %d): %s", Player[playerid][name], playerid, params);
        SendClientMessage(j, 0x00F3FFFF, string);
        }
    }
    return true;
}
There you go when using a cmd /a it will send all the admins the text the admin wants...
/a [Text]
Reply
#4

This is :
Код:
if(Options[Readcmds]==1){
	  GetPlayerName(playerid,name,sizeof(name));
	  format(string, sizeof(string), LanguageText[38],name,playerid,cmdtext);
	  if(Account[playerid][pAdminlevel] == 10)
	  {
      	MessageToAdmins(COLOR_GREY,string);print(string);}
	  }
I Put This But Not Working
Reply
#5

Some thing like that will work under onplayertext
Код:
	if(text[0] == '#' && Account[playerid][pAdminlevel] == 10)
	{
	    new string[128]; GetPlayerName(playerid,string,sizeof(string));
		format(string,sizeof(string),"Admin Chat: %s(%d): %s",string,playerid,text[1]);
		MessageToAdmins(green,string);
		#if ADM_CHAT_LOG == true
		SaveIn("AdmChatLog",string);
		#endif
	    return 0;
	}
_________________
Deal for 1 day! Hosted Tab for 7 $ !! contact : MahdiAsali at skype
Server Test: 37.142.239.201:8888
~~~~
xXx Stunt Paradise Awesome

Server IP: Click Here!

Hosted Tab Game-MP for 10 Euro / per month
Hosted Tab + Server host 50 slots + Control Panel for 15 Euro
Skype: MahdiAsali
Ђ10 Euro for Hosted List
Reply
#6

Код:
public ChannelAdmin(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if (pInfo[i][Admin] >= 1)
		{
			SendClientMessage(i, color, string);
		}
	}
	return 1;
}
This should work, just change the admin level.
Reply
#7

Just made you this , will work

pawn Код:
forward MessageToAdmins(color,const string[]);
        public MessageToAdmins(color,const string[])
            {
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))if(Account[i][pAdminlevel] == 10)
                {
                SendClientMessage(i, color, string);
                print(string);
                }
            }
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)