Definition of SendAdminMessage
#1

Hello all SA-MP Pawners and Scripter, i've a little question that i need to get the #definition of SendAdminMessage.

For example:
PHP код:
SendAdminMessage(COLOR_REDstring); 
Error:
Код HTML:
Undefined Symbole: SendAdminMessage.
Reply
#2

Create a stock for it which will send a message only to administrators!
Reply
#3

Create a function named SendAdminMessage where you loop through your admins and send them a message
Reply
#4

But a Function like, Can get an example?
Reply
#5

SendAdminMessage(color, string[])
{
for new I = 0, j = GetPlayerPoolSize(); I < j; I++;
If isplayeradmin send client message
}

(Writing from my iPad, sorry)
Reply
#6

pawn Код:
stock SendAdminMessage(color, string[]) {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) && IsPlayerAdmin(i)) {
            SendClientMessage(i, color, string);
        }
    }
}
May not be the best example, but you get the idea, similar to above.
Reply
#7

Thanks For your help both of you!
Reply
#8

I am using foreach.
stock submitToAdmins(color, string)
{
foreach(Player, i)
{
If(PlayerInfo[i][pAdmin] >= 1) SendClientMessage(i, color, string);
}
}
Something like that.Wrote it on phone.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)