07.03.2009, 18:20
Hello all i have made a very simple mod chat for moderators but the problem im having is that they can type but they can't see there txt or anyone elses txt, have you any idea why this is?? regards kry
Код:
if(strcmp(cmd, "/mc", true) == 0 || strcmp(cmd, "/modchat", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/mc [Modchat]"); return 1; } format(string, sizeof(string), "*%d Moderator %s: %s", PlayerInfo[playerid][pGameMaster], sendername, result); if (PlayerInfo[playerid][pGameMaster] >= 1) { SendAdminMessage(COLOR_DBLUE, string); } printf("Moderator %s: %s", sendername, result); } return 1; }