ResetPlayerWeapons
#1

Hi,

It's a bug or what sometimes, i reset player weapons and man get ban for gun/ammo hacks. I do prints, i get in variables 0 weapon id,0 ammo (it's good), because resetplayerweapons i have stock where i reset variables and use simple resetplayerweapons function. But print give that player is holding a weapon before that resetion and ammo. So in anticheat i use getplayerweapon and getplayerammo, so it's need set timer when reseting weapons, and not check gun anti cheat?
Reply
#2

PHP код:
new ammo[MAX_PLAYERS];
cmd:give(playerid,params[])
{
     
ammo[playerid] += 200;
     
GivePlayerWeapon(playerid,24,ammo[playerid]);
}
cmd:take(playerid,params[])
{
    
GivePlayerWeapon(playerid,24,-ammo[playerid]);
    
ammo[playerid] = 0;

Reply
#3

Bro i got simple one for you
ResetPlayerWeapons(playerid);

And to change some weapons.
SetPlayerAmmo(playerid, 23, 0);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)