SA-MP Forums Archive
Help with callbacks - 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: Help with callbacks (/showthread.php?tid=564151)



Help with callbacks - lollypap54 - 19.02.2015

Guys, help me how to create new callback. Like this WhenPlayerEnterJail(playerid) ... How i should give 1 and ...


Re: Help with callbacks - Wolfe - 19.02.2015

Forward it then you need to make the callback and add functions


Re: Help with callbacks - Wolfe - 19.02.2015

Example;

pawn Код:
forward OnPlayerLogin(playerid)
public OnPlayerLogin(playerid)
{
     // function here
     return 1;
}
I think that's about right


Re: Help with callbacks - Vince - 19.02.2015

A callback is only a callback if it called by the server, a timer or a plugin function. Otherwise it's just a normal function and you should treat it as such.


Re: Help with callbacks - CalvinC - 19.02.2015

A callback is simply a public function that get's called by the server at specific moments, or timers i think.
However i found this tutorial when i ******d a bit: https://sampforum.blast.hk/showthread.php?tid=261570