SA-MP Forums Archive
Hello.. I how some question how can I short it.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hello.. I how some question how can I short it.. (/showthread.php?tid=485383)



Hello.. I how some question how can I short it.. - Scrillex - 04.01.2014

So hello everyone I'm trying to short our y_group cmds..
So basically this code goes under GameModeInt but the problem is I need to make for single group.. Maybe there is possibility to make it one line for all...
Here is my code:
CODE:
pawn Код:
Group_SetCommand(gHoodRats || gGantonGSF || gSDSGSF || gSDSGSF || gTempleGSF || VCGSF || SMBGSF || FYB || Mafia || NangBoys || Triads || Vagos || Rifa || Varios || TDB || KTB || RHB, YCMD:giverespect, true);
    GROUP_ADD<gHoodRats || gGantonGSF || gSDSGSF || gSDSGSF || gTempleGSF || VCGSF || SMBGSF || FYB || Mafia || NangBoys || Triads || Vagos || Rifa || Varios || TDB || KTB || RHB>

WARNINGS:
pawn Код:
warning 213: tag mismatch
warning 213: tag mismatch
warning 213: tag mismatch
And here is full lines without warnings andstuff:

pawn Код:
Group_SetGlobalCommand(YCMD:giverespect, false);
    Group_SetCommand(gHoodRats, YCMD:giverespect, true);
    Group_SetCommand(gGantonGSF, YCMD:giverespect, true);
    Group_SetCommand(gSDSGSF, YCMD:giverespect, true);
    Group_SetCommand(gSDSGSF, YCMD:giverespect, true);
    Group_SetCommand(gTempleGSF, YCMD:giverespect, true);
    Group_SetCommand(VCGSF, YCMD:giverespect, true);
    Group_SetCommand(SMBGSF, YCMD:giverespect, true);
    Group_SetCommand(FYB, YCMD:giverespect, true);
    Group_SetCommand(Mafia, YCMD:giverespect, true);
    Group_SetCommand(NangBoys, YCMD:giverespect, true);
    Group_SetCommand(Triads, YCMD:giverespect, true);
    Group_SetCommand(Vagos, YCMD:giverespect, true);
    Group_SetCommand(Rifa, YCMD:giverespect, true);
    Group_SetCommand(Varios, YCMD:giverespect, true);
    Group_SetCommand(TDB, YCMD:giverespect, true);
    Group_SetCommand(KTB, YCMD:giverespect, true);
    Group_SetCommand(RHB, YCMD:giverespect, true);
    GROUP_ADD<gGantonGSF>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<gSDSGSF>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<gSDSGSF>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<gTempleGSF>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<VCGSF>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<SMBGSF>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<FYB>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<Mafia>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<NangBoys>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<Triads>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<Vagos>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<Rifa>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<Varios>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<TDB>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<KTB>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<RHB>
    {
        Command_Touch(YCMD:giverespect);
    }
    GROUP_ADD<gHoodRats>
    {
        Command_Touch(YCMD:giverespect);
    }
With best regards Scrillex


Re: Hello.. I how some question how can I short it.. - nmader - 04.01.2014

Is there more of the code (past the second line)? I am not familiar with this, however looking at your other code a Command should be in brackets underneath that is at least not listed here, that may be the situation, I am not positive.


Re: Hello.. I how some question how can I short it.. - Scrillex - 04.01.2014

Just the thing is.. As I got it, there is no another way to short it out.. it is how it is.. Long and ugly But thanks for your response... Tried a lot of things out.


Re: Hello.. I how some question how can I short it.. - nmader - 04.01.2014

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
Just the thing is.. As I got it, there is no another way to short it out.. it is how it is.. Long and ugly But thanks for your response... Tried a lot of things out.
It's no problem, I'm sure in time there'll be ways to shorten it out. But for now it's a bunch of copy->pasting.