Raised This Month: $319 Target: $400
 79%   Almost there!

Solved Question to sourcepawn guru, how to understand who started shooting first


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hennesy
Member
Join Date: Nov 2018
Location: Czech Republic
Old 08-12-2021 , 15:19   Question to sourcepawn guru, how to understand who started shooting first
Reply With Quote #1

Hello mates.

Who can help me, how can I check that index1 started first shootfire to
index2? you need to find the initiator of the shooting.

I simply cannot build logic even, my level of knowledge does not allow making such a function.

Thanks.
__________________
I'm sorry for my english

Last edited by sneaK; 08-14-2021 at 13:05. Reason: Restore to previous version.
Hennesy is offline
little_froy
Member
Join Date: May 2021
Old 08-12-2021 , 22:49   Re: Question to sourcepawn guru, how to understand who started shooting first
Reply With Quote #2

try these https://sm.alliedmods.net/new-api/sdkhooks/SDKHook
https://sm.alliedmods.net/new-api/sd...oks_TakeDamage
use a var to save players' hurt state, the first injured is the victim, and the attacker is the initiator.

Last edited by little_froy; 08-12-2021 at 22:52.
little_froy is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-13-2021 , 02:13   Re: Question to sourcepawn guru, how to understand who started shooting first
Reply With Quote #3

Quote:
Originally Posted by little_froy View Post
try these https://sm.alliedmods.net/new-api/sdkhooks/SDKHook
https://sm.alliedmods.net/new-api/sd...oks_TakeDamage
use a var to save players' hurt state, the first injured is the victim, and the attacker is the initiator.
i was going to suggest hook weapon_fire instead
using your method what happens if the player that was hurt is a bad shot?
__________________

Last edited by 8guawong; 08-13-2021 at 02:14.
8guawong is offline
Hennesy
Member
Join Date: Nov 2018
Location: Czech Republic
Old 08-13-2021 , 02:37   Re: Question to sourcepawn guru, how to understand who started shooting first
Reply With Quote #4

Quote:
Originally Posted by little_froy View Post
try these https://sm.alliedmods.net/new-api/sdkhooks/SDKHook
https://sm.alliedmods.net/new-api/sd...oks_TakeDamage
use a var to save players' hurt state, the first injured is the victim, and the attacker is the initiator.

I wrote that I do not understand exactly how to compose the logic with the code. I already know that I need to use OnTakeDamage
__________________
I'm sorry for my english

Last edited by Hennesy; 08-13-2021 at 05:18.
Hennesy is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 08-13-2021 , 19:45   Re: Question to sourcepawn guru, how to understand who started shooting first
Reply With Quote #5

Why do you need to know who shoots first?
__________________
Marttt is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-16-2021 , 21:38   Re: Question to sourcepawn guru, how to understand who started shooting first
Reply With Quote #6

Quote:
Originally Posted by Marttt View Post
Why do you need to know who shoots first?
https://forums.alliedmods.net/showthread.php?t=333774
https://forums.alliedmods.net/showthread.php?t=333785

based on his other posts he might be working on a TTT/Jailbreak/etc type of mod
__________________
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 13:36.


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