14.10.2016, 07:20
Quote:
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 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. |
PHP код:
stock GiveNexWeapon(playerid, weaponid, ammo)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pWeapon][GetWeaponSlot(weaponid)] = weaponid;
PlayerInfo[playerid][pWeaponAmmo][GetWeaponSlot(weaponid)] = ammo;
GivePlayerWeapon(playerid, weaponid, ammo);
return 1;
}