GameTextForAdmins +REP
#1

Guys, I need a command that allow RCONs announce a text to all administrato and players won't see the message.
Код:
Admins =>  PlayerInfo[playerid][Level]
Sorry for my bad English
Reply
#2

Loop through the players. Check for an Admin Status. Show the Text.
Reply
#3

i dont know how to loop it, and what should i use? GameTextForPlayer or GameTextForAll
Reply
#4

I don't know your command processor but if you're using ZCMD - IZCMD etc:

PHP код:
#include <a_samp>//
#include <sscanf2>
#include <izcmd>//
CMD:an(playerid, params[])
{
    new 
string[56], text[56]; //
    
if(!IsPlayerAdmin(playerid)) return false;
    if(
sscanf(params, "s[56]", text)) return SendClientMessage(playerid, -1, "/an [Message]");
    
format(string, sizeof string, "%s", text);
    for(new 
i = 0, j = GetPlayerPoolSize(); i <= j; i++) 
    {
        if(
PlayerInfo[i][Level] >= 1) GameTextShowForPlayer(i, text, 6000, 2);
    }
    return 
true;
} 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)