message to admins (fs help)
#1

http://forum.sa-mp.com/showthread.ph...94#post3785894

i want an help with making it to admins only, is it possible? can you please help me, i dont exactly know how can i do that..
Reply
#2

Код:
stock SendToAdmins(color, message[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i))
        {
            SendClientMessage(i, color, message);
        }
    }
    return 1;
}
Reply
#3

I don't know what are you saying but maybe you mean a MessageToAdmins. Here it is:

Код:
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][Level] >= 1) SendClientMessage(i, color, string);
	}
	return 1;
}
Here's an Example how to do it with string a message to admins..


Код:
new string[256];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pname));
format(string,sizeof(string), "Hello, i'm Very good player how are you ? I'm also good ! ~by %s.", pName );
MessageToAdmins(COLOR_ORANGE,string);
That's it !


Just a simple message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)