Jump to content

Whmcs


hostladder

Recommended Posts

I was wondering if anyone can help explain to me how to use the new advanced whmcs module, The issue I see is that it does not have any preset things under the modules tab, also I made a configuration page for Minecraft persay, but how would I tell that to affect the xmx or xms values during the start of the server.

 

 

Thanks dudes.

Link to comment
Share on other sites

It turns out I put http:// in front of the host name, now I am stuck yet again at figuring out how to change the XMX and XMS using the configurable options. I do not know what to put before |256 or whatever amount of ram.

 

Edit:

 

In the mean time I setup TF2 Exactly like the guide says and it just says:

No results were returned. Check your TCAdmin logs. URL used:

http://cp.XXXXXXXXX.com:8880/billingapi.aspx

Edited by hostladder
Link to comment
Share on other sites

Check the billing api last command log to see what values tcadmin is receiving: Logs/Web/BillingApi.LastCommand.log

 

If the log is not created it and it takes a few seconds to get that error it means whmcs is not connecting to tcadmin. Make sure outbound connections to port 8880 are not blocked on the server where whmcs is installed.

 

For minecraft I would recommend you set the value of Xms and Xmx depending on the number of slots the client selected. In your product's config file you can do something like this:

<?php
include('default_values.php');
switch ($params["configoptions"]["Slots"])
{
case "8":
 $billing_api_values["gamevar_Xms"] = "1024";
 $billing_api_values["gamevar_Xmx"] = "1024";
 break;
case "16":
 $billing_api_values["gamevar_Xms"] = "2048";
 $billing_api_values["gamevar_Xmx"] = "2048";
break;
}
?>

Name it minecraft.php in the tcadmin2_advanced and set it as your product's config file. The syntax might be incorrect. I have not tested it. The example assumes you have a configurable option named Slots. It could be a dropdown with these values:

8|8 slots (1024MB)

16|16 slots (2048MB)

 

The client sees "8 slots (1024MB)" and "16 slots (2048MB)" in the order form. The config file gets 8 and 16.

Link to comment
Share on other sites

Fixed the api issue.

 

Also what If I wanted to sell by ram and not slots?

 

Thanks for the support.

 

Typo on the client area under actions:

Delete the files an reinstall this service.

Should be:

Delete the files and reinstall this service.

Edited by hostladder
Link to comment
Share on other sites

You still need to send minecraft the number of slots. This sets the values of Xms, Xmx and game_slots depending on what the client selected in the configurable option named "Ram"

 

<?php
include('default_values.php');
switch ($params["configoptions"]["Ram"])
{
case "1GB":
 $billing_api_values["gamevar_Xms"] = "1024";
 $billing_api_values["gamevar_Xmx"] = "1024";
 $billing_api_values["game_slots"] = 8;
 break;
case "2GB":
 $billing_api_values["gamevar_Xms"] = "2048";
 $billing_api_values["gamevar_Xmx"] = "2048";
 $billing_api_values["game_slots"] = 16;
break;
}
?>

Link to comment
Share on other sites

Will they be able to change the slots via the file editor?

edit:

 

 

nvm, I just will set it to 256 and then the panel will let them lower it just not raise it :)

 

 

New issue, upgrades via the configurable options does not upgrade the ram just player limit. So this will only work for Source games or voice not minecraft.

Edited by hostladder
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use