SA-MP Forums Archive
[αjυdα] Tele admin - 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: [αjυdα] Tele admin (/showthread.php?tid=226370)



[αjυdα] Tele admin - junioor - 15.02.2011

Boa tarde!
Eu gostaria de que vocкs me ajudacem a exeplo: eu liberei o /ir para todos os jogadores mais eu gostaria que o /ir n decem /ir nos adm so os players tipo um jogador normal quer da /ir em um adm mais n pode so eu jogador poderiam me ajudar?

Aguardando respostas...


sistema:
pawn Код:
if(strcmp(cmd, "/ir", true) == 0) {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, laranja, "Uso correto: /ir [playerid/ParteNick]");
            return 1;}
        new Float:plocx,Float:plocy,Float:plocz;
        new playa;
        if(IsStringAName(tmp)) {
            playa = GetPlayerID(tmp);
        }else {
            playa = strval(tmp);}
        GetPlayerPos(playa, plocx, plocy, plocz);
        new intid = GetPlayerInterior(playa);
        SetPlayerInterior(playerid,intid);
        if (GetPlayerState(playerid) == 2) {
            new tmpcar = GetPlayerVehicleID(playerid);
            SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
        }else {
            SetPlayerPos(playerid,plocx,plocy+2, plocz);}
        return 1;}



Re: [αjυdα] Tele admin - Macintosh - 15.02.2011

pawn Код:
if(strcmp(cmd, "/ir", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
       {
            SendClientMessage(playerid, laranja, "Uso correto: /ir [playerid/ParteNick]");
            return 1;
        }
        if(PlayerInfo[giveplayerid][pAdmin] >= 1 || IsPlayerAdmin(giveplayerid))
        {
         SendClientMessage(playerid, Cor, "Nгo podes se teleportar a um administrador");
         return 1;
        }
        new Float:plocx,Float:plocy,Float:plocz;
        new playa;
        if(IsStringAName(tmp))
        {
            playa = GetPlayerID(tmp);
        }
        else
        {
            playa = strval(tmp);
        }
        GetPlayerPos(playa, plocx, plocy, plocz);
        new intid = GetPlayerInterior(playa);
        SetPlayerInterior(playerid,intid);
        if (GetPlayerState(playerid) == 2)
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
         }
         else
         {
            SetPlayerPos(playerid,plocx,plocy+2, plocz);
        }
        return 1;
      }
Acho que й isso *-*
Tenta ai...


Re: [αjυdα] Tele admin - leandro123456 - 15.02.2011

pawn Код:
if(strcmp(cmd, "/ir", true) == 0) {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, laranja, "Uso correto: /ir [playerid/ParteNick]");
            return 1;}
        new Float:plocx,Float:plocy,Float:plocz;
        new playa;
        if(IsStringAName(tmp)) {
            playa = GetPlayerID(tmp);
        }else {
            playa = strval(tmp);}
if(IsPlayerAdmin(playa)) return SendClientMessage(playerid, laranja, "Apenas Players");
        GetPlayerPos(playa, plocx, plocy, plocz);
        new intid = GetPlayerInterior(playa);
        SetPlayerInterior(playerid,intid);
        if (GetPlayerState(playerid) == 2) {
            new tmpcar = GetPlayerVehicleID(playerid);
            SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
        }else {
            SetPlayerPos(playerid,plocx,plocy+2, plocz);}
        return 1;}
troca o IsPlayerAdmin(playa) por sua variavel de adm.


Re: [αjυdα] Tele admin - Macintosh - 15.02.2011

Thug Lixo e bugado '-'


Re: [αjυdα] Tele admin - junioor - 15.02.2011

Galera acho que vocкs nao me entederam eu quero qe os jogadores normal nao possam dar /ir nos admins mais nos outros jogadores podem so isso agora os adm pode da /ir em quem eles quiserem entendes?


Re: [αjυdα] Tele admin - rjjj - 15.02.2011

Isto deve resolver o seu problema, qualquer problema й sу adaptar tudo б sua variбvel de admin.

Adicione ao seu comando:

pawn Код:
if(!IsPlayerAdmin(playerid)&&IsPlayerAdmin(strval(tmp)) return SendClientMessage(playerid,laranja,"Vocк nгo pode /ir em Admins !");
Espero ter ajudado


Re: [αjυdα] Tele admin - junioor - 15.02.2011

Eu nao consegui adpata-lo poderia fazer para mim ?

pawn Код:
if (AccountInfo[playerid][AdminLevel] >= 2 || IsPlayerAdmin(playerid)){



Re: [αjυdα] Tele admin - deregudegu - 15.02.2011

Esse negocio de limitar sу para alguns players muda de GM para GM entгo,
Poste algum comando de ADM do seu servidor para que possamos adaptar para vocк, assim vocк vai aprender.


Re: [αjυdα] Tele admin - Macintosh - 15.02.2011

Adapte de acordo com seu GM e sistema de administraзгo WTF?