Jump to content

Diffent Location = diffent Game_ID


CobbyJUK

Recommended Posts

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 213 Guests (See full list)

    • There are no registered users currently online
×
×
  • 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