SA-MP Forums Archive
CallRemoteFunction Enums - 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: CallRemoteFunction Enums (/showthread.php?tid=585509)



CallRemoteFunction Enums - ExogenZC - 14.08.2015

Hi,

How can i call an enum that i have in my GM in another Filterscript ?

for e.x, i have this enum:

enum pInfo
{
pName,
pPassword[64],
pCash,
pAge,
pSex,
pSkin,
Float: pXPos, //player position
Float: pYPos, //player position
Float: pZPos, //player position
IsRegistering,
IsLogged[MAX_PLAYERS],
pBank,
pHouse
};
new PlayerInfo[MAX_PLAYER_NAME][pInfo];

and i want call it from an "If "in my HouseSystem FilteScript..

PS: I don't really understand CallRemoteFunction.
HELP..


Re: CallRemoteFunction Enums - IllidanS4 - 14.08.2015

You can't call something that isn't a function.


Re: CallRemoteFunction Enums - ExogenZC - 14.08.2015

Quote:
Originally Posted by sprtik
Посмотреть сообщение
You can't call something that isn't a function.
then, how can i do ? :c


Re: CallRemoteFunction Enums - Vince - 14.08.2015

Put the enum (but not the array itself) in a separate include file and include it in any and all scripts you want to use it in. Then you can write a function in your main script like:
pawn Код:
public GetPlayerInfo(playerid, pInfo:info)
    return PlayerInfo[playerid][info];
Then, in your filterscript you do this (for example):
pawn Код:
CallRemoteFunction("GetPlayerInfo", "dd", playerid, pCash);
It's probably not going to work for strings, however.