26.04.2015, 18:17
You need to get the player's name, also returning in a loop is not so much recommended because itll stop it.
Код:
CMD:jail(playerid, params[]) { new name[MAX_PLAYER_NAME], string[45 + MAX_PLAYER_NAME] ; GetPlayerName(playerid, name, MAX_PLAYER_NAME); SendClientMessage(playerid, -1, "You are jailed for 5 minutes. Reason: Unknown."); format(string, sizeof (string), "%s is jailed for 5 minutes. Reason: Unknown.", name); for(new i; i != MAX_PLAYERS; i++) { if (!IsPlayerConnected(playerid)) continue; if (i == playerid) continue; SendClientMessage(i, -1, string); } return 1; }