Announcement CMD (REP++)
#1

=> Hey Guys!
====> I want to make announcement cmd. Using ZCMD "CMD:announcement"..
And this will send to all players and only admin with equal or greater than level 4 can use it.
It will Appear Like:
Blue Color |___________Server Announcement___________|
"Message"
Reply
#2

You already tried make this?
Reply
#3

Quote:
Originally Posted by iOmar
Посмотреть сообщение
=> Hey Guys!
====> I want to make announcement cmd. Using ZCMD "CMD:announcement"..
And this will send to all players and only admin with equal or greater than level 4 can use it.
It will Appear Like:
Blue Color |___________Server Announcement___________|
"Message"
pawn Код:
COMMAND:announce(playerid, params[])
{
    new Fstring[164], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
    if(sscanf(params, "s[128]", Fstring))
    {
        SendClientMessage(playerid,  -1, "ERROR: Usage /announce [message]");
        return 1;
    }
    else
    {
            SendClientMessageToAll(-1, "|___________Server Announcement___________|");
        format(Fstring, sizeof(Fstring), "(ANNOUNCEMENT) %s: %s ", name, Fstring);
        SendClientMessageToAll(-1, Fstring);
    }
    return 1;
}
-FalconX
Reply
#4

Thnx Rep Added.
Reply
#5

@Falcon

Totally irrelevant and too long script; this would make it:

pawn Код:
COMMAND:ann(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4) //change this to your own admin-enum
    {

            new Announce[50];
            if(!sscanf(params, "s[50]",Announce))
            {
                GameTextForAll(Announce,5000,3);
            }
            else SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /ann <text>");
           
    }
    else SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 1 to use this command!");
    return 1;
}
@iOmar

Take mine, the one from Falco would allow it for any player, this one is limited to level 4+ admins....
Reply
#6

Quote:
Originally Posted by FalconX
Посмотреть сообщение
pawn Код:
COMMAND:announce(playerid, params[])
{
    new Fstring[164]
    //
    //
    SendClientMessageToAll(-1, Fstring);
-FalconX
Text I/O 128 cells (512 bytes)
Reply
#7

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
@Falcon

Totally irrelevant and too long script; this would make it:

pawn Код:
COMMAND:ann(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4) //change this to your own admin-enum
    {

            new Announce[50];
            if(!sscanf(params, "s[50]",Announce))
            {
                GameTextForAll(Announce,5000,3);
            }
            else SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /ann <text>");
           
    }
    else SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 1 to use this command!");
    return 1;
}
@iOmar

Take mine, the one from Falco would allow it for any player, this one is limited to level 4+ admins....
Haha made me laughed out loudly xDD keep dreaming insane xd


(Sorry for a big bump nvm it's just 6 days old )
-FalconX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)