Limit sending an entitys property (???)
Hello,
I'm a beginner at SourcePawn and coding in general, and I have a problem with a plugin I'm trying to make. I'm using the SetEntPropFloat function to set glowing outlines for a player using m_flDetectedByEnemySensorTime. I successfully managed to code the plugin, but my problem is that the outline is visible to all the players on the server. Could someone explain to me how I can limit it to be seen by only the player causing the damage (iAttacker)? By managing the way the data is sent I assume (Prop_Send ???)? Here's the part of the code I need to change: SetEntPropFloat(iVictim, Prop_Send, "m_flDetectedByEnemySensorTime", GetGameTime() + 5); Even though I'm a noob at coding, I can do some efficient research, so any nudge towards the right direction would be appreciated if this is indeed possible! :) |
Re: Limit sending an entitys property (???)
Quote:
|
Re: Limit sending an entitys property (???)
|
Re: Limit sending an entitys property (???)
Quote:
Quote:
https://paste.ofcode.org/RZRDe6k8sw2hEcfxQD4BgM Any suggestions on how I could produce the callback function for SDKHook that checks if the player was the one doing the damage (== if the glow should be transmitted to the player being checked)? Can I somehow create a glows_caused list (entry deleted with a timer or in player_death event) for the iAttacker client that references the unique entities (glows) that a player has created by dealing damage, so I can check if a player is the one who caused that exact glow? If yes, how can i check if the hooked entity is found in a players glows_caused list? Does the SDKHook give me something unique about the entity I can check against? Is there a more simple way of doing this? This is getting way over my head and skill-level :roll: TLDR explanation of what I want from the plugin; Player that takes damage shows a glow effect for the player dealing the damage. Only the player dealing the damage will see the glow, and the glow is removed after a timer runs out / playerdeath event. |
Re: Limit sending an entitys property (???)
maybe you can use this
https://forums.alliedmods.net/showpo...&postcount=348 with m_flDetectedByEnemySensorTime not sure |
All times are GMT -4. The time now is 23:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.