04.01.2011, 19:32
So, i wanted to ask if server nulls the values of enums datas automaticaly when a player disconnects or i should do this by myself?
Yes it's always '0' or 'false' standard.
(false if it's a bool, 0 if it's a string). I mean, if you don't give it a value, it hasn't got a value yet. You know that? And '0' is nothing Very basic told but true EDIT: Didn't read it good enough, sorry. You said 'when player disconnets' Like already told, you have to do it yourself! See it like this: You have an 'Money[MAX_PLAYERS]' that stores the players money into a string. The max length of the array of the 'Money' is MAX_PLAYERS (standard 500). When someone with ID 3 has 5 dollar, the 'Money' in range '3' is '5'. When a player disconnects, the array will still exist! So when someone connects with ID 3, he'll have '5' into the 'Money', array '3'. Got it? |