Use one var in multiply filterscripts - 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: Use one var in multiply filterscripts (
/showthread.php?tid=405171)
Use one var in multiply filterscripts -
Swimor - 05.01.2013
Use one var in multiply filterscripts
Hello,
i'm trying to build anticheat and i did like this:
Код:
enum acEnum {
pMoney
};
new
acInfo[MAX_PLAYERS][acEnum];
end some stock to change the money...
i included this in 2 filterscripts (1 - cheat detect, 2 - admin mod) but when i changeing my money this restores me what i set on the cheat detect.
i make some tests and i got that the var pointing to different memory points, how i can do that the var pionts to one memory point?
Re: Use one var in multiply filterscripts -
mastermax7777 - 05.01.2013
CallRemoteFunction
Re: Use one var in multiply filterscripts -
Swimor - 05.01.2013
Quote:
Originally Posted by mastermax7777
CallRemoteFunction
|
What?
Re: Use one var in multiply filterscripts -
mastermax7777 - 06.01.2013
Quote:
Originally Posted by Swimor
What?
|
https://sampwiki.blast.hk/wiki/CallRemoteFunction
use this to pass money through this function and assign a new variable in your other script? you can search for more examples
Re: Use one var in multiply filterscripts -
[HK]Ryder[AN] - 06.01.2013
Or you can use PVars.
They are specific variables which can be set to a player and are NOT related to a specific script.
For example, in the gamemode if you do SetPVarInt(playerid, "Money", GetPlayerMoney(playerid));
In the filterscript you can do GetPVarInt(playerid, money);
It will return the same value as you set it in the gamemode.
For more info, look here -
https://sampwiki.blast.hk/wiki/Per-player_variable_system
Re: Use one var in multiply filterscripts -
mastermax7777 - 06.01.2013
Quote:
Originally Posted by [HK]Ryder[AN]
Or you can use PVars.
They are specific variables which can be set to a player and are NOT related to a specific script.
For example, in the gamemode if you do SetPVarInt(playerid, "Money", GetPlayerMoney(playerid));
In the filterscript you can do GetPVarInt(playerid, money);
It will return the same value as you set it in the gamemode.
For more info, look here - https://sampwiki.blast.hk/wiki/Per-player_variable_system
|
ah cool.. didn't know u could do that.. neat +repped