AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Shield Deploy (https://forums.alliedmods.net/showthread.php?t=184707)

Diegorkable 05-08-2012 03:16

Shield Deploy
 
Hey guys,

I tried using few methods of FakeMeta to detect when player has deployed a Shield. I want the plugin to call a function when the player, for example, picks up a riot shield from the floor ("weapon_shield").

I tried FM_PrecacheModel, it doesn't call the function when the model is shield for some reason, the fact I know this is cuz I hooked it up and client_print'd every model called on this function.

I tried FM_ModelIndex, It's good it's calling it but in a really fast frequency and I don't know how to get the player's ID who just picked that Shield up, also that when I forward_return(FMV_CELL, 0) it fucks things up.

I also used FM_ModelFrames and FM_SetModel, wasn't much of a help too.

What should I do??
Thanks.

ConnorMcLeod 05-08-2012 05:30

Re: Shield Deploy
 
RegisterHam(Ham_Touch, "weapon_shield", "CWSHield_Touch", 0)

If you supercede this, shield can't be picked up.

Question is what do you exactly want to do ?

Diegorkable 05-08-2012 06:51

Re: Shield Deploy
 
Quote:

Originally Posted by ConnorMcLeod (Post 1704730)
If you supercede this, shield can't be picked up.

Exactly, that.

Thanks :) I'll try it.

Edit: Works :)

fysiks 05-08-2012 13:05

Re: Shield Deploy
 
Wow, your first post never seems to explain what you actually want. It's very frustrating.


All times are GMT -4. The time now is 00:19.

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