Raised This Month: $32 Target: $400
 8% 

[L4D2] Detect if jockey is up on the player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 02-01-2022 , 10:12   [L4D2] Detect if jockey is up on the player
Reply With Quote #1

I want to detect if jockey is up on the player. How can do that?
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-01-2022 , 15:16   Re: [L4D2] Detect if jockey is up on the player
Reply With Quote #2

Code:
Server event "jockey_ride", Tick 10831:
- "userid" = "10"
- "victim" = "2"
Server event "player_hurt", Tick 10831:
- "userid" = "2"
- "attacker" = "10"
- "attackerentid" = "6"
- "health" = "90"
- "armor" = "0"
- "weapon" = "jockey_claw"
- "dmg_health" = "4"
- "dmg_armor" = "0"
- "hitgroup" = "3"
- "type" = "128"
Server event "player_hurt_concise", Tick 10831:
- "userid" = "2"
- "attackerentid" = "6"
- "type" = "128"
- "dmg_health" = "4"
__________________
Do not Private Message @me
Bacardi is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 02-01-2022 , 17:13   Re: [L4D2] Detect if jockey is up on the player
Reply With Quote #3

You can use the netprop method. It works like a charm. Just pass the player index to IsJockeyed function.

PHP Code:
bool IsJockeyed(int survivor)
{
    return 
IsJockey(GetEntPropEnt(survivorProp_Send"m_jockeyAttacker"));
}

bool IsJockey(int client)
{
    return (
client 
        
&& client <= MaxClients 
        
&& IsClientInGame(client
        && 
GetClientTeam(client) == 
        
&& GetEntProp(clientProp_Send"m_zombieClass") == 5);

__________________
Spirit_12 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 04:05.


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