View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-01-2020 , 17:59   Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced
Reply With Quote #16

Common Scripting Mistakes section:
Quote:
Originally Posted by Silvers
GetClientOfUserId to retrieve a clients index from userid, if they have disconnected the value will be 0.
People can erroneously conclude that if returned value != 0, IsClientInGame check is not required.
However, here is
https://hlmod.ru/threads/datapack-i-...99/post-444752
2 mentions (R1KO, komashchenko) that sometimes it is the case when GetClientOfUserId() != 0, but client is not in game.
(this require correction in your next code sample too).

SomeFunction() - no offence. This part break my mind. Not the best sample, IMHO.



Already included in 1st post /or skipped (from discussion in PM)
Spoiler
Attached Files
File Type: sp Get Plugin or Get Source (ac_debug.sp - 736 views - 1.3 KB)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 03-29-2020 at 09:40.
Dragokas is offline