SA-MP Forums Archive
Can i make FS in Include ? - 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: Can i make FS in Include ? (/showthread.php?tid=471389)



Can i make FS in Include ? - dakata994 - 22.10.2013

Can i make FS in Include cuz i want to put 2 FS that they are with IG Money and i have Anti-Money hack anticheat and i can't use it as FS.When i put FS in include file and include it to my server to it will works ? Or it will be the same like FS ?


Re: Can i make FS in Include ? - Patrick - 22.10.2013

EDIT You could simply transfer the Filterscript to your GameMode It isn't that hard.


Re: Can i make FS in Include ? - dakata994 - 22.10.2013

I mean the FS gives me money and the server Anti-money hack returns my old money. When i make the FS in include do it will be the same ?


Re: Can i make FS in Include ? - Patrick - 22.10.2013

Quote:
Originally Posted by dakata994
Посмотреть сообщение
I mean the FS gives me money and the server Anti-money hack returns my old money. When i make the FS in include do it will be the same ?
Mind showing us your Anit-Money Hack code?


Re: Can i make FS in Include ? - dakata994 - 22.10.2013

Here you go:

88--90
Код:
//==========================[Anti-Money Hack]===================================
#define UpdateMoneyBar   GivePlayerMoney
#define ResetMoneyBar    ResetPlayerMoney
10212--10237
Код:
//=============================[Anti-Money Hack Functions]======================
stock GivePlayerCash(playerid, money)
{
	PlayerInfo[playerid][pCash] += money;
	ResetMoneyBar(playerid);
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
	return PlayerInfo[playerid][pCash];
}
stock SetPlayerCash(playerid, money)
{
	PlayerInfo[playerid][pCash] = money;
	ResetMoneyBar(playerid);
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
	return PlayerInfo[playerid][pCash];
}
stock ResetPlayerCash(playerid)
{
	PlayerInfo[playerid][pCash] = 0;
	ResetMoneyBar(playerid);
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
	return PlayerInfo[playerid][pCash];
}
stock GetPlayerCash(playerid)
{
	return PlayerInfo[playerid][pCash];
}
And that's all i find. + I'm Using JunkBuster


Re: Can i make FS in Include ? - dakata994 - 22.10.2013

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
EDIT You could simply transfer the Filterscript to your GameMode It isn't that hard.
Okay but it's the PPC_Houseing FS..... i need more than 20 mins to put it...


Re: Can i make FS in Include ? - Pottus - 22.10.2013

There are a few choices.

#1 - Make the FS a include using y_hooks or another hooking method of your choice
#2 - Change your money stocks to public functions then they can be called from the FS with CallRemoteFunction()

I would go for #1 my self but #2 is good if you plan on loading/unloading your FS a lot otherwise you shouldn't be using an FS that would be gamemode code.


Re: Can i make FS in Include ? - dakata994 - 23.10.2013

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
There are a few choices.

#1 - Make the FS a include using y_hooks or another hooking method of your choice
#2 - Change your money stocks to public functions then they can be called from the FS with CallRemoteFunction()

I would go for #1 my self but #2 is good if you plan on loading/unloading your FS a lot otherwise you shouldn't be using an FS that would be gamemode code.
Okay but y_hooks include ?
EDIT:How to use it ?


Re: Can i make FS in Include ? - HardRock - 23.10.2013

Код:
Okay but y_hooks include ?
Yes. Download: https://sampforum.blast.hk/showthread.php?pid=1696956#pid1696956


Re: Can i make FS in Include ? - dakata994 - 23.10.2013

Okay but i searched and i can't understand how to use it .. ?