SA-MP Forums Archive
Facing issues with CallRemoteFunction - 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: Facing issues with CallRemoteFunction (/showthread.php?tid=528495)



Facing issues with CallRemoteFunction - IKnowWhatIAmDoing - 28.07.2014

Trying to call a public function at a filterscript. Function is at gamemode and I want it to be called at filterscript.

pawn Код:
forward GivePlayerMoneyEx(playerid,money); // gamemode
public GivePlayerMoneyEx(playerid,money)
{
    SMoney[playerid] = GetPlayerMoney(playerid) + money;
    GivePlayerMoney(playerid,money);
    printf("called");
}
#define GivePlayerMoney GivePlayerMoneyEx
pawn Код:
forward GivePlayerMoneyExa(playerid,money); // filterscript
public GivePlayerMoneyExa(playerid,money)
{
    CallRemoteFunction("GivePlayerMoneyEx", "ii",playerid,money);
}
#define GivePlayerMoney GivePlayerMoneyExa



Re: Facing issues with CallRemoteFunction - IKnowWhatIAmDoing - 29.07.2014

Bump


Re: Facing issues with CallRemoteFunction - Blademaster680 - 29.07.2014

I think you have to make the function in the FS and call it in the GM


Re: Facing issues with CallRemoteFunction - IKnowWhatIAmDoing - 29.07.2014

Quote:
Originally Posted by Blademaster680
Посмотреть сообщение
I think you have to make the function in the FS and call it in the GM
How to call the function on the filterscript ?