Quote:
Originally Posted by Bugsy
However, you are looping through more times than needed (1->maxplayers) and checking get_user_team and is_user_alive with each iteration. My method is more proper and efficient, why not get newer coders started using the correct methods?
|
This guy is asking a way how to use a simple native or something like that. I'm just saying that for people who are starting scripting can be little hard to understand the best and optimized ways. I wouldn't start explaining them something todally advanced, if there's a lot of easier way to understand, what would work almost as good as the others. Just thought that if he gots some problems on your way, he could use the other.
Quote:
Originally Posted by fysiks
@Snow & HleV
I think you both will get runtime errors for checking the team of an empty slot.
(I always get runtime errors for checking the team of empty slots)
|
Quote:
Originally Posted by Bugsy
In that case, an is_user_connected() will also be in order.
|
Somehow you probably didn't see that I first checked if the player is alive, and after that the team. Ofc connected check could be little better here like for example, but he was talking about slaying, so slaying dead players wouldn't be that good.