[Ajuda] Comando em zcmd. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando em zcmd. (
/showthread.php?tid=464755)
Comando em zcmd. -
RafaScripter - 18.09.2013
Tem como colocar esse comando pra /setadmin [ID/Conta] [Nivel] seta pelo id ou pelo nick por favor ajuda ae
Код:
CMD:setadmin(playerid, params[])
{
new nivel;
new Conta[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho, "Erro: Vocк precisa estб logado na rcon!");
if(sscanf(params, "ud", ID, nivel)) return SendClientMessage(playerid, CINZA, "Use /setadmin [ID] [nivel]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "Erro: ID invalido");
if(nivel < 0 || nivel > 5) return SendClientMessage(playerid, Vermelho, "Erro: Nivel invalido, use de 0 a 5");
PlayerInfo[ID][Admin] = nivel;
format(String, sizeof(String),"%s setou %s de Administrador nivel %d!", Nome(playerid),Nome(ID), nivel);
SendClientMessageToAll(0xFFA579AA, String);
return 1;
}
Re: Comando em zcmd. -
RafaScripter - 18.09.2013
uuuup
Re: Comando em zcmd. -
PT - 18.09.2013
mas ja ta, vc apenas tem de rcon logado
Respuesta: Comando em zcmd. -
Ley - 18.09.2013
Tente trocar:
PHP код:
if(sscanf(params, "ud", ID, nivel)) return SendClientMessage(playerid, CINZA, "Use /setadmin [ID] [nivel]")
por:
PHP код:
if(sscanf(params, "ii", ID, nivel)) return SendClientMessage(playerid, CINZA, "Use /setadmin [ID] [nivel]");