How to get info from a player file in a different script? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to get info from a player file in a different script? (
/showthread.php?tid=499185)
How to get info from a player file in a different script? -
Aerotactics - 07.03.2014
I have an Admin FS with player variables such as their admin, vip, and beta ranks and saves them into a user file. I need to check in the GM if the player is a beta tester by checking the same user file, then perform the command, because the GM has variables that cant be read from the Admin FS. I've tried using Y_Hooks without success. I want to know the simplest way to perform this operation. Thanks in advance!
Re: How to get info from a player file in a different script? -
Corekt - 07.03.2014
You could use
PVars which can be shared across gamemodes and filterscripts.
Or create a public getter function that returns your variable and call that outside of the script using
CallRemoteFunction.
Re: How to get info from a player file in a different script? -
Aerotactics - 07.03.2014
Quote:
Originally Posted by Corekt
You could use PVars which can be shared across gamemodes and filterscripts.
Or create a public getter function that returns your variable and call that outside of the script using CallRemoteFunction.
|
I've tried callremotefunction but it wasnt working, maybe I was doing it wrong, idk. I'll try Pvars.
EDIT resolved.
Re: How to get info from a player file in a different script? -
Corekt - 07.03.2014
Show me your setup for CallRemoteFunction.