is it possible to unregisted +attack ?
Hi ,
Is it possible to unregister +attack and instead of it creating one more command say fight to do the attack ? if yes then how ? |
Re: is it possible to unregisted +attack ?
+attack is a client side command not a server one, the client sends a flag to the server which can be read using:
Code:
if(get_user_buttons(id) & IN_ATTACK)Using Ham_Weapon_PrimaryAttack you can hook weapon primary attack, it will give you the weapon entity (NOT CSW_* constants, entity) and you can use that to set it's next attack using set_pdata_float() on the entity with 46 as offset (47 for secondary attack) and the delay added... use something like 99999.0 and store the entity name in a array for that player (preferably indexed CSW_ id) You could also make a global bool or something to determine if it's before or after the "fight" command but it would save alot of calls just by unregistering ham events when not needed. Then on your "fight" command just loop through all players getting their weapons and using referenced array to get entity id and use that set_pdata_float() again, this time set it to 0.0 |
Re: is it possible to unregisted +attack ?
Thank youfor your valueable input . is there any way to set like if the use is firing two command like +attack and 2ndattack then only make the use fire the bullet ?
|
| All times are GMT -4. The time now is 23:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.