| closedCall Function on slot2 |
| Started by Wilson [29th ID] on 07-13-2006, 11:37 AM |
Threads: 57
Joined: Oct 2005
I've seen in several plugins the linernrn
register_clcmd("drop", "drop_function")rnrnThat will replace either replace drop or be called along with drop (pretty sure the latter). What I'd like to do is the same but this time for slot1, slot2, and slot3.rnrnI'd like slot1, slot2, and slot3 to call their normal functions but also call a function.rnrnIs this possible? Or is slot1 2 and 3 different from "drop"?rnrnIf this works I'll have a nice little plugin to drop off here :-DThreads: 103
Joined: May 2005
well it can replace or add to the drop command.. depends if you use PLUGIN_HANDLED or PLUGIN_CONTINUE i believe...nnbut anyway i dont understand what ya mean...nnif you mean slots as in weapon slots... the primary weapon is the only one that responds to the drop command as far as normal dod goes.. tho you could make it register the cmd on a diff weapon (say pistol) and have that create a the entity on the ground.. but i dont know of anyway to strip just a single weapon from a player...
Threads: 57
Joined: Oct 2005
Nono, you misunderstood.rnrnI'm trying to call a function when someone presses slot1, slot2, or slot3rnrnNothing to do with "drop" - just using that as an example. Do you know how?
Threads: 17
Joined: Jan 2005
I dont know if this is catchable or not...you can try. It would be something like:rnrnregister_clcmd("slot1", "slot1func")rnregister_clcmd("slot2", "slot2func")rn rnetc.
Threads: 57
Joined: Oct 2005
yeah that's exactly what i tried and it never calls the functions :( any other methods?

