Page 1 of 1

I want to enable custom geowelcome on cod4x-ne

Posted: 20 May 2020 16:38
by yulethe1
As everyone knows about the topics with too many questions that I am bringing here to the forum, I recently discovered the mod of leiizko NE, and also what is the B3. Well, since we have a lan and wifi network independently here where we live that almost covers Havana that is not connected to the internet, we are divided by IP ranges and those things ...
Me and a colleague c happened to make a database like Maxmind which is where the database is where B3 tells you, or if it were in the same mods NE I would like more as a script, this will take it out from the file "cod4 \ NEW EXPERIENCE \ main_shared \ code \ player.gsx"

welcome ()
{
country = self getGeoLocation (2);
if (! isSubStr (country, "N /") ||! isDefined (country))
{
if (! isDefined (self.pers ["vip"]))
exec ("say Welcome / o ^ 5" + self.name + "^ 7from ^ 5" + country);
else
iprintlnbold ("Welcome ^ 3VIP ^ 5" + self.name + "^ 7from ^ 5" + country);


then once the database is made in .php as we say to b3 or NE (which I like more) that read it from our custom Maxmind, where is that query to change it

Many will say why you do that if Maxmind already exists, I repeat our network does not have internet

Re: I want to enable custom geowelcome on cod4x-ne

Posted: 20 May 2020 18:47
by Gen Stranger
yulethe1 wrote: 20 May 2020 16:38 As everyone knows about the topics with too many questions that I am bringing here to the forum, I recently discovered the mod of leiizko NE, and also what is the B3. Well, since we have a lan and wifi network independently here where we live that almost covers Havana that is not connected to the internet, we are divided by IP ranges and those things ...
Me and a colleague c happened to make a database like Maxmind which is where the database is where B3 tells you, or if it were in the same mods NE I would like more as a script, this will take it out from the file "cod4 \ NEW EXPERIENCE \ main_shared \ code \ player.gsx"

welcome ()
{
country = self getGeoLocation (2);
if (! isSubStr (country, "N /") ||! isDefined (country))
{
if (! isDefined (self.pers ["vip"]))
exec ("say Welcome / o ^ 5" + self.name + "^ 7from ^ 5" + country);
else
iprintlnbold ("Welcome ^ 3VIP ^ 5" + self.name + "^ 7from ^ 5" + country);


then once the database is made in .php as we say to b3 or NE (which I like more) that read it from our custom Maxmind, where is that query to change it

Many will say why you do that if Maxmind already exists, I repeat our network does not have internet
first NE is not al all like b3 there are no commands to type in to make it work
all controls are in the config file that came with the NE

once you put the files in the correct place you just edit the config to your liking then add
exec the config name in your server.cfg

NOTE NOTE the new experience has a _callbacksetup.gsc in it that will overwrite your edited _callbacksetup that you did. so remember to copy the edits to a text file so you can add them back
to the new _callbacksetup.gsc - You must use the new _callbacksetup.gsc that comes with the new experience for it to work.

Re: I want to enable custom geowelcome on cod4x-ne

Posted: 20 May 2020 18:57
by Gen Stranger
Well, since we have a lan and wifi network independently here where we live that almost covers Havana that is not connected to the internet,
how are you connecting to my web site if you do not have internet?

Re: I want to enable custom geowelcome on cod4x-ne

Posted: 21 May 2020 09:48
by yulethe1
Gen Stranger wrote: 20 May 2020 18:57
Well, since we have a lan and wifi network independently here where we live that almost covers Havana that is not connected to the internet,
how are you connecting to my web site if you do not have internet?
hahahaha mentally ....
not when I talk about not having the internet, it is that in Cuba we have a private network that we started as an internet alternative that at that time when it started about 10 years ago
We started with cables in the neighborhood, then we connected one neighborhood with others, and when a similar structure appeared in another, more distant group, impossible by cable, we opted for the Wi-Fi version.
the first connections were by wifi equipment such as trendnet tew-430apb and even usb-wifi, later we met ubiquity, and later microtic and a network called SNET was created which is subject to change now for political reasons but well this network has no way out to Internet
I connect to your site by mobile data that I pay a package from my cell phone (which is not an issue to explain now) and I use it as a modem to my PC, there are others that connect through different services, either adsl or wifi points

That is why we made the database of our IP ranges to know where each one connects, it is something interesting, and we wanted to know where the NE line or script is (which searched for it and cannot find it) to read. From the internet to identify each country and city, tell him to read our database to identify our neighborhoods or neighborhoods.

Re: I want to enable custom geowelcome on cod4x-ne

Posted: 21 May 2020 11:51
by Gen Stranger
I see you are part of a network that is not on the internet and play games there
but do have access to the internet itself. Pretty smart that you control who has access to your network.
now since your network is not on the internet I doubt that goelocation will work on it.
you can always test it with my message script since the welcome part does use a part of geolocation

viewtopic.php?f=251&t=5729

in any case look for the welcome block in the new experience players.gsc to see how it's done there
search for welcome() in players.gsc and it should start with welcome () without the ; so welcome(); is not the spot but welcome() is

copied from https://github.com/callofduty4x/CoD4x_S ... ference.md
you will have to search for goeip.dat on the internet

GetGeoLocation(int <type>)

Returns the country code/name for targeted player. For successful usage the file "GeoIP.dat" has to be placed inside CoD4 directory.

Available types:

0 — Returns two-characters-long country code as string (e.g. US, FR, etc.)
1 — Returns three-characters-long country code as string (e.g. USA, FRA, etc.)
2 — Returns country name as stromg (e.g. United States, France, etc.)
3 — Returns continent ID as string (e.g. AN, EU, etc.)
4 — Returns index from DB as integer

Usage example: loc = self getgeolocation(2);

Re: I want to enable custom geowelcome on cod4x-ne

Posted: 21 May 2020 12:34
by yulethe1
great info is here to study it all

I only clarify one thing
Gen Stranger wrote: 21 May 2020 11:51 .....Pretty smart that you control who has access to your network....
when I am going to use the internet through my phone, I disconnect the PC from the network and I restrict all the PC except the browser, so that I do not run out of mobile data

and from the forum I keep everything (web pages and files) to read it offline later, thanks gen, then I count the results
This is the method I use unless I am downloading something and I am checking other things while