Player out of range (0)
Quote:
PHP Code:
PHP Code:
|
Re: Player out of range (0)
When a player is killed by the map ( including by falling ) the attacker id is 0. So you need to run a check to ensure that the attacker is a player.
|
Re: Player out of range (0)
And how do i do that? Just like that?
PHP Code:
|
Re: Player out of range (0)
You want to check straight away, so your not executing commands that aren't needed.
You can use this concept which is probably the best: !( 1 <= id <= g_iMaxPlayers ) In which case you add these pieces in: Code:
Code:
So if the attacker id is 0, the rest of your function will be ignored. |
Re: Player out of range (0)
PHP Code:
|
Re: Player out of range (0)
Sorry, your right.
|
| All times are GMT -4. The time now is 06:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.