09.04.2010, 15:12
Bem galera, tenho este comando para prender o player:
E queria que, enquanto o player estiver preso, ele nгo possa usar nenhum comando, exceto /fianзa e /advogado. Alguma sugestгo?
Код:
if(strcmp(cmd, "/prender", true) == 0) { if(Profissao[playerid] == COP_CIVIL || Profissao[playerid] == F.B.I || Profissao[playerid] == MARINHA || Profissao[playerid] == AERONAUTICA || Profissao[playerid] == EXERCITO || Profissao[playerid] == BOPE || Profissao[playerid] == DELEGADO || Profissao[playerid] == COP_CORRUPTO || Profissao[playerid] == NARCOTICOS || Profissao[playerid] == COP_RODOVIARIO || 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, "/prender [id]"); return 1; } plid = strval(tmp); if(IsPlayerConnected(plid) && PLAYERLIST_authed[plid] == 1){ if(distancia > 50){ SendClientMessage(playerid, COLOR_RED, "Vocк estб muito longe, chegue mais perto!"); return 1; } if(distancia <= 50){ 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, "Prisгo concluнda"); return 1; } return 1; } else{ SendClientMessage(playerid, COLOR_RED, "Jogador nгo estб conectado/logado"); return 1; } } if(Profissao[playerid] != COP_CIVIL || Profissao[playerid] != COP_RODOVIARIO || Profissao[playerid] != COP_ELITE){ SendClientMessage(playerid, COLOR_RED, "Vocк nгo й policial"); return 1; } }