17.03.2013, 09:38
Sу quero que apareзa quando um moderador kicka, aparecer que o moderador kikcou. E quando o admin kicka aparecer que o admin kickou.
Код:
if(strcmp(cmd, "/kick", true) == 0) { new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 ){ new tmp[256]; new plid; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, Vermelho, "Uso: /kick [id] [motivo]"); return 1; } plid = strval(tmp); new pname[MAX_PLAYER_NAME]; GetPlayerName(plid, pname, MAX_PLAYER_NAME); format(file2, sizeof(file2), PASTA_CONTAS, pname); if(IsPlayerConnected(plid)){ 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, Vermelho, "Uso: /kick [id] [motivo]"); }else{ if(pAdmin[playerid]== 1){ format(string, sizeof(string), "| INFO-SERVER | O Moderador %s kickou o jogador %s (Motivo: %s)", aname,pname,result); //nao aparece que eu fui banido,somente aquela mensagem SendClientMessageToAll(AdminCor, string); } format(string, sizeof(string), "| INFO-SERVER | O Administrador %s kickou o jogador: %s. (Motivo: %s)", aname,pname,result); SendClientMessageToAll(tcadm, string); GameTextForPlayer(plid,"~b~kickado~w~!", 2500, 3); SendClientMessage(plid, Vermelho, "* Vocк foi kickado do servidor!"); } }else{ format(string, sizeof(string), "| ERRO | ID : %d nгo й valido!", plid); SendClientMessage(playerid, Vermelho, string); } } return 1; }