Raised This Month: $344 Target: $400
 86%   Almost there!

Get the gun owner


Post New Thread Reply   
 
Thread Tools Display Modes
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-28-2017 , 16:00   Re: Get the gun owner
Reply With Quote #11

Quote:
Originally Posted by [email protected] View Post
Because player can disconnect and another connecting player can get his slot.
Clear the field on disconnect?
__________________
HamletEagle is offline
[email protected]
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 08-28-2017 , 16:17   Re: Get the gun owner
Reply With Quote #12

Quote:
Originally Posted by HamletEagle View Post
Clear the field on disconnect?
Yeah, you can loop through all weapon entities and check&clear this field.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 08-28-2017 , 18:15   Re: Get the gun owner
Reply With Quote #13

I thought it would be easier to store userid instead of looping all entities and checking owner.

Also that thing with lost owner I fixed. Forgot to add else statement. It must set value to 0 only if owner was not found.
siriusmd99 is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 08-28-2017 , 18:16   Re: Get the gun owner
Reply With Quote #14

Quote:
Originally Posted by [email protected] View Post
Because player can disconnect and another connecting player can get his slot.
On client disconnect set it to 0?
KiLLeR. 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 15:01.


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