#1

So guys i have this race system that i want to put in another gamemode. But when i put it directly in gamemode compiler won't work. So i want to put it as FS. So i have question here. How can i make it work with my enum from gamemode??
Reply
#2

simple, remove your enums from the gamemode and let them load in your filterscript instead.
Reply
#3

I'll take PlayerInfo[playerid][Admin] as an example:

Код:
// In your gamemode
forward GetAdminLevel(playerid);
public GetAdminLevel(playerid)
{
    return PlayerInfo[playerid][Admin];
}

// In your filterscript
GetAdminLevel(playerid)
{
    return CallRemoteFunction("GetAdminLevel", "i", playerid);
}
And then use GetAdminLevel.
You can also make it a macro instead of a function if you want.
Reply
#4

thank you guys
Reply
#5

So i use this in FS right
PHP код:
if(GetAdminLevel(playerid) >= 3
when i want to check is player admin. i tried that. no warns no errors but it says you need to be admin. i changed enum also
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)