Useful functions
#4

Just a few things I want to point out dude, only so you can fix them (I'm being constructive).

Calling the GetMaxPlayers() function on each itteration is pointless as it will always give the same return so you are wasting every single call after the first one. You can store the result of the function first outside the loop and then use this value in the loop if you wish to use it instead of the MAX_PLAYERS define.

The string comparison in the disconnect function is wrong, you have used your variable name as a string "...". I think this is what Tr1viUm was pointing out to you unless I missed something else.

The DisconnectAllNPC() function will only kick the first found NPC as you kill the loop on the first itteration which finds a valid NPC.
Reply


Messages In This Thread
Useful functions - by [HUN]Gamestar - 04.09.2009, 14:48
Re: Usefull functions - by Tr1viUm - 04.09.2009, 14:58
Re: Usefull functions - by [DrM]spatrik - 04.09.2009, 15:09
Re: Usefull functions - by Donny_k - 04.09.2009, 15:53
Re: Usefull functions - by Daem - 04.09.2009, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)