How to text to all Leader
#1

I am Admin, If i want to send my message to Leader all faction. How to make it ?

If I type /msgtoleader <text>
and I want send to... all Leader who's online!

Code:
PlayerInfo[i][pLeader]
How to make it ?

Thank you!!
Reply
#2

pawn Code:
CMD:msgtoleaders(playerid, cmdtext[])
{
    new text[144];
    if(sscanf(cmdtext, "s[144]", text)) return SendClientMessage(playerid, -1, "/msgtoleaders <text>");
    foreach(new i : Player)
    {
        if( PlayerInfo[i][pLeader] == true) SendClientMessage(i, -1, text);
    }
    return 1;
}
Reply
#3

Ohh thank you, xRadical3 ..
thanks bro!

what 's "s[144]" ??
Reply
#4

Quote:
Originally Posted by supermember
View Post
Ohh thank you, xRadical3 ..
thanks bro!

what 's "s[144]" ??
That is a SSCANF parameter, it just tell's that argument should be a string that is 144 characters long. 144 is the maximum text input/output in samp.
Reply
#5

The "s" is for string and [144] is the max lenght of it.
Reply
#6

okay thank Lexless and DRIFT_HUNTER
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)