CallRemoteFunction Enums
#1

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

You can't call something that isn't a function.
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)