SA-MP Forums Archive
#emit - 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: #emit (/showthread.php?tid=610732)



#emit - PaulDinam - 27.06.2016

Are there any tutorials about the usage of emit?
I'm looking to learn on how this code works;

pawn Code:
stock SendClientMessageEx(playerid, color, const text[], {Float, _}:...)
{
    static
        args,
        str[144];

    if ((args = numargs()) == 3)
    {
        SendClientMessage(playerid, color, text);
    }
    else
    {
        while (--args >= 3)
        {
            #emit LCTRL 5
            #emit LOAD.alt args
            #emit SHL.C.alt 2
            #emit ADD.C 12
            #emit ADD
            #emit LOAD.I
            #emit PUSH.pri
        }
        #emit PUSH.S text
        #emit PUSH.C 144
        #emit PUSH.C str
        #emit PUSH.S 8
        #emit SYSREQ.C format
        #emit LCTRL 5
        #emit SCTRL 4

        SendClientMessage(playerid, color, str);

        #emit RETN
    }
    return 1;
}



Re: #emit - iKarim - 27.06.2016

Yashas made a tutorial about it.


Re: #emit - Sjn - 27.06.2016

https://sampforum.blast.hk/showthread.php?tid=591705

Late.


Re: #emit - FuNkYTheGreat - 27.06.2016

here you go:
https://sampforum.blast.hk/showthread.php?tid=570930
https://sampforum.blast.hk/showthread.php?tid=591705