NexiusTailer / Nex-AC

Anticheat system
https://pawn.wiki/index.php?/topic/27641-nex-ac/
GNU Lesser General Public License v3.0
212 stars 156 forks source link

ShowPlayerDialog #286

Closed PazzOnee closed 1 year ago

PazzOnee commented 1 year ago

In omp you can use additional arguments, when you hook that callback, all rest arguments not working (OPEN_MP_TAGS:...)

native bool:ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const title[], const body[], const button1[], const button2[], OPEN_MP_TAGS:...);

NexiusTailer commented 1 year ago

The main problem of omp includes anyway with tags and const (but the first produces compile errors now), which makes any native/callback hooks compatible with default samp libs incompatible with omp libs. So, if you want to keep full compatibility, you should probably use samp includes or modify omp libs, the omp server executes any of these compiled scripts correctly (so the problem only in libs).

As for additional non-fixed number of arguments for all similar functions, this is also an issue now, but I think it can be properly supported in the next major branch where all native hooks will be changed to RPC hooking. I can't say for sure when it will be done and available, but in the current anticheat branch I'll try to add support for as many YSF/omp natives as possible, maybe including this one, if a sane way of implementation will be found before the next release.