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

Limit sending an entitys property (???)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wooler
Junior Member
Join Date: Apr 2019
Old 05-14-2019 , 09:27   Limit sending an entitys property (???)
Reply With Quote #1

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!
wooler is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 05-14-2019 , 15:16   Re: Limit sending an entitys property (???)
Reply With Quote #2

Quote:
Originally Posted by wooler View Post
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!
in my experience trying to settransmit glows on clients has failed...i've heard from the grapevine there's a way but never figured it out, nor have i found anything on allied modders as how to do it.
MasterMind420 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 05-14-2019 , 18:38   Re: Limit sending an entitys property (???)
Reply With Quote #3

This should help...

https://forums.alliedmods.net/showthread.php?p=2476344
__________________
Neuro Toxin is offline
wooler
Junior Member
Join Date: Apr 2019
Old 05-15-2019 , 08:37   Re: Limit sending an entitys property (???)
Reply With Quote #4

Quote:
Originally Posted by MasterMind420 View Post
in my experience trying to settransmit glows on clients has failed...i've heard from the grapevine there's a way but never figured it out, nor have i found anything on allied modders as how to do it.
Thanks, settransmit helped alot

Quote:
Originally Posted by Neuro Toxin View Post
I was looking through the glow plugins on alliedmodders and I managed to get this far, but as I'm a noob coder, I'm currently having some troubles with determining how to check if the player was the one dealing the damage. Here are the snippets from my code:

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

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.
wooler is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 05-15-2019 , 13:28   Re: Limit sending an entitys property (???)
Reply With Quote #5

maybe you can use this

https://forums.alliedmods.net/showpo...&postcount=348

with m_flDetectedByEnemySensorTime

not sure
__________________
8guawong is offline
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 05:26.


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