Quote:
Originally Posted by Konstantinos
I don't understand why can't you just execute the appropriate queries to that script and need to do it remotely.
If for whatever reason you have, you want to load data to another script than the one you executed the query, you can save the result in memory and pass it to the other script, retrieve data and delete it. I just tested it with different connection handles and different selected databases and there's no problem.
pawn Код:
// gamemode: mysql_tquery(connection_handle, query, "OnLoadSomething", "");
forward OnLoadSomething(); public OnLoadSomething() { CallRemoteFunction("fs_OnLoadSomething", "i", _: cache_save()); }
pawn Код:
// filterscript: forward fs_OnLoadSomething(Cache: cache_id); public fs_OnLoadSomething(Cache: cache_id) { if (!cache_is_valid(cache_id)) return; cache_set_active(cache_id);
// cache functions to retrieve.. cache_set_active(Cache: 0); cache_delete(cache_id); }
|
Yep I used that way when I said didn't work. Because I was trying to avoid another public function; this is called when player tries to login and I have a system to keep player logged in if same nick and ip so it shouldn't check after that.
This made me notice i was missing something that would let player rejoin and play again. Thanks.