CobbyJUK Posted August 29, 2011 Share Posted August 29, 2011 Hello, im trying to make a custom config this is my setup at the moment. all my UK servers are Windows and all my German Servers are Linux, so i need a script to change the game_id on diffent location i put a support ticket in and they said to put the following at the bottom of the default_values.php i renamed for starters and called it COD4.php and uploaded it and set it in the whmcs module works fine this is the code they said to put at the bottom so i did but it doesnt work, as have to leave the game_id blank in the whmcs module, the voice servers and so on sets up correctly if( $billing_api_values["game_datacenter"] == 1 ){ $billing_api_values["game_id"] = 26; } if( $billing_api_values["game_datacenter"] == 2 ) { $billing_api_values["game_id"] = 27; } any idea why it isnt working? as i said i think its because the game_id is now blank in whmcs, i have tried loads of diffent things to get it to work but with no luck. Link to comment Share on other sites More sharing options...
CobbyJUK Posted August 29, 2011 Author Share Posted August 29, 2011 right im getting there, but it will one make the datacenter 2 but not 3 when choosen. code so far if( $billing_api_values["game_datacenter"] == "2" ) { $billing_api_values["game_id"] ="79"; } elseif( $billing_api_values["game_datacenter"] == "3" ) { $billing_api_values["game_id"] ="80"; } Link to comment Share on other sites More sharing options...
CobbyJUK Posted August 29, 2011 Author Share Posted August 29, 2011 sorted, heres the code if anyone wants it. change the Game Server Location to the name of your Field Name in whmcs. Game Server Location = Field Name ------------------------ if( $params["customfields"]["Game Server Location"] == "2" ) { $billing_api_values["game_id"] ="79"; } elseif( $params["customfields"]["Game Server Location"] == "3" ) { $billing_api_values["game_id"] ="80"; } ------------------------ Link to comment Share on other sites More sharing options...
adamnp Posted August 29, 2011 Share Posted August 29, 2011 Nice -- I can forsee utilizing this for a few things.... Quick trick to figure the id's out easier also -- when in the WHMCS config part for the gameid's, simply view the page source code -- scroll down to where you find each of your game entries, and you should see the ID's that are given to each. The same works for packages -- You can get the GID and PID easily to create custom package/price options right from URL. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.