AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   enity and knife drop (https://forums.alliedmods.net/showthread.php?t=204874)

daniel46 01-04-2013 10:48

enity and knife drop
 
is there a way to do this?

if player die he drop hes knife and other player can take it but i want if the player if some weapon he will need first to drop it and only then he can taqke the knife and same way if player have knife he need to drop it

if player die some enity will drop from hemm and other people can take it and it will give them somthing i want

micapat 01-04-2013 10:53

Re: enity and knife drop
 
When player dies, create a entity and set it a model like "w_knife.mdl" ( -> Google ). Then check when a player touches this entity ( with register_touch ).

daniel46 01-04-2013 11:53

Re: enity and knife drop
 
also how can i make enity that only the 1 who did this enity will see it

else how can i know witch enity is it?

if i have 2 and i want to check if its lets say knife or other knife with other model

micapat 01-04-2013 12:13

Re: enity and knife drop
 
1 )

AddToFullPack ?

pev_groupinfo maybe ( Connor es tu là ? )

2 )

Set a specific classname.

xDrugz 01-04-2013 12:22

Re: enity and knife drop
 
1) This plugin already done by Alucard^
2) Create new entity and then hook touch with register_touch or with fakemeta FM_Touch.

daniel46 01-04-2013 12:45

Re: enity and knife drop
 
yes but i want to get what enity he is touching how can i do this?

micapat 01-04-2013 12:49

Re: enity and knife drop
 
register_touch

daniel46 01-04-2013 13:14

Re: enity and knife drop
 
could you make me just a public example with the register touch?

just with w knife & w ak47

xDrugz 01-04-2013 14:46

Re: enity and knife drop
 
use pev_classname to get touched classname then check if the classname equals to whatever you need.

daniel46 01-04-2013 15:40

Re: enity and knife drop
 
so i ask could you give me little example?


All times are GMT -4. The time now is 13:23.

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