Reload bar (how to?)
https://forums.alliedmods.net/showthread.php?p=220167
can't understand the source of that plugin, but can anyone explaine how can i create an reload bar? If i press and hold "E" (3 seconds/cvar) while aiming to player, the bar will appear and after that 3 seconds do some stuff. but if i stop pressing the bar will dissapear (cancel). |
Re: Reload bar (how to?)
You have to send a BarTime message. To clear the message send another one with 0 as duration.
|
Re: Reload bar (how to?)
none of thiose functions is working
PHP Code:
|
Re: Reload bar (how to?)
Find lasermine plugin's setlaser function, it has the reload bar.
|
Re: Reload bar (how to?)
PHP Code:
|
Re: Reload bar (how to?)
Quote:
But what is the correct way to make this?: pressing the +use key when aiming a player? I want to press E and do some stuff |
Re: Reload bar (how to?)
PHP Code:
P.S. Don't just copy and paste that into your plugin because it can be optimized. |
Re: Reload bar (how to?)
You could get rid of PreThink, probably by using Ham_ObjectCaps.
|
Re: Reload bar (how to?)
So if i press the button E when aiming a player for 3 seconds i will steal his money, but what if player starts moving? How to cancel the event?
PHP Code:
|
Re: Reload bar (how to?)
Oww hell no... prethink? seriously?
Just hook the T button instead of E so you will not need cmd start or prethink Then use get_user_aiming(id, Target, Body, Distance) Create a bool to tell if the action is in progress, and if it is in progress and you press again T remove the task and the bar aka cancel the action |
| All times are GMT -4. The time now is 09:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.