SA-MP Forums Archive
Calling a public function so it works in another script. - 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: Calling a public function so it works in another script. (/showthread.php?tid=441646)



Calling a public function so it works in another script. - [WSF]ThA_Devil - 03.06.2013

Hello, I wanted to create OnPlayerLogin callback, but it's not quetly working my way.
What I have:
include:
pawn Code:
forward OnPlayerLogin(playerid);
Admin Script:
pawn Code:
CallLocalFunction("OnPlayerLogin","i",playerid);
If i try calling OnPlayerLogin(playerid) it says that it's unimplemented.

Another script ex. Gamemode:
pawn Code:
public OnPlayerLogin(playerid)
{
    SendClientMessage(playerid,0xFFFFFFAA,"You've logged in!");
    return 1;
}
so, could you tell me what is the thing I've done wrong?
Thanks.


Re: Calling a public function so it works in another script. - [WSF]ThA_Devil - 03.06.2013

nm. I did. Thanks