Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › Call Function on slot2
5 posts, 3 people · 1,193 views Thread Rating: ★★★★★
closedCall Function on slot2
Started by Wilson [29th ID] on 07-13-2006, 11:37 AM
Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
07-13-2006, 11:37 AM #1

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 :-D

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
07-13-2006, 09:08 PM #2

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...

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
07-14-2006, 05:56 AM #3

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?

H Hell Phoenix
posted here
Posts: 201
Threads: 17
Joined: Jan 2005
07-15-2006, 03:57 PM #4

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.

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
07-16-2006, 09:09 PM #5

yeah that's exactly what i tried and it never calls the functions :( any other methods?

Archive › Old Forum Threads › Help › Scripting Help › Call Function on slot2
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC