Multiple parameters
#7

#emit directive

https://sampforum.blast.hk/showthread.php?pid=1608985#pid1608985
https://sampforum.blast.hk/showthread.php?tid=570930
https://sampforum.blast.hk/showthread.php?tid=591705

There are many versions you can find if you search or write your own. If there are 3 static parameters (just like playerid, color and form in the function below) in the function you want to make, the faster method is by Nero_3D:
pawn Код:
SCM(playerid, color, form[], {Float, _}: ...)
{
    #pragma unused form

    static tmp[145];
    new t1 = playerid, t2 = color;
    const n4 = -4, n16 = -16, size = sizeof tmp;

    #emit stack 28
    #emit push.c size
    #emit push.c tmp
    #emit stack n4
    #emit sysreq.c format
    #emit stack n16

    return SendClientMessage(t1, t2, tmp);
}
for more or less static parameters the above will not work.
Reply


Messages In This Thread
Multiple parameters - by POL_george - 04.12.2016, 18:22
Re: Multiple parameters - by RyderX - 04.12.2016, 18:30
Re: Multiple parameters - by POL_george - 05.12.2016, 10:37
Re: Multiple parameters - by RyderX - 05.12.2016, 13:17
Re: Multiple parameters - by Threshold - 05.12.2016, 14:37
Re: Multiple parameters - by POL_george - 05.12.2016, 17:53
Re: Multiple parameters - by Konstantinos - 05.12.2016, 18:23
Re: Multiple parameters - by POL_george - 06.12.2016, 17:35
Re: Multiple parameters - by Nero_3D - 06.12.2016, 19:44
Re: Multiple parameters - by Konstantinos - 06.12.2016, 19:58

Forum Jump:


Users browsing this thread: 1 Guest(s)