[Ajuda] Comando /dararma
#1

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;
    }
Reply
#2

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

Sу tirar?
Reply
#4

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

Sera que nao ficaria asim?

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

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

Sim isso msm
Reply
#8

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;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)