/announce cmd
#3

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Posting both the methods below. To use this command you will need ZCMD by Zeek and sscanf by ******.

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,COLOR_WHITE, "USAGE: /ann [Admin Message]");
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_GRAD2, "You are not authorised to use this command!");
        format(string,sizeof(string),"* [Admin] : %s *",msg);
        SendClientMessageToAll(COLOR_DBLUE,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,COLOR_WHITE, "USAGE: /ann [Admin Message]");
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_GRAD2, "You are not authorised to use this command!");
        format(string,sizeof(string),"Admin: %s",msg);
        GameTextForPlayer( playerid, string, 5000, 3 );
        return 1;
    }
@Ballu - You should be more careful. He will get undefined symbol errors cuz of the colors.
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: 2 Guest(s)