09.01.2015, 23:39
pq quando eu do /ban o Cara nao e banido e sim kikado do serve - ou Ebanido e muda so o nick e relonga e ja esta no serve.
poderiao me ajuda ?
poderiao me ajuda ?
if(strcmp(cmd, "/ban", true) == 0) { new string[148]; new sendername[MAX_PLAYER_NAME]; if(pDados[playerid][Admin] < 3 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, CINZA, "{00FF00}[CBD] {FFFFFF}Somente Administrador Level 3 ou superior."); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, Verde, "{00FF00}[CBD] {FFFFFF}/ban [ID] [Motivo]"); giveplayerid = ReturnUser(tmp); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, Verde, "{00FF00}[CBD] {FFFFFF}ID ou Nome Invбlido."); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, BRANCO, "{00FF00}[CBD] {FFFFFF}/ban [ID] [Motivo]"); format(string, sizeof(string), "{FF0000}%s {A9A9A9}Foi banido pelo Admin {FF0000}%s {A9A9A9}[Motivo: %s]", giveplayer, sendername, (result)); SendClientMessageToAll(BRANCO, string); kBan(giveplayerid, result); kBanIP(giveplayerid); Kickp(giveplayerid); return 1; }