Filterscript and Gamemode?
#1

Hi all...
I have a RP gamemode and a Vehicle System FS.
It's all perfect, but when I buy a vehicle, the money doesn't decrease, because of Gamemode anti-moneyhack.
I have tried to add in the FS the PlayerInfo[playerid][pCash] and OnPlayerSave, but nothing happens...
What can I do?
Thanks
Reply
#2

Sorry the doublepost, but this is very urgent
Reply
#3

I would use properties, so your Gamemode can communicate with the Filterscript.
https://sampwiki.blast.hk/wiki/Setproperty
https://sampwiki.blast.hk/wiki/Getproperty

Or u can use the GVar-Plugin (would be easier) to create global variables.
https://sampforum.blast.hk/showthread.php?tid=151076
Reply
#4

Can you help me with some examples please?
Reply
#5

In your gamemode:
pawn Код:
forward PlayerCash(playerid);
public PlayerCash(playerid)
{
    return PlayerInfo[playerid][pCash];
}
In your filterscript:
pawn Код:
#define PlayerCash(%0) CallRemoteFunction("PlayerCash", "i", %0);

Do the same with giving money.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)