It's hard to tell where the error is when the entire function is full of custom variables and functions. The easiest way to find out where your mistake is is by putting log messages after each check, so you can see where the problem appears.
Some of the things in there don't make any sense to me. Why are you using magic numbers instead of constants? Why this?
PHP Code:
if (cMessage[0] == 64)
Is this a decompiled plugin?
This may help you -
https://forums.alliedmods.net/showthread.php?t=272418
__________________