Brett Posted July 13, 2011 Share Posted July 13, 2011 I have a couple small questions I have run into while adding new products and features to our game panel/WHMCS panel. Hoping someone might be able to assist... 1) When adding Procon to the Products of WHMCS, I am allowing them to specify the Server IP/Port/RCON Pass of their game server. I have used the Additional Values option plenty of times, but now I need to pass 2 variables through it instead of one (Server IP/Port). How can I go about doing this? 2) We have had a lot of current customers request that we add game switching, and I am curious what the best way to add this is. I can use any sort of option to control the "switch_at_once" option to enable it, but is there any way to make a CustomField or ConfigurableOption (the games they can choose to switch to) as a sub option, so it only appears if they choose to add Game Switching? I see these fields in the default_values.php... $billing_api_values["game_id_switch_1"]=""; $billing_api_values["game_slots_switch_1"]=""; and a "Game Switching List" option in the Module, but not really sure what the best way to go about it would be. Thanks! Link to comment Share on other sites More sharing options...
LFA Posted July 14, 2011 Share Posted July 14, 2011 1- There is no way to do this in v1. It can be done in v2 using custom variables and the tcadmin2_advanced module: http://help.tcadmin.com/TCAdmin2_advanced_module_for_WHMCS#Sending_Custom_Variable_Values 2- Create one or more configurable options or custom fields of type dropdown with the list of games that you want to allow for game switching: TCXXXXX|Game 1,TCYYYYY|Game 2,TCZZZZZ|Game 3 In your php file change to this: $billing_api_values["game_id_switch_1"] = "ConfigOption:Switch 1";<code style="white-space: nowrap;"><code></code></code> $billing_api_values["game_id_switch_2"] = "ConfigOption:Switch 2";<code style="white-space: nowrap;"><code></code></code> $billing_api_values["game_id_switch_3"] = "ConfigOption:Switch 3";<code style="white-space: nowrap;"><code></code></code>or $billing_api_values["game_id_switch_1"] = "CustomField:Switch 1";<code style="white-space: nowrap;"><code></code></code> $billing_api_values["game_id_switch_2"] = "CustomField:Switch 2";<code style="white-space: nowrap;"><code></code></code> $billing_api_values["game_id_switch_3"] = "CustomField:Switch 3";<code style="white-space: nowrap;"><code></code></code> Link to comment Share on other sites More sharing options...
Brett Posted July 14, 2011 Author Share Posted July 14, 2011 Thank you very much, makes sense to me now. Running into a bit of an issue though, and still trying to locate where the kink is. minecraft_values.php looks like this $billing_api_values["switch_at_once"]=1; if($params["ConfigOption:Game Switching"] == 'None') { $billing_api_values["game_id_switch_1"]=""; } else { $billing_api_values["game_id_switch_1"]=$params["ConfigOption:Game Switching"]; } I set the Configurable Option properly in the Module settings. Then the "Game Switching" Configurable Option has these. None MINECRAFT|Minecraft The base server sets up correctly, but the second one doesn't and there is no Game Switching icon on the panel. Did I miss something simple? Link to comment Share on other sites More sharing options...
LFA Posted July 14, 2011 Share Posted July 14, 2011 Use this instead: if($params["Game Switching"] == 'None') <code style="white-space:nowrap"><code></code></code> Everything else looks ok to me. Try checking the tcadmin log billingapi.lastcommand.txt to see what values are received. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.