12.09.2009, 12:07
Код:
dcmd_say(playerid,params[]) { if(IsPlayerAdmin(playerid)) { new tmp[256], idx; tmp = strtok(params,idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_GREY,"|| Usage: /say (text) ||"); SendClientMessage(playerid,COLOR_GREY,"|| Function: Announces a adminґs text global. ||"); return true; } tmp = strrest(params,idx); new pname2[MAX_PLAYER_NAME], string[256]; GetPlayerName(playerid, pname2, sizeof(pname2)); format(string, sizeof(string), "|| Administrator %s: %s ||", pname2, tmp); SendClientMessageToAll(COLOR_ORANGE, string); return true; } else return SendClientMessage(playerid, COLOR_RED, "[!] You are not logged into RCON."); }