[Ajuda] Chat Admin
#1

Queria que a cor da mensagem do chat de admin,saisse de acordo com a cor do player
pawn Код:
if(text[0] == '#' && PlayerInfo[playerid][Level] >= 1) {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        SendClientMessageToAdmins(0xFFA500FF, "=====================================================");
        format(string,sizeof(string),"Admin Chat: %s: (%i): %s",string,playerid,text[1]); MessageToAdmins(yellow,string);
        SendClientMessageToAdmins(0xFFA500FF, "=====================================================");
        return 0;
    }
Codigo do /MC
pawn Код:
if(strcmp(cmd, "/mc", true) == 0) {
if(CallRemoteFunction("GetPlayerArenaStatus","i",playerid) == 1) return SendClientMessage(playerid,COLOUR_ERRO,StringTable[0]);
tmp = strtok(cmdtext, idx);
new param2=strval(tmp);
if(!strlen(tmp)){SendClientMessage(playerid, COLOUR_ERRO, "[ERRO]: Digite: /mc [ID da Cor (0/300)]");return 1;}
if(!IsNumeric(tmp)){SendClientMessage(playerid, COLOUR_ERRO, "[ERRO]: Vocк so pode escolher uma cor de 0 a 300");return 1;}
if(param2>300){SendClientMessage(playerid, COLOUR_ERRO, "[ERRO]: Vocк so pode escolher uma cor de 0 a 300");return 1;}

switch(param2)
{
case 0: cor[playerid]=0xFFFF00FF;
case 1: cor[playerid]=0x6241B4FF;
case 2: cor[playerid]=0x00B600FF;
case 3: cor[playerid]=0x0000FFFF;
case 4: cor[playerid]=0x9600C1FF;
case 5: cor[playerid]=0xFF0000FF;
case 6: cor[playerid]=0x956300FF;
case 7: cor[playerid]=0xFF9B00FF;
case 8: cor[playerid]=0xFFFFFFFF;
case 9: cor[playerid]=0xFF00FFFF;
case 10: cor[playerid]=0x78697C5A;
case 11: cor[playerid]=0x5DB7B6FF;
case 12: cor[playerid]=0xCA580FFF;
case 13: cor[playerid]=0x218EBFFF;
case 14: cor[playerid]=0x12FA56FF;
case 15: cor[playerid]=0xAC151EFF;
case 16: cor[playerid]=0xDC53AEFF;
case 17: cor[playerid]=0x382ECDFF;
case 18: cor[playerid]=0x566912FF;
case 19: cor[playerid]=0xD1D962FF;
case 20: cor[playerid]=0x87598FFF;
case 21: cor[playerid]=0x8D4CFDFF;
case 22: cor[playerid]=0xFB880DFF;
case 23: cor[playerid]=0x67DDC6FF;
case 24: cor[playerid]=0xF8E158FF;
case 25: cor[playerid]=0x89CE13FF;
case 26: cor[playerid]=0xAD1401FF;
case 27: cor[playerid]=0x7476E0FF;
case 28: cor[playerid]=0x776049FF;
case 29: cor[playerid]=0x30B673FF;
case 30: cor[playerid]=0xC191BDFF;
case 31: cor[playerid]=0x375FD6FF;
case 32: cor[playerid]=0xFFFFFFFF;
case 33: cor[playerid]=0x59145CFF;
case 34: cor[playerid]=0x8C759EFF;
case 35: cor[playerid]=0x015C8DFF;
case 36: cor[playerid]=0x4E6552FF;
case 37: cor[playerid]=0xEFA602FF;
case 38: cor[playerid]=0x8815A2FF;
case 39: cor[playerid]=0xA96089FF;
case 40: cor[playerid]=0x772F58FF;
case 41: cor[playerid]=0xEA59E5FF;
case 42: cor[playerid]=0x83F9F8FF;
case 43: cor[playerid]=0xCD846DFF;
case 44: cor[playerid]=0x52F740FF;
case 45: cor[playerid]=0x3390D9FF;
case 46: cor[playerid]=0x044C64FF;
case 47: cor[playerid]=0xFE446DFF;
case 48: cor[playerid]=0xF10CC2FF;
case 49: cor[playerid]=0x715AD0FF;
case 50: cor[playerid]=0x7E556CFF;
case 51: cor[playerid]=0x1171E3FF;
case 52: cor[playerid]=0xA60FF7FF;
case 53: cor[playerid]=0x5C4592FF;
case 54: cor[playerid]=0x888960FF;
case 55: cor[playerid]=0xE68F46FF;
case 56: cor[playerid]=0x4A934FFF;
case 57: cor[playerid]=0xE4CD84FF;
case 58: cor[playerid]=0x2279A8FF;
case 59: cor[playerid]=0x2FAA34FF;
case 60: cor[playerid]=0xFD7B13FF;
case 61: cor[playerid]=0xB5E86EFF;
case 62: cor[playerid]=0x8F98F8FF;
case 63: cor[playerid]=0x9E1F7EFF;
case 64: cor[playerid]=0xC6DDECFF;
case 65: cor[playerid]=0xE6FD5DFF;
case 66: cor[playerid]=0xE75EEAFF;
case 67: cor[playerid]=0xA2B903FF;
case 68: cor[playerid]=0xC2479EFF;
case 69: cor[playerid]=0x99D1E8FF;
case 70: cor[playerid]=0xCEBCA1FF;
case 71: cor[playerid]=0x4F660CFF;
case 72: cor[playerid]=0x9DDEF5FF;
case 73: cor[playerid]=0x9DDECCFF;
case 74: cor[playerid]=0x9DDE3FFF;
case 75: cor[playerid]=0x9D083FFF;
case 76: cor[playerid]=0xE3083FFF;
case 77: cor[playerid]=0xE3088DFF;
case 78: cor[playerid]=0x4008FCFF;
case 79: cor[playerid]=0xDBBAFCFF;
case 80: cor[playerid]=0xDBBAA4FF;
case 81: cor[playerid]=0x3B84A9FF;
case 82: cor[playerid]=0x41E58BFF;
case 83: cor[playerid]=0x886B43FF;
case 84: cor[playerid]=0x886B43FF;
case 85: cor[playerid]=0xEE7DFDFF;
case 86: cor[playerid]=0xEE5CA5FF;
case 87: cor[playerid]=0x414140FF;
case 88: cor[playerid]=0xC0C2A9FF;
case 89: cor[playerid]=0xC77B29FF;
case 90: cor[playerid]=0x203F96FF;
case 91: cor[playerid]=0x586B7BFF;
case 92: cor[playerid]=0xA26309D7;
case 93: cor[playerid]=0xF6A409D7;
case 94: cor[playerid]=0xF60113D7;
case 95: cor[playerid]=0x062B13D7;
case 96: cor[playerid]=0x62617BD7;
case 97: cor[playerid]=0xE8807BD7;
case 98: cor[playerid]=0xFF522DD7;
case 99: cor[playerid]=0xFFB4D2FF;
case 100: cor[playerid]=0xB3B2B1D7;
case 101: cor[playerid]=0x82B970FF;
case 102: cor[playerid]=0x46FD4FFF;
case 103: cor[playerid]=0x10F8E1FF;
case 104: cor[playerid]=0x3A94EFFF;
case 105: cor[playerid]=0x823E0DFF;
case 106: cor[playerid]=0xA1E6A1FF;
case 107: cor[playerid]=0x6118E2FF;
case 108: cor[playerid]=0xD8269CFF;
case 109: cor[playerid]=0x8EA6D3FF;
case 110: cor[playerid]=0x5C74E0FF;
case 111: cor[playerid]=0x4FD862FF;
case 112: cor[playerid]=0x46EAB9FF;
case 113: cor[playerid]=0x358CA3FF;
case 114: cor[playerid]=0xD1FEE4FF;
case 115: cor[playerid]=0xB6994FFF;
case 116: cor[playerid]=0xA4F560FF;
case 117: cor[playerid]=0x23146BFF;
case 118: cor[playerid]=0x7A1DBBFF;
case 119: cor[playerid]=0x7A1DE6FF;
case 120: cor[playerid]=0xFE1DE6FF;
case 121: cor[playerid]=0xFE1D3FFF;
case 122: cor[playerid]=0xFE0000FF;
case 123: cor[playerid]=0x134B70FF;
case 124: cor[playerid]=0x869899FF;
case 125: cor[playerid]=0xF9E299FF;
case 126: cor[playerid]=0xF9E2E2FF;
case 127: cor[playerid]=0x329F48FF;
case 128: cor[playerid]=0x7EBFBBFF;
case 129: cor[playerid]=0x7648BBFF;
case 130: cor[playerid]=0x76488BFF;
case 131: cor[playerid]=0x5617DBFF;
case 132: cor[playerid]=0x36F7F7FF;
case 133: cor[playerid]=0xAB866FFF;
case 134: cor[playerid]=0xE5866FFF;
case 135: cor[playerid]=0xE586C3FF;
case 136: cor[playerid]=0xE58605FF;
case 137: cor[playerid]=0x5F7A69FF;
case 138: cor[playerid]=0xBF3217FF;
case 139: cor[playerid]=0x078D4EFF;
case 140: cor[playerid]=0x00FF00FF;
case 141: cor[playerid]=0xAFE644FF;
case 142: cor[playerid]=0xE51986FF;
case 143: cor[playerid]=0x9CCAA4FF;
case 144: cor[playerid]=0xA2AB18FF;
case 145: cor[playerid]=0xDD54FBFF;
case 146: cor[playerid]=0x5854FBFF;
case 147: cor[playerid]=0xB95A2EFF;
case 148: cor[playerid]=0x01B4B6FF;
case 149: cor[playerid]=0x0D80C9FF;
case 150: cor[playerid]=0x362398FF;
case 151: cor[playerid]=0x2F2C78FF;
case 152: cor[playerid]=0x01AF38FF;
case 153: cor[playerid]=0xE42F3DFF;
case 154: cor[playerid]=0xE4DADBFF;
case 155: cor[playerid]=0x0F047FFF;
case 156: cor[playerid]=0xA71269FF;
case 157: cor[playerid]=0xCC4E0AFF;
case 158: cor[playerid]=0x8959ADFF;
case 159: cor[playerid]=0xC6A043FF;
case 160: cor[playerid]=0x2F6546FF;
case 161: cor[playerid]=0x916596FF;
case 162: cor[playerid]=0xD0FF0EFF;
case 163: cor[playerid]=0x46A771FF;
case 164: cor[playerid]=0x00766BFF;
case 165: cor[playerid]=0xEA1DA2FF;
case 166: cor[playerid]=0x371C66FF;
case 167: cor[playerid]=0xE94321FF;
case 168: cor[playerid]=0x64689EFF;
case 169: cor[playerid]=0x069824FF;
case 170: cor[playerid]=0x18A5F7FF;
case 171: cor[playerid]=0x8E186FFF;
case 172: cor[playerid]=0xCD6E0BFF;
case 173: cor[playerid]=0x16C812FF;
case 174: cor[playerid]=0xCB5039FF;
case 175: cor[playerid]=0xEA2C43FF;
case 176: cor[playerid]=0x3066B3FF;
case 177: cor[playerid]=0xF8025AFF;
case 178: cor[playerid]=0x1B24F0FF;
case 179: cor[playerid]=0xC37AF0FF;
case 180: cor[playerid]=0xC3CC9FFF;
case 181: cor[playerid]=0xFFE1FFFF;
case 182: cor[playerid]=0xFF00FFFF;
case 183: cor[playerid]=0x728D53FF;
case 184: cor[playerid]=0x72BF17FF;
case 185: cor[playerid]=0x01AEEDFF;
case 186: cor[playerid]=0xFD0A71FF;
case 187: cor[playerid]=0xFDD070FF;
case 188: cor[playerid]=0xE9B1A0FF;
case 189: cor[playerid]=0x66CCDFFF;
case 190: cor[playerid]=0x66CC83FF;
case 191: cor[playerid]=0xED8507FF;
case 192: cor[playerid]=0x48439AFF;
case 193: cor[playerid]=0x6476DFFF;
case 194: cor[playerid]=0x6FB41DFF;
case 195: cor[playerid]=0x1922ABFF;
case 196: cor[playerid]=0xB53EB1FF;
case 197: cor[playerid]=0xB9FDB1FF;
case 198: cor[playerid]=0xB9FDFEFF;
case 199: cor[playerid]=0xE0F3FEFF;
case 200: cor[playerid]=0xE0F3CBFF;
case 201: cor[playerid]=0xD0243FFF;
case 202: cor[playerid]=0xED3BF1FF;
case 203: cor[playerid]=0xD77C94FF;
case 204: cor[playerid]=0x0B54F8FF;
case 205: cor[playerid]=0x4BD448FF;
case 206: cor[playerid]=0x5F76A3FF;
case 207: cor[playerid]=0x2DB6BFFF;
case 208: cor[playerid]=0x5A08E0FF;
case 209: cor[playerid]=0x440D80FF;
case 210: cor[playerid]=0x2D794CFF;
case 211: cor[playerid]=0xB5D691FF;
case 212: cor[playerid]=0x448871FF;
case 213: cor[playerid]=0x0868C1FF;
case 214: cor[playerid]=0xFAFEE6FF;
case 215: cor[playerid]=0x4C795EFF;
case 216: cor[playerid]=0x3B16FEFF;
case 217: cor[playerid]=0x965B43FF;
case 218: cor[playerid]=0x5F5BE4FF;
case 219: cor[playerid]=0xA4FBE0FF;
case 220: cor[playerid]=0xECA0AAFF;
case 221: cor[playerid]=0x237A91FF;
case 222: cor[playerid]=0x2940EDFF;
case 223: cor[playerid]=0x575378FF;
case 224: cor[playerid]=0x585D46FF;
case 225: cor[playerid]=0xC22BD3FF;
case 226: cor[playerid]=0xC2B0EBFF;
case 227: cor[playerid]=0x87C3F0FF;
case 228: cor[playerid]=0x610E89FF;
case 229: cor[playerid]=0x7EF52CFF;
case 230: cor[playerid]=0x3663EDFF;
case 231: cor[playerid]=0x8D4960FF;
case 232: cor[playerid]=0x2A4FA6FF;
case 233: cor[playerid]=0x6A7C61FF;
case 234: cor[playerid]=0xF521B9FF;
case 235: cor[playerid]=0x1FE8A4FF;
case 236: cor[playerid]=0x385265FF;
case 237: cor[playerid]=0xAABD0BFF;
case 238: cor[playerid]=0xD3270DFF;
case 239: cor[playerid]=0x3D498EFF;
case 240: cor[playerid]=0x7C61CEFF;
case 241: cor[playerid]=0x263D38FF;
case 242: cor[playerid]=0xF20679FF;
case 243: cor[playerid]=0xF38A85FF;
case 244: cor[playerid]=0x9942C0FF;
case 245: cor[playerid]=0x31DE79FF;
case 246: cor[playerid]=0x31DEEFFF;
case 247: cor[playerid]=0x23C2ABFF;
case 248: cor[playerid]=0xC27759FF;
case 249: cor[playerid]=0xC2BB3DFF;
case 250: cor[playerid]=0xC258A1FF;
case 251: cor[playerid]=0x2258A1FF;
case 252: cor[playerid]=0x22FBA1FF;
case 253: cor[playerid]=0x8F537CFF;
case 254: cor[playerid]=0x7D1C50FF;
case 255: cor[playerid]=0xE71C50FF;
case 256: cor[playerid]=0xE7A724FF;
case 257: cor[playerid]=0x38A724FF;
case 258: cor[playerid]=0xACF024FF;
case 259: cor[playerid]=0x675BA9FF;
case 260: cor[playerid]=0xB49995FF;
case 261: cor[playerid]=0x1DFC95FF;
case 262: cor[playerid]=0x1DFC38FF;
case 263: cor[playerid]=0x1D0238FF;
case 264: cor[playerid]=0x1D0281FF;
case 265: cor[playerid]=0xAB616AFF;
case 266: cor[playerid]=0x544A45FF;
case 267: cor[playerid]=0xC64A45FF;
case 268: cor[playerid]=0xC64AD4FF;
case 269: cor[playerid]=0xC9E3D4FF;
case 270: cor[playerid]=0x05A4B3FF;
case 271: cor[playerid]=0xC19C6FFF;
case 272: cor[playerid]=0x245003FF;
case 273: cor[playerid]=0x00DFFFFF;
case 274: cor[playerid]=0x0093FFFF;
case 275: cor[playerid]=0x00933AFF;
case 276: cor[playerid]=0xBAD43AFF;
case 277: cor[playerid]=0xBAD477FF;
case 278: cor[playerid]=0xBA2B9DFF;
case 279: cor[playerid]=0xF8267DFF;
case 280: cor[playerid]=0x47EF50FF;
case 281: cor[playerid]=0x47F59AFF;
case 282: cor[playerid]=0x05209AFF;
case 283: cor[playerid]=0x8896A5FF;
case 284: cor[playerid]=0xD296A5FF;
case 285: cor[playerid]=0xD29662FF;
case 286: cor[playerid]=0xD2559AFF;
case 287: cor[playerid]=0xBAA2FBFF;
case 288: cor[playerid]=0x18A2FBFF;
case 289: cor[playerid]=0x2607B7FF;
case 290: cor[playerid]=0xAC3716FF;
case 291: cor[playerid]=0x8F7AB4FF;
case 292: cor[playerid]=0x8F7AFAFF;
case 293: cor[playerid]=0xED7AFAFF;
case 294: cor[playerid]=0xED6E53FF;
case 295: cor[playerid]=0x5EC653FF;
case 296: cor[playerid]=0xEF3663FF;
case 297: cor[playerid]=0xEF8751FF;
case 298: cor[playerid]=0xEFF463FF;
case 299: cor[playerid]=0x87E77FFF;
case 300: cor[playerid]=0xB5E26CFF;

}

if(cor[playerid] != 0){SetPlayerColor(playerid,cor[playerid]);}
SendClientMessage(playerid, GetPlayerColor(playerid), "[INFO]: Sua COR foi mudada. Ficarб salva em sua conta");
SendClientMessage(playerid, GetPlayerColor(playerid), "[INFO]: Digite /rmc para nгo usar mais essa cor.");
SendClientMessage(playerid, GetPlayerColor(playerid), "[DICA]: Vocк pode colocar via cуdigo HEX atravйs do: /HMC");
return 1;}
alguem pode me ajudar
Reply
#2

Pode usar:
pawn Код:
SendClientMessage(playerid,GetPlayerColor(playerid),"Exemplo");
ou usando o comando /mc:
pawn Код:
SendClientMessage(playerid,cor[playerid],"Exemplo");
Reply
#3

Quote:
Originally Posted by MultiKill
Посмотреть сообщение
Pode usar:
pawn Код:
SendClientMessage(playerid,GetPlayerColor(playerid),"Exemplo");
ou usando o comando /mc:
pawn Код:
SendClientMessage(playerid,cor[playerid],"Exemplo");
Ok,irei testar.
Reply
#4

Aonde define a cor para enviar a mensagem.
Reply
#5

pawn Код:
if(text[0] == '#' && PlayerInfo[playerid][Level] >= 1) {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        SendClientMessageToAdmins(0xFFA500FF, "=====================================================");
        format(string,sizeof(string),"Admin Chat: %s: (%i): %s",string,playerid,text[1]); MessageToAdmins(cor[playerid],string); // coloca a cor aqui
        SendClientMessageToAdmins(0xFFA500FF, "=====================================================");
        return 0;
    }
ou
pawn Код:
if(text[0] == '#' && PlayerInfo[playerid][Level] >= 1) {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        SendClientMessageToAdmins(0xFFA500FF, "=====================================================");
        format(string,sizeof(string),"Admin Chat: %s: (%i): %s",string,playerid,text[1]); MessageToAdmins(GetPlayerColor(playerid),string);
        SendClientMessageToAdmins(0xFFA500FF, "=====================================================");
        return 0;
    }
Reply
#6

Vlw! +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)