AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [L4D2] Detect if jockey is up on the player (https://forums.alliedmods.net/showthread.php?t=336174)

raizo11 02-01-2022 10:12

[L4D2] Detect if jockey is up on the player
 
I want to detect if jockey is up on the player. How can do that?

Bacardi 02-01-2022 15:16

Re: [L4D2] Detect if jockey is up on the player
 
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"


Spirit_12 02-01-2022 17:13

Re: [L4D2] Detect if jockey is up on the player
 
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);




All times are GMT -4. The time now is 17:52.

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