SA-MP Forums Archive
[Ajuda]Comandos para adm. - 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]Comandos para adm. (/showthread.php?tid=196498)



[Ajuda]Comandos para adm. - Felipe_Wesker - 05.12.2010

Bom, eu procurei na net FSs com comandos para admin. Mas sу tem FS com leveis para ADM. EU nao quero isso, eu quero alguns comandos que sу quem tem a rcon pode usar.

queria isso:
* Felipe_Wesker slaps [id] - tapa. around a bit with a large trout.
/god - fica imortal (sem perder vida).
/god - sai do god mode.
/skin [id player] [id skin] - troca skin de um player.
/invisible - some do mapa.
/invisible - sai do invisivel.
/goto [id player] - vai no player.
/weather - troca o tempo do jogo.
/a(dmin) - fala no chat com cor azul.
/count [time] - inicia uma contagem.
/froze [id] - congela player.
/unfroze [id] - descongela player.
/kill [player id] - mata o player.
/all [player id] - seta a vida e o colete do player para 100.
/respawn - da respawn nos carros.

Bom, eu sei que to pedindo muito, mas na net nгo tem isso separado, sу tem admin com leveis, e eu nгo sei editar isso. Bom se alguem puder me ajduar aki, agradeзo.


Re: [Ajuda]Comandos para adm. - zSuYaNw - 05.12.2010

sу adiciona

pawn Код:
if(!IsPlayerAdmin(playerid)) return 0;



Re: [Ajuda]Comandos para adm. - ipsBruno - 05.12.2010

Isto й um pedido.

usa Search,que droga.

pawn Код:
if(!IsPlayerAdmin(playerid)) return false;
Em cada comando de admin


Re: [Ajuda]Comandos para adm. - rjjj - 05.12.2010

Por Exemplo esse comando:

pawn Код:
if(strcmp("/Oie", cmdtext, true, 10) == 0)
    {
        if(LeveldeAdmin[playerid] = 1)//Restrito б alguem de Level de Admin 1 (por exemplo se isso for no seu FS)
        {
            SendClientMessage(playerid, COLOR_GRAD1, "Oie");
            return 1;
        }
    }

Para restringir para admins Rcon apenas troque a variбvel do if por IsPlayerAdmin(playerid) , veja um exemplo feito com o comando citado acima:


pawn Код:
if(strcmp("/Oie", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))//Agora restrito б Admins Rcon
        {
            SendClientMessage(playerid, COLOR_GRAD1, "Oie");
            return 1;
        }
    }


Espero ter ajudado


Re: [Ajuda]Comandos para adm. - ipsBruno - 05.12.2010

RJJ:
Deve-se trocar a variбvel a condiзгo.

Seu code esta certo,mas a fala errada,rs

pawn Код:
if(LeveldeAdmin[playerid] = 1)

////// para /////////////////////

if(IsPlayerAdmin(playerid))



Re: [Ajuda]Comandos para adm. - zSuYaNw - 05.12.2010

Quote:
Originally Posted by [FeK]DraKiNs
Посмотреть сообщение
Isto й um pedido.

usa Search,que droga.

pawn Код:
if(!IsPlayerAdmin(playerid)) return false;
Em cada comando de admin
usa
pawn Код:
if(!IsPlayerAdmin(playerid)) return 0; // economisa 2 Chars (caracteres).



Re: [Ajuda]Comandos para adm. - ipsBruno - 05.12.2010

Usa:

pawn Код:
if(!IsPlayerAdmin(playerid)) return false;
Tйcnica Booleana,padrгo do Pawn,ao compilar '0' reconhece como 'false' portanto 'false' й o padrгo e o certo.

This forum requires that you wait 120 seconds between posts. Please try again in 118 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 19 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 10 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 4 seconds./



Re: [Ajuda]Comandos para adm. - zSuYaNw - 05.12.2010

Quote:
Originally Posted by [FeK]DraKiNs
Посмотреть сообщение
Usa:

pawn Код:
if(!IsPlayerAdmin(playerid)) return false;
Tйcnica Booleana,padrгo do Pawn,ao compilar '0' reconhece como 'false' portanto 'false' й o padrгo e o certo.

This forum requires that you wait 120 seconds between posts. Please try again in 118 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 19 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 10 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 4 seconds./
mais eu acho return 0; mais bunitinho.


This forum requires that you wait 120 seconds between posts. Please try again in 7 seconds.



Re: [Ajuda]Comandos para adm. - ipsBruno - 05.12.2010

Dб na mesma ao compilar tudo se transforma em false

Para mim tanto faz,vocк ganha de todos


Re: [Ajuda]Comandos para adm. - zSuYaNw - 05.12.2010

Dъvida, tem alguma vantagem em usando false ao invйs de 0 ?
This forum requires that you wait 120 seconds between posts. Please try again in 19 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 2 seconds.