• Shared bools w/o net library & removing things from DComboBox
    4 replies, posted
Is there a way to have bools that can update on client/server any second? Because I'm trying to make a co op thing with only 4 slots hardcoded in, and using a menu to have you select your char. I wanted to make it so if somebody picks a char it instantly disappears from the DComboBox (also dunno how to do it), it seems like using networking every second would be a solution, but it would probably be costly, messy, and wouldn't instantly update. I thought about having the bools be like (CharName)Taken and checking it when DComboBox is on or something.Help?
Arent booleans already automatically updated?
[QUOTE=bluebull107;46179062]Arent booleans already automatically updated?[/QUOTE] I mean for it to be updated on both server and client instantly. Basically what I mean is when a player selects something from a DComboBox, I want the option to disappear for all other players, using bools for each selection whether or not it is taken.
nope use networking
There's something (sort of) like this. [url]http://wiki.garrysmod.com/page/Global/SetGlobalBool[/url] [url]http://wiki.garrysmod.com/page/Global/SetGlobalVar[/url] It networks it to all clients, though, so it's not exactly what you're looking for, but it's the only thing I know of. Only the server can change it so that it affects all clients, of course. When the client selects a character I guess you'd have to use the net library to tell the server anyways, so it's kind of a moot point.
Sorry, you need to Log In to post a reply to this thread.