ptouched and kill
Hello, I use this code and I would like that when someone touches the entity it dies, but the frag is added to the person who created the entity
At the moment I can only make them die when they touch the entity, but I would like the frag to be added to whoever created the entity PHP Code:
|
Re: ptouched and kill
PHP Code:
|
Re: ptouched and kill
sorry but it didn't work, it still only counts as kill, and doesn't add frag to which the entity was created
this is all important of the code PHP Code:
|
Re: ptouched and kill
its because you're not setting the entity ownership when creating...
replace the function PHP Code:
|
Re: ptouched and kill
sorry but it didn't work that way either because it wouldn't let me compile, however in this way I replaced
PHP Code:
PHP Code:
PHP Code:
but then when you kill someone the next time, instead of giving you a frag it gives you two frags, that's why I say it works well but badly Sorry if I don't express it well in English I can try again |
Re: ptouched and kill
Finally I was able to make it work now it works correctly, thank you very much for the help it really helped me a lot, thank you
I had to change some things in this function and use natives of the superhero include PHP Code:
|
Re: ptouched and kill
Thats because touch forward is called many times per second, and you need to make the dead player think after setting his hp to -1 or you can simply set touched player dead flag, ill fix my code and you better use it because youre doing alot of useless checks in addition creating new variables in a forward that is called many times per sec which youre working the cpu hard, and we don't want to make the cpu work hard or it gets upset.
Code in the post was edited! |
Re: ptouched and kill
ok thanks if you can make the previous code work correctly I will use it, for now the last one I uploaded works
I don't understand much about how to do that to overload the CPU, I'm quite new to this but thanks for the help |
| All times are GMT -4. The time now is 11:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.