Message to all when typed command
#4

With player you have first to format your message:
pawn Код:
new
    message[23 + MAX_PLAYER_NAME], // We only need space for "Player " +player name " has used /hello" + end of string indicator
    playername[MAX_PLAYER_NAME + 1]
;
GetPlayerName(playerid, playername, sizeof(playername)); //You have to pass playerid to function, in most command processors it's by default passed (ZCMD/YCMD)
format(message, sizeof(message), "Player %s has used /hello", playername);
SendClientMessageToAll(0xBADA55FF, message);
Also check out format wiki documentation
Reply


Messages In This Thread
Message to all when typed command - by ultrAslan - 09.03.2015, 20:33
Re: Message to all when typed command - by wooolly - 09.03.2015, 20:38
AW: Re: Message to all when typed command - by ultrAslan - 09.03.2015, 20:46
Re: Message to all when typed command - by Misiur - 09.03.2015, 20:49
Re: Message to all when typed command - by ReD_HunTeR - 09.03.2015, 21:02
Re: Message to all when typed command - by MohanedZzZ - 09.03.2015, 21:14
Re: Message to all when typed command - by ReD_HunTeR - 09.03.2015, 21:22
AW: Message to all when typed command - by ultrAslan - 09.03.2015, 21:33
Re: Message to all when typed command - by Misiur - 09.03.2015, 21:43
Re: Message to all when typed command - by MohanedZzZ - 10.03.2015, 16:25

Forum Jump:


Users browsing this thread: 1 Guest(s)