Raised This Month: $ Target: $400
 0% 

Fatal touch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 09-06-2005 , 10:46   Fatal touch
Reply With Quote #1

Hi pips.

I'm almost done with my plugin, thanks to you too. ;) Only think that's not completed is fatal touch. I need a function that detects touch of two players and kills touched. Toucher should be teleported to touched's position, but it's not important. Any idea??

Thnx.
alien is offline
Send a message via ICQ to alien
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 09-06-2005 , 12:18  
Reply With Quote #2

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_touch("player","player","on_touch"); } public on_touch(ptr,ptd) {     if(ptr > 0 && ptr <= 32 && is_user_connected(ptr))     {         if(ptd > 0 && ptd <= 32 && is_user_connected(ptd))         {             // zomg a touch!         }     } }
Or something..
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 09-06-2005 , 12:48  
Reply With Quote #3

Code:
user_kill(ptd)

Put there were he is touched.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 09-06-2005 , 14:05  
Reply With Quote #4

Man, great forum, thank you for your replies. I always get an answer here in notime.
alien is offline
Send a message via ICQ to alien
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-06-2005 , 15:52  
Reply With Quote #5

v3x, why the hell do you do checks to ensure that it's a player since your register_touch is only called when two players touch each other anyway? Also, this may kill both players at the same time.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 09-06-2005 , 17:09  
Reply With Quote #6

lawl, I dunno.. Ignore me for now as I go to bed, or pass out at my pc..
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 09-07-2005 , 20:37  
Reply With Quote #7

Is it possible to detect touch of two players where one is SOLID_NOT? Are there other solid state settings to do this? I replaced SOLID_NOT with SOLID_TRIGGER, but server crashes when 2 players collide.
alien is offline
Send a message via ICQ to alien
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 09-07-2005 , 23:54  
Reply With Quote #8

I should tell you more: Im modifying ClimbTimer plugin for our jump server. It's importat for each player not to block other players. But some of them do it. If there is blocker and blocked, I want blocker to get killed immediately after collision with blocked and get blocked teleported to blocker's position. But it's not working until both blocker and blocked have SOLID_SLIDEBOX and that means, both of them are blockers.
alien is offline
Send a message via ICQ to alien
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:33.


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