if(strcmp(cmd, "/prisao", true) == 0) { if(Profissao[playerid] == COP_CIVIL || Profissao[playerid] == EXERCITO || Profissao[playerid] == NARCOTICOS || Profissao[playerid] == COP_FEDERAL || Profissao[playerid] == COP_ELITE || IsPlayerAdmin(playerid)){ new tmp[256]; new plid; new distancia; new string[256]; distancia = GetDistanceBetweenPlayers(playerid, plid); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_RED, "/prisao [id]"); return 1; } plid = strval(tmp); if(IsPlayerConnected(plid) && PLAYERLIST_authed[plid] == 1){ if(distancia > 10){ SendClientMessage(playerid, COLOR_RED, "Você está muito longe, chegue mais perto para prender o ladrao safado!"); return 1; } if(distancia <= 10){ Presos[plid] = 1; udb_setPrisao(PlayerName(plid), 1); LogarPlayer(plid); format(string, sizeof(string), "Você foi preso por: %s", PlayerName(playerid)); SendClientMessage(plid, COLOR_SEGURANÇA, string); SendClientMessage(playerid, COLOR_GREEN, "Ladrao safado preso com sucesso"); return 1; } } else{ SendClientMessage(playerid, COLOR_RED, "Jogador não está conectado/logado"); return 1; } } if(Profissao[playerid] != COP_CIVIL || Profissao[playerid] != COP_FEDERAL || Profissao[playerid] != COP_ELITE){ SendClientMessage(playerid, COLOR_RED, "Você não é policial"); return 1; } }