04.06.2013, 15:25
acrescenta return 1; e } pra ve se resolve eu peguei do meu comando aqui
pawn Код:
if(strcmp(cmd,"/dararma", true)==0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
new plid, idarma;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Digite: /dararma [id] [id-da-arma]");
return 1;
}
plid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "(ERRO) Digite: /dararma [id] [id-da-arma]");
return 1;
}
idarma = strval(tmp);
if(idarma == 38 || idarma == 35 || idarma == 36 || idarma == 37 || idarma == 39 || idarma == 40){
SendClientMessage(playerid, Vermelho, " | ERRO | ID de Arma Proibida!");
return 1;
}
if(IsPlayerConnected(plid)){
GivePlayerWeapon(plid,idarma,100000);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{00FF00}| INFO | O Administrador %s Tideu arma de id %d", aname,playerid,idarma);
SendClientMessage(plid,tcadm, string);
SendClientMessage(playerid, Verde, "(INFO) Comando efetuado com sucesso!");
return 1;
}else{
SendClientMessage(playerid, Vermelho, "| ERRO | Jogador nгo conectado.");
return 1;
}
}
}