Raised This Month: $12 Target: $400
 3% 

Adding a check for a shield?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-12-2004 , 09:28   Adding a check for a shield?
Reply With Quote #1

Can you guys just create a function that checks to see if a user has a shield? I've been able to do this w/ writing a plugin, but its a HUGE pain in the ass and there must be a more efficient way. Although I think most people are still confused about the shield in a programming aspect.
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-12-2004 , 10:23  
Reply With Quote #2

How do you do this with scripting? Only way I can think of so far (without researching :-)) is to check current model, cause it usually contains something with model...
new model[32]
entity_get_string(player, EV_SZ_weaponmodel, model)
if (contain(model, "shield"))
playerhasshield = true

thats 4 lines... a native could be easier to use of course.
But it would be the same thing as writing a stock that does the same thing.
Johnny got his gun is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-12-2004 , 10:30  
Reply With Quote #3

Well that hard part is then finding if they've dropped it. And if they're say planting the bomb, the shield model won't come up(i think), even though they may have the shield. I just do a check .1 seconds after they execute the drop command to see if they still have it in the models. And then if they buy a primary weapon then i set hasshield to false. But there have still been times where its not fullproof.
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Reply


Thread Tools
Display Modes

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 04:44.


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