what function do i have to use for this?
#1

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?
Reply
#2

Ya, CallRemoteFunction.
Reply
#3

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
Reply
#4

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?
Reply
#5

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
Reply
#6

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?
Reply
#7

Normal callbacks can get called in includes, but it stops whoever is using your include to use those functions themselves. Not advised.
Reply
#8

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)