SA-MP Forums Archive
CallLocalFunction and Calling functions directly - 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: CallLocalFunction and Calling functions directly (/showthread.php?tid=301316)



CallLocalFunction and Calling functions directly - KakarottoSSJ - 03.12.2011

What's the differences between CallLocalFunction and Calling a function via pawn?

I mean this:
pawn Код:
forward asd(dsa);
public asd(dsa){
    SendClientMessage(dsa, 0xFF0000FF, "-----========== [| A S D |] ==========---------");
    return 1;
}
//with CallLocalFunction
public OnPlayerConnect(playerid){
    CallLocalFunction("asd", "i", playerid);
    return 1;
}
//normal way
public OnPlayerConnect(playerid){
    asd(playerid);
    return 1;
}



Re: CallLocalFunction and Calling functions directly - [HiC]TheKiller - 03.12.2011

The difference is that it won't give you errors if the public doesn't exist. It can be used in command generators because the function name can be adapted to the situation easier.