SA-MP Forums Archive
[Ajuda] Comando /dararma - 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 /dararma (/showthread.php?tid=334909)



[Ajuda] Comando /dararma - KilleRJunioR - 16.04.2012

Ola galera tenho um comando /dararma que e do meu server RPG bem ele й asim funciona que nao pode da ID proibido para Players e nem adm e foma de jogo sу em modo de trabalho eu queria mudar ele pra pegar adm em modo de trabalho ou jogo mais os players ainda continuam com ID proibido obg desde ja

pawn Код:
if(strcmp(cmd, "/dararma", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /dararma [ id ] [weaponid(eg. 46 = Parachute)] [ammo]");
        new playa = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        new gun = strval(tmp);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD1, "USE: /dararma [ id ] [weaponid] [ammo]");
            SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
            SendClientMessage(playerid, COLOR_GRAD3, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
        new ammo = strval(tmp);
        if(!IsPlayerConnected(playa)) return SendClientMessage(playerid,-1,"Player nгo conectado.");
        if(ammo < 1 || ammo > 9999) return SendClientMessage(playerid, COLOR_GRAD1, "   O minimo de balas й 1 e o mбximo й 9999!");
        if (PlayerInfo[playerid][pAdmin] >= 1 && admtrampando[playerid] == 1)
        {
           GivePlayerWeapon(playa, gun, ammo);
        }
        else
        {
            if(gun < 1 || gun > 46 || gun==38 || gun==35 || gun==36 || gun==37 || gun==44 || gun==45 || gun==9 || gun==17 || gun==16 || gun==18 || gun==22 || gun==26 || gun==27 || gun==28 || gun==32 || gun==39 || gun==40)
            return  SendClientMessage(playerid, COLOR_GRAD1, "ID Proibido!");
            GivePlayerWeapon(playa, gun, ammo);
        }
        return 1;
    }



Respuesta: [Ajuda] Comando /dararma - Ichigo_Kurosaki - 16.04.2012

pawn Код:
&& admtrampando[playerid] == 1



Re: [Ajuda] Comando /dararma - KilleRJunioR - 16.04.2012

Sу tirar?


Respuesta: [Ajuda] Comando /dararma - Ichigo_Kurosaki - 16.04.2012

tira pra ver no que da, nao sei se й isso, to sу chutando.


Re: [Ajuda] Comando /dararma - KilleRJunioR - 16.04.2012

Sera que nao ficaria asim?

pawn Код:
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] 1)



Respuesta: [Ajuda] Comando /dararma - Ichigo_Kurosaki - 16.04.2012

tu nao quer por para que o adm mesmo sem estar trabalhando ele poder ultilizar o comando?


Re: [Ajuda] Comando /dararma - KilleRJunioR - 16.04.2012

Sim isso msm


Respuesta: [Ajuda] Comando /dararma - Ichigo_Kurosaki - 16.04.2012

entгo, tenta fazer isso que eu falei!
pawn Код:
if(strcmp(cmd, "/dararma", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /dararma [ id ] [weaponid(eg. 46 = Parachute)] [ammo]");
        new playa = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        new gun = strval(tmp);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD1, "USE: /dararma [ id ] [weaponid] [ammo]");
            SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
            SendClientMessage(playerid, COLOR_GRAD3, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
        new ammo = strval(tmp);
        if(!IsPlayerConnected(playa)) return SendClientMessage(playerid,-1,"Player nгo conectado.");
        if(ammo < 1 || ammo > 9999) return SendClientMessage(playerid, COLOR_GRAD1, "   O minimo de balas й 1 e o mбximo й 9999!");
        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
           GivePlayerWeapon(playa, gun, ammo);
        }
        else
        {
            if(gun < 1 || gun > 46 || gun==38 || gun==35 || gun==36 || gun==37 || gun==44 || gun==45 || gun==9 || gun==17 || gun==16 || gun==18 || gun==22 || gun==26 || gun==27 || gun==28 || gun==32 || gun==39 || gun==40)
            return  SendClientMessage(playerid, COLOR_GRAD1, "ID Proibido!");
            GivePlayerWeapon(playa, gun, ammo);
        }
        return 1;
    }