A few errors.
So this block is intended to select a random player, but does not.
PHP Code:
PHP Code:
|
Re: A few errors.
Do what the instant respawn plugin does, gets from serial
also are you calling them blocks because your unaware that these are functions? or am I just being a dick. https://forums.alliedmods.net/showthread.php?p=2174552 |
Re: A few errors.
Any particular reason you're caching which team players are on and whether they're alive?
If that cache data is stale, that could very much be why you're having issues. Side note: GetClientOfUserId returns -1 if the player disconnected. |
Re: A few errors.
Quote:
|
Re: A few errors.
Yeah probably PlayerTeam and/or bIsPlayerAlive aren't filled properly leading to unexpected results. You don't need to store them anyway, theres TF_GetClientTeam and IsPlayerAlive functions to do that.
Also please stop using tabs in front of if/for. 1 space is enough. |
Re: A few errors.
-_-
int Client) any Client. |
Re: A few errors.
Doesn't really matter. The variable type can be anything.
EDIT: unless you mean GetZombieTimer, that one has wrong function prototype. Should be public Action GetZombieTimer(Handle timer, any data) |
Re: A few errors.
Quote:
|
Re: A few errors.
Not sure what the point of bIsPlayerAlive is but seems like you're respawning already alive clients. (Which doesnt work?)
Shouldnt it be: Code:
PlayerTeam[IGC] == TFTeam_Blue && !bIsPlayerAlive[IGC] And PHP Code:
PHP Code:
|
Re: A few errors.
Quote:
Thanks man, appreciate pointing out the errors. |
All times are GMT -4. The time now is 00:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.