[AJUDA] Comandos
#1

Queria que mudasse esse comando pra nгo poder algemar/prender um adm!

Codigos:
pawn Код:
if(strcmp(cmd, "/algemar", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol ||dini_Int(file, "Profissao") == LSPD || pAdmin[playerid] == 6){
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /algemar [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1){
SendClientMessage(playerid, Vermelho, "(ERRO) Alguem estб dentro de um carro.");
return 1 ;
}
if(plid == playerid){
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo pode algemar vocк mesmo.");
return 1 ;
}
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб conectado");
return 1;
} else {
if(GetDistanceBetweenPlayers(plid,playerid) < 10){
format(string, sizeof(string), "(INFO) O Policial %s te algemou.", aname);
SendClientMessage(plid, Blue, string);
TogglePlayerControllable(plid, 0);
SendClientMessage(playerid, COLOR_GREEN, "(INFO) Algemado com sucesso.");
algemado[plid] = 1;
return 1;
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Chegue mais perto para algemar.");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Apenas policiais podem usar este comando.");
return 1;
}
}
pawn Код:
if(strcmp(cmd, "/prender", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == LSPD || pAdmin[playerid] == 6){
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /prender [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1){
SendClientMessage(playerid, Vermelho, "(ERRO) Alguem estб dentro de um carro.");
return 1 ;
}
if(plid == playerid){
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo pode fazer isto com si mesmo.");
return 1 ;
}
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб conectado");
return 1;
} else {
if(GetDistanceBetweenPlayers(plid,playerid) < 10){
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, pname);
if(Procurados[plid] == 0){
SendClientMessage(playerid, Verde, "(INFO) Vocк foi kikado por prender um player inocente!");
format(string, sizeof(string), "(INFO) O Policial %s prendeu sem o player estar nos procurados e foi kikado!", aname);
SendClientMessageToAll(Verde, string);
Kick(playerid);
return 1;
}
format(string, sizeof(string), "(INFO) O Policial %s te prendeu.", aname);
SendClientMessage(plid, Blue, string);
SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(plid, 6);
SetPlayerHealth(plid, 99999);
ResetPlayerWeapons(plid);
dini_IntSet(file, "Preso", 1);
SendClientMessage(playerid, COLOR_GREEN, "(INFO) Preso com sucesso.");
//SetPlayerWantedLevel(plid, 0);
preso[plid] = 1;
TogglePlayerControllable(plid, 1);
if(Procurados[plid] == 1){
GivePlayerMoney(playerid,5000);
Procurados[plid] = 0;
SendClientMessage(playerid, Verde, "(INFO) Vocк prendeu um jogador procurado e ganhou 5 mil!");
dini_IntSet(file, "Procurado", 0);
}
return 1;
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Chegue mais perto para prender!");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Apenas policiais podem usar este comando!");
return 1;
}
}
Reply
#2

http://br.answers.yahoo.com/question...9122935AABiunx
Reply
#3

pawn Код:
if(Admin == 1) //Exemplo
    return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando em um admin.");
Reply
#4

Quote:
Originally Posted by MelodySenpai
Посмотреть сообщение
@OFF
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkk meu Deus do cйu como pode uma coisa dessas SHUUAHSHUAHUSAHU
Reply
#5

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
if(Admin == 1) //Exemplo
    return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando em um admin.");
Entгo ficaria assim?
pawn Код:
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6) //Exemplo
    return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando em um admin.");
Reply
#6

pawn Код:
//Depois de plid = strval(tmp);
if(pAdmin[plid] > 0)
    return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando em um admin.");
Reply
#7

Quote:
Originally Posted by GuiihCamargo
Посмотреть сообщение
Entгo ficaria assim?
pawn Код:
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6) //Exemplo
    return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando em um admin.");
LoLss hehe

pawn Код:
if(pAdmin[plid] > = 1) return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando em um admin.");
Reply
#8

no caso dos comandos ficaria assim

pawn Код:
if(pAdmin[plid] >= 1)
   return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando em um admin.");
Reply
#9

Nossa ocorreu o seguinte erro:
Код:
C:\Users\Guilherme\Desktop\Brasil Realidade Cruel\gamemodes\novogmsem.pwn(13924) : error 029: invalid expression, assumed zero
C:\Users\Guilherme\Desktop\Brasil Realidade Cruel\gamemodes\novogmsem.pwn(13924) : warning 215: expression has no effect
C:\Users\Guilherme\Desktop\Brasil Realidade Cruel\gamemodes\novogmsem.pwn(13924) : error 001: expected token: ";", but found ")"
C:\Users\Guilherme\Desktop\Brasil Realidade Cruel\gamemodes\novogmsem.pwn(13924) : error 029: invalid expression, assumed zero
C:\Users\Guilherme\Desktop\Brasil Realidade Cruel\gamemodes\novogmsem.pwn(13924) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
@EDIT
Eu coloquei bem depois disto:
pawn Код:
if(strcmp(cmd, "/prender", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == LSPD || pAdmin[playerid] == 6){
new plid;
tmp = strtok(cmdtext, idx);
Reply
#10

Vocк nгo colocou ; em algum lugar ai.

Veja a linha 13923
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)