25.02.2012, 20:01
Galera,й o seguinte,estou sofrendo com ataque hacker,e preciso de um comando de banir,que sу um nick setado possa usar sem estar logado na rcon nem nada....
Tipo,preciso que sу o nick "ShakaL" use esse comando,sem precisar ta logado na rcon nem nada...
Alguem pode me ajuda?
Rep+
Й tipo isso,mas esse й o comando de ban comum de adm
Tipo,preciso que sу o nick "ShakaL" use esse comando,sem precisar ta logado na rcon nem nada...
Alguem pode me ajuda?
Rep+
Й tipo isso,mas esse й o comando de ban comum de adm
Код:
if(strcmp(cmd, "/ban", true) == 0) { new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); if(IsPlayerAdmin(playerid)){ new tmp[256]; new plid; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, Vermelho, "Uso: /ban [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: /banir [id] [motivo]"); }else{ new year, month,day; getdate(year, month, day); format(string, sizeof(string), "(INFO) %s baniu o Jogador: %s. || Razгo: %s || %d-%d-%d", aname, pname,result,month,day,year); BanLog(string); SendClientMessage(plid, 0x80FF00AA, "» Vocк foi banido deve ter feito alguma merda"); SendClientMessage(plid, 0xFFFFFFAA, "» Se foi banido injustamente Tire uma ''SS'' e tente o contato com um de nossos Admins!"); GameTextForPlayer(plid,"~r~banido", 2500, 3); format(string, sizeof(string), "{00FF00}(INFO) O Administrador %s baniu o jogador: %s. || Razгo: %s.", aname,pname,result); SendClientMessageToAll(tcadm, string); dini_IntSet("banidos.ini",pname,1); Ban(plid); } }else{ format(string, sizeof(string), "(ERRO) ID : %d nгo й valido!", plid); SendClientMessage(playerid, Vermelho, string); } } return 1; }