/announce cmd
#2

Posting both the methods below. To use this command you will need ZCMD by Zeek and sscanf by ******.
EDIT:

The SendClientMessage one!
pawn Код:
COMMAND:announce(playerid, params[])
    {
        new string[128],msg[128],pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pname,sizeof(pname));
        if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid,-1, "USAGE: /ann [Admin Message]");
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, "You are not authorised to use this command!");
        format(string,sizeof(string),"* [Admin] : %s %s *",pname,msg);
        SendClientMessageToAll(-1,string);
        return 1;
    }
Game Text one!

pawn Код:
COMMAND:announce(playerid, params[])
    {
        new string[128],msg[128],pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pname,sizeof(pname));
        if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid,-1, "USAGE: /ann [Admin Message]");
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, "You are not authorised to use this command!");
        format(string,sizeof(string),"[%s]: %s",pname,msg);
        GameTextForPlayer( playerid, string, 5000, 3 );
        return 1;
    }
Reply


Messages In This Thread
/announce cmd - by Captain_jeffree95 - 29.12.2012, 04:12
Re: /announce cmd - by Ballu Miaa - 29.12.2012, 04:40
Re: /announce cmd - by [HK]Ryder[AN] - 29.12.2012, 05:00
Re: /announce cmd - by Faisal_khan - 29.12.2012, 05:04
Re: /announce cmd - by Ballu Miaa - 29.12.2012, 05:29

Forum Jump:


Users browsing this thread: 1 Guest(s)