SA-MP Forums Archive
NEX-AC kicks my player for gun cheat before it's even loaded properly - 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: NEX-AC kicks my player for gun cheat before it's even loaded properly (/showthread.php?tid=661110)



NEX-AC kicks my player for gun cheat before it's even loaded properly - Gusteakas - 22.11.2018

Good evening,

I'm using NEX-AC anticheat for my server. I encountered one issue with loading player's guns. Here's the code how I load them:

Код:
    new weapons[12];
    for(new i= 0; i < 12; i++)
    { 
        new fieldname[15];
        format(fieldname, 15, "Weapon%i", i);
        cache_get_value_name_int(0, fieldname, weapons[i]);
        format(fieldname, 15, "Ammo%i", i);
        cache_get_value_name_int(0, fieldname, sometemp);
        GivePlayerWeapon(playerid, weapons[i], sometemp);
    }
It kicks my player before it loads properly. If im in game, GivePlayerWeapon works fine but the issue occurs when I try to load my player's guns from DB. I'm using the newest NEX-AC version.


EDIT:

I found a workaround. I created a timer after I spawn my player for few sec's and then execute GivePlayerWeapon command. Works fine for now. But still would like to know how to do it properly without using this workaround.