Raised This Month: $ Target: $400
 0% 

[HELP] Using entity and loading bar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wiwi249
Member
Join Date: Oct 2013
Old 07-28-2014 , 05:25   [HELP] Using entity and loading bar
Reply With Quote #1

Hello again!
I've recently encountered a problem while making my mod. Can someone write me the method to solve it?
Player approaches a static "bomb" entity that is set on map already (done). He has to arm the bomb, so he just simply uses it with USE key. Arming the bomb takes few seconds, so a loading bar appears. If the player dies or stops arming (e.g. simply releases the USE key) the loading bar disappears and the bomb is back in the unarmed state.
I've been wondering if i should use a couple of functions, player prethink, entity think or what? No idea. I havent seen this thing in any plugin so that I could just look at the code and use it. Anyone help me with the code?

To these who dont acctually understand my post, it's very like the "Rush" game mode in Battlefield: Bad Company 2.
wiwi249 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-28-2014 , 05:50   Re: [HELP] Using entity and loading bar
Reply With Quote #2

If you don't provide the code how we can help you? Words aren't enough. Anyway,take a look into CSSDK: https://github.com/Arkshine/CSSDK/bl...red/wpn_c4.cpp
HamletEagle is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 07-28-2014 , 07:21   Re: [HELP] Using entity and loading bar
Reply With Quote #3

It would be ideal to make your entity func_button class, and set its targetname to something like eg. "BombArm", and then you could work with something like this:

Spoiler
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode