18.01.2015, 17:23
Is there a way to make a system that you can't quickswap your weapon, i mean something that if you shoot with a gun, you cant change the weapon before 3 seconds after you stop shooting?
new theWeapon[MAX_PLAYERS], theTime[MAX_PLAYERS]; public OnPlayerWeaponShot(...) { theWeapon[playerid] = weaponid; theTime[playerid] = gettime() + 3; return 1; } public OnPlayerUpdate(playerid) { if(theTime[playerid] >= gettime()) { SetPlayerArmedWeapon(playerid, theWeapon[playerid]); } return 1; }