[L4D2] About "IsClientInGame()"
I'm having some problems writing a plugin.
The code snippet looks like this PHP Code:
"IsClientInGame()" sometimes thinks the client is not in the game. The following situations have occurred in the test: Code:
1.Only the first player to join is considered "in game". Initially, it throws Code:
03/24/2023 - 19:59:23: [SM] Call stack trace: I also tried changing the cvars "sv_lan" and "sv_cheats", but, the miracle didn't happen.:( Can anyone tell me what exactly is going on? I'm very confused....... |
Re: [L4D2] About "IsClientInGame()"
Wrong section, and the snippet provided doesn't give any clue about your exception (the error is the line above "Call stack trace" that you didn't copy+paste)
anyway, your "for" loop is wrong, if you use "return" inside, it will exit the "CheckStatus" function, use "continue" instead to go to the next index, otherwise it will stop looping in the first "not in game" client |
Re: [L4D2] About "IsClientInGame()"
Quote:
PS.I only see this error in the log, so I didn't paste the other lines because they are the same. |
Re: [L4D2] About "IsClientInGame()"
They may be the same, but the specific error message is above
E.g: PHP Code:
In your case if you are using "EventHookMode_PostNoCopy" you can't use Event.GetInt functions, cause EventHookMode_PostNoCopy is just a notification, without any values from event, just triggers after it was sent. So you will keep having errors in log, just change to EventHookMode_Post (or leave it blank cause is the default value) PHP Code:
|
Re: [L4D2] About "IsClientInGame()"
PHP Code:
PHP Code:
|
Re: [L4D2] About "IsClientInGame()"
that should be right
PHP Code:
Code:
L 03/24/2023 - 19:59:23: [SM] Blaming: test.smx , the problem is only because of "return;" Anyway thanks. |
Re: [L4D2] About "IsClientInGame()"
PHP Code:
|
All times are GMT -4. The time now is 22:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.