Page 1 of 1
Premium Player Links
Posted: Thu Oct 08, 2015 2:14 pm
by illusions
it is possible to create links that only premium members can see
open up the menu.php file of the link you wish too hide and do this
Code: Select all
<?php
if (! IsPremiumMember())
return;
$menuEntries[]=new MenuEntry("Mix","Actions");
Mix is the name of the Module and Actions is the category menu where that link will become visible to premium members
Re: Premium Player Links
Posted: Thu Oct 08, 2015 2:23 pm
by illusions
another trick for example if you dont want none premium members to send money or items from the messages section simply do this find
Code: Select all
RunHook("message_compose.php", "moduleLink");
and change too
Code: Select all
if (IsPremiumMember()) {
RunHook("message_compose.php", "moduleLink");
}
and that's that
Re: Premium Player Links
Posted: Thu Oct 08, 2015 3:19 pm
by KyleMassacre
The thing about restricting the hook from non premium members is that it does just that. I would add the condition to the actual hook itself. Or maybe something like this would work:
Code: Select all
if (function_exists('RunHook'))
{
function RunHook($fileName,$variable = null,$run = true)
{
if($run == true)
{
return RunHook($fileName,$variable);
}
}
}
then you can do: RunHook('somefile.php',null,IsPremiumMember());