AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   register_event pick_up ^^ how? (https://forums.alliedmods.net/showthread.php?t=86097)

Owyn 02-20-2009 17:39

register_event pick_up ^^ how?
 
how do i properly register when user picked up something?

fysiks 02-20-2009 17:48

Re: register_event drop and buy ^^ how?
 
I just searched for "register buy" and there is a solution in the first thing that came up.

Edit:
Another search for "hook drop weapon" (or something like that) gave this http://forums.alliedmods.net/showthread.php?t=49247

Search. Read. Search. Read. Search. Read. Search. Read. Search. Read. Search. Read. Search. Read. Search. Read.

I don't know anything about CS and I can find this stuff.

Owyn 02-21-2009 12:42

Re: register_event drop and buy ^^ how?
 
yup, found them too =\
but when FM_setmodel is called?
register_forward(FM_SetModel, "forward_set_model")

won't fm_setmodel be called everytime model is changed? (curweapon, drop,buy,touch) ?

xPaw 02-21-2009 12:47

Re: register_event drop and buy ^^ how?
 
PHP Code:

register_clcmd("drop""cmdDropped");

public 
cmdDroppedid ) {
   
// player trying todo weapon



Owyn 02-22-2009 05:44

Re: register_event pick_up ^^ how?
 
hi, i found
Quote:

register_event( "WeapPickup" , "on_WeapPickup" , "b" );
found this event) works great, so i don't need money and touch events

Bugsy 02-22-2009 10:27

Re: register_event pick_up ^^ how?
 
Quote:

Originally Posted by .Owyn. (Post 766503)
hi, i found
found this event) works great, so i don't need money and touch events

You can also make it only react to particular weapon pickups by specifying the weapon index.

PHP Code:

register_event"WeapPickup" "eWeapPickup" "be""1=1""1=3""1=5",  "1=7",  "1=8""1=10" ,"1=11"); 


Owyn 02-22-2009 11:23

Re: register_event pick_up ^^ how?
 
actually i need it for all weapons) but i saw topic started by you talking about it

Bugsy 02-22-2009 11:42

Re: register_event pick_up ^^ how?
 
Quote:

Originally Posted by .Owyn. (Post 766693)
actually i need it for all weapons) but i saw topic started by you talking about it

Oh ok, just thought I would let you know.


All times are GMT -4. The time now is 16:54.

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