Would this AC hypothetically work ?
#5

Quote:
Originally Posted by azzerking
Посмотреть сообщение
Information

I would suggest you hook the functions used for weapons. Example:
Код:
stock AC_GivePlayerWeapon( playerid, weaponid, ammo )
{
	// YOUR CODE GOES HERE

	return GivePlayerWeapon( playerid, weaponid, ammo );
}
#if defined _ALS_GivePlayerWeapon
	#undef GivePlayerWeapon
#else
	#define _ALS_GivePlayerWeapon
#endif

#define GivePlayerWeapon AC_GivePlayerWeapon
Save the weapon and ammo to a variable that can hold them, preferably by using weapon slots ( which means the array will be a max of 12 slots instead of all weapons which would mean it was equal to 47 ).

Also add a delay of 800 ms in the hooked functions before setting the weapons and then in the weapon check function, you can check to see if the time has passed and then check their weapons.

then you may use kick, but make sure to test it first.
I'm pretty sure I already have it

PHP код:
stock GiveNexWeapon(playeridweaponidammo)
{
    
PlayerPlaySound(playerid10520.00.00.0);
    
PlayerInfo[playerid][pWeapon][GetWeaponSlot(weaponid)] = weaponid;
    
PlayerInfo[playerid][pWeaponAmmo][GetWeaponSlot(weaponid)] = ammo;
    
GivePlayerWeapon(playeridweaponidammo);
    return 
1;

Reply


Messages In This Thread
Would this AC hypothetically work ? - by NeXoR - 13.10.2016, 19:28
Re: Would this AC hypothetically work ? - by Dignity - 13.10.2016, 19:37
Re: Would this AC hypothetically work ? - by NeXoR - 13.10.2016, 19:39
Re: Would this AC hypothetically work ? - by azzerking - 14.10.2016, 00:59
Re: Would this AC hypothetically work ? - by NeXoR - 14.10.2016, 07:20

Forum Jump:


Users browsing this thread: 1 Guest(s)