what function do i have to use for this? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: what function do i have to use for this? (
/showthread.php?tid=65494)
what function do i have to use for this? -
ғαιιοцт - 13.02.2009
I want to execute a function in a gm/fs from an include
so in the include, i should use a function that calls the callback: (example

OnMenuOpened
is callremotefunction good for this?
and what should i use so that OnPlayerKeyStateChange is also called in my include?
Re: what function do i have to use for this? -
MenaceX^ - 13.02.2009
Ya, CallRemoteFunction.
Re: what function do i have to use for this? -
Nero_3D - 13.02.2009
Ok let us think about it
If we include a file its just the same as we would put in directly in
so you dont need to use CallRemoteFunction in your include if you want call a function out of the gm
But still for calling a function out of a FS you need CallRemoteFunction
Re: what function do i have to use for this? -
ғαιιοцт - 13.02.2009
Quote:
Originally Posted by ♣ ⓐⓢⓢ
Ok let us think about it
If we include a file its just the same as we would put in directly in
so you dont need to use CallRemoteFunction in your include if you want call a function out of the gm
But still for calling a function out of a FS you need CallRemoteFunction
|
than what should i use?
Re: what function do i have to use for this? -
Nero_3D - 13.02.2009
Quote:
Originally Posted by °ғαιιοцт°
Quote:
Originally Posted by ♣ ⓐⓢⓢ
Ok let us think about it
If we include a file its just the same as we would put in directly in
so you dont need to use CallRemoteFunction in your include if you want call a function out of the gm
But still for calling a function out of a FS you need CallRemoteFunction
|
than what should i use?
|
The normal public name "OnPlayerKeyStateChange" or
pawn Код:
//CallMe(OnPlayerKeyStateChange, "idi", playerid, 128, 128)
#define CallMe(%1,%2,%3) %1(%3)
//... Joke lol
Re: what function do i have to use for this? -
ғαιιοцт - 13.02.2009
Quote:
Originally Posted by ♣ ⓐⓢⓢ
Quote:
Originally Posted by °ғαιιοцт°
Quote:
Originally Posted by ♣ ⓐⓢⓢ
Ok let us think about it
If we include a file its just the same as we would put in directly in
so you dont need to use CallRemoteFunction in your include if you want call a function out of the gm
But still for calling a function out of a FS you need CallRemoteFunction
|
than what should i use?
|
The normal public name "OnPlayerKeyStateChange"
|

do normal callbacks also get called in includes?
i thought not because i saw many people doing things like: "put S_OnInit" (for example) under OnGameModeInit or under OnFilterscriptInit
they do that so that they have a function in their inc that gets called when the gamemode/fs starts
so they could've also used just OnGameModeInit there?
Re: what function do i have to use for this? -
Lazarus - 13.02.2009
Normal callbacks can get called in includes, but it stops whoever is using your include to use those functions themselves. Not advised.
Re: what function do i have to use for this? -
ғαιιοцт - 13.02.2009
Quote:
Originally Posted by Lazarus
Normal callbacks can get called in includes, but it stops whoever is using your include to use those functions themselves. Not advised.
|
oh than it's ok, it's just the OnPlayerKeyStateChange that i needed in my inc to
another question, ♣ ⓐⓢⓢ said that i don't need to use CallRemoteFunction
than what Do i have to use?