Hey - 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: Hey (
/showthread.php?tid=609260)
Hey -
Micko123 - 10.06.2016
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??
Re: Hey -
justjamie - 10.06.2016
simple, remove your enums from the gamemode and let them load in your filterscript instead.
Re: Hey -
Stinged - 10.06.2016
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.
Re: Hey -
Micko123 - 10.06.2016
thank you guys
Re: Hey -
Micko123 - 10.06.2016
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