Raised This Month: $ Target: $400
 0% 

Urgent: Vehichle kills


Post New Thread Reply   
 
Thread Tools Display Modes
Votorx
Senior Member
Join Date: Jun 2004
Old 09-22-2004 , 18:21  
Reply With Quote #11

Dude, when its between a player and an ent.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-22-2004 , 18:23  
Reply With Quote #12

it doesnt say that, it just says when two entities touch...
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-22-2004 , 18:39  
Reply With Quote #13

Code:
public pfn_touch(ptr, ptd) {         // get the name of the touching entity     new classname[32]     entity_get_string(ptr, EV_SZ_classname, classname, 32)         if (equali(classname, "func_vehicle")) {         // is it on the ground?         if (entity_get_int(ptr, EV_INT_flags) & FL_ONGROUND)         {         ............         }else {                      ..............         }     }     return PLUGIN_CONTINUE }
Freecode is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 09-23-2004 , 06:26  
Reply With Quote #14

Iv started playing with a plugin to do this, when i hadd pfn_touch() to it. The only think i can think off that will call create false "vehicle kills" is if a user is standing so close to a vehicle that pfn_touch() gets called and he then gets slayed by the server.

(Perhaps allso if he falls from the sky and hits the vehicle and gets killed becuse the fall was to long, this one can proberbly be countered.)
EKS is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 09-23-2004 , 13:08  
Reply With Quote #15

Oye, I mean when the pfn_touch is done when a player and an ent touch each other, the touched will always be the player -.-
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 09-23-2004 , 13:33  
Reply With Quote #16

Ok, while playing with this. I found the following problems:

Using pfn_touch ()
1) If player A drives his func_vehicle into player B, and player B never moves pfn_touch () never gets called.
2) If someone is standing ontop of the func_vehicle and gets killed by worldspawn a false "vehicle kill" will happen.

I also made a method that works via distance checks ( Basicly checks the distance between the the vehicles & the dead guy. If the distatance is bellow X and that vehicle has been used a "vehicle kill" has happed)

1) If someone is standing inside the distance of a func_vehicle that has been used and someone gets killed by worldspawn you get a false "vehicle kill"

Offcourse you can remove worldspawn kills that are triggered becuse a player died from a long fall. By hooking PreThink and checking if any players are airborn, and if he is. Check how long he has been airborn and if its longer then X Sec the plugin will ignore his worldspawn death.
But then again if someone changes the gravity on the server, it will all be messed up
EKS is offline
Reply



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 01:48.


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