Use one var in multiply filterscripts
#1

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?
Reply
#2

CallRemoteFunction
Reply
#3

Quote:
Originally Posted by mastermax7777
Посмотреть сообщение
CallRemoteFunction
What?
Reply
#4

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
Reply
#5

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
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)