index out of bounds.
Writes me index out of bounds :/
PHP Code:
PHP Code:
|
Re: index out of bounds.
Attacker can be an entity so > max_clients value. Just check if Attacher is a player. ( 1 <= id <= max_clients )
|
Re: index out of bounds.
Thanks !
|
Re: index out of bounds.
PHP Code:
|
Re: index out of bounds.
Code:
|
Re: index out of bounds.
Your code is useless and wrong, Sn!ff3r. Wrong in the way of you should do a check to see if max_clients is already saved ( better to save it out of this function though ) and is_user_connected is not needed. And using a macro would be more appropriate.
Code:
|
Re: index out of bounds.
OK ok thanks :D
Example ^^ PHP Code:
|
Re: index out of bounds.
1. You don't need 'is_user_connected'.
2. Just use the macro wich i and ark have post. 3. You can avoid using 2 variables (floatround) |
Re: index out of bounds.
Quote:
Okey full code: PHP Code:
|
Re: index out of bounds.
Code:
if(is_user_connected(i_Attacker) || is_user_connected(i_Victim)) Code:
if(IsPlayer(i_Victim) && IsPlayer(i_Attacker)) |
| All times are GMT -4. The time now is 16:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.