Quote:
Originally Posted by [03
Garsino ]
Take a look at mine, it's working perfect.
pawn Код:
dcmd_adminmessage(playerid, params[]) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) { new msg[128], string[128]; if(sscanf(params, "s", msg)) return SendClientMessage(playerid, COLOUR_SYSTEM, "Usage: /adminmessage (message)"); if(strlen(msg) < 1) return SendClientMessage(playerid, COLOUR_SYSTEM, "Your Message Must Contain At Least 1 Character."); for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][Level] >= 1) { format(string, sizeof(string), "Admin Message (%s): %s", pNick(playerid), msg); SendClientMessage(i, 0x33FF33AA, string); } } return 1; } else return SendErrorMessage(playerid, 0); // Unknown command error message }
stock pNick(playerid) // You will need this one, it's a very handy custom function instead of using GetPlayerName all the time. { new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); return nick; }
|
No, I want to use my own but MY command isn't working that's why I asked help.