07.01.2010, 10:22
SendClientMessageToAll works like this.
You can also add names etc.
ex.
after the command in
OnPlayerCommandText
put this
This will send a message to all if the player typed a cmd.
if you replace Playername with playerid, the %s should be %d(or %i) and will tell the users ID
pawn Код:
new string[64];
format(string, sizeof(string), "The text you want to say here");
SendClientMessageToAll(COLOR_WHITE, string);
ex.
after the command in
OnPlayerCommandText
put this
pawn Код:
new string[64], Playername[24];
GetPlayerName(playerid, Playername, sizeof(Playername);
format(string, sizeof(string), "%s has entered a command" Playername);
SendClientMessageToAll(COLOR_BLUE, string);
if you replace Playername with playerid, the %s should be %d(or %i) and will tell the users ID

