AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Some Questions (https://forums.alliedmods.net/showthread.php?t=225209)

Randomize 09-01-2013 22:07

Some Questions
 
1. How to make entity solid for the owner.
I use:
PHP Code:

entity_set_edict 

It will solid for other players but not for the owner, how can I make it solid to its owner? If I remove it, it'll make me collide

2. Play v_ models animation

PHP Code:

set_pev(idpev_weaponanimx

Set a v_ models animation, it plays but sometimes it stops before the animation ends, any other method?

ConnorMcLeod 09-02-2013 00:36

Re: Some Questions
 
1. No proper way
Explain more about what you are doing in your plugin, there may be alternatives such as using other pev_* edicts fields.

2. Use Ham_CS_SendWeaponAnimation

Randomize 09-02-2013 05:34

Re: Some Questions
 
Connor, I want I'm able to shoot my entity.

ConnorMcLeod 09-02-2013 18:24

Re: Some Questions
 
Explain why do you need to be the owner then.

When i asked you to explain, i meant to explain the whole thing, easier to help, prevent xy problems.

Randomize 09-03-2013 04:48

Re: Some Questions
 
Okay, I have a bomb that can be planted everywhere. If there's a player or some players around the bomb and if I shoot the bomb, it must be explode and deal damages to the victim.

dark_style 09-03-2013 04:59

Re: Some Questions
 
http://forums.alliedmods.net/showthread.php?p=850698

Randomize 09-03-2013 05:41

Re: Some Questions
 
dark_style, it is for bomb. My bomb is custom bomb, not hegrenade, flashbang, or smoke

hornet 09-03-2013 08:52

Re: Some Questions
 
Quite simple. Make a constant with a value ( for example 100 ) and then you set the entity owner to PlayerID plus Constant. When you need the player's ID you can do entity owner minus Constant. And then the entity will remain solid to the player you deem as it's owner.

ConnorMcLeod 09-03-2013 12:07

Re: Some Questions
 
If someone wants to try, method would consist to set owner to 0 when bomb is planted, and set it back to planter index when it explodes.

Randomize 09-04-2013 06:33

Re: Some Questions
 
hornet, I'm not pretty sure understand, but does it seem like this?
PHP Code:

new var = 100

entity_set_edict
(entEV_EZ_owner, var) 

Connor, If I set the owner to 0 when the bomb is planted, how to set it back to the owner?


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

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