Variable with IP..
I couldn't name this topic properly, but what I want to do is something like this without tries.. :
g_Lives[ "ip here (string)" ] = 2; And than check it where i need it new ip = get_user_ip... if( g_Lives[ ip ] > 0 ) |
Re: Variable with IP..
That sounds strange and useless. It's impossible in the way you want it, but you can use a trie to set cells by IP.
|
Re: Variable with IP..
Just use the player id....
|
Re: Variable with IP..
Quote:
And is better since you dont need to check user IP and ID is safe enough. If you asking that because you need to save data, then that will not work because it will be reseted on map change. If you want to save data you should use nvault/sql or if you think you can, i would recomment some ini file. But if you want to save data, i guess you won't get help by saving it by IP. It would sound like non-steam so you would only get help if you want save by steam id. Note: I said "If you asking that because you need to save data". I am not sure what you really need here. |
Re: Variable with IP..
No, i need exactly this, not id, because i want to save player's lives for 1map, so they can't exploit it with reconnecting.
Flick3rR, could you please show me a simple example with trie usage? |
Re: Variable with IP..
What you want is not possible. You must use Trie's.
Searching would have given you a [urlhttps://forums.alliedmods.net/showthread.php?t=201872&highlight=trie]tutorial[/url] on how to use Trie's |
| All times are GMT -4. The time now is 13:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.