In game commands
-
Hi,
I think after much heartache :-); I am getting close to getting things working with the http plugin and in game webadmin stuff.
I just cannot seem to get things like !admins, !rules, !stats etc working. julia.cfg loaded ok because the messages written there are scrolling. (although they are not called from messages.gsx in neho folder because i made my own _servermessages.gsc and temporary placed elsewhere but is is still reading whats on julia.cfg)
I have set the httpplugin url in julia (not sure if the / is supposed to be there or not but i have tried both ways). added urls in scriptcommands.gsx etc and http plugin is loaded. I am at the stage where it is either something small that I am missing or it is going to be HUGE and which case I give up..Taking me days/weeks maybe more and I still cannot get it to work. Very easy when you know how so hoping I can get some help. I have looked and tried to understand and compare all as advised previously but obviously I am not clever enough!
Any help greatly appreciated, As always thank you.
-
@smiley in julia cfg
// JULIA HTTP PLUGIN (DONT FORGET THE SLASH "/" ON URL END) set julia_json_url "https://www.cirkus-serveri.com/cod4x_plugins/json/"
check scriptcommands.gsx for server in-game commands
make sure the json url is correct
If you look at command !admins
you have it defined in scriptcommands.gsx, from scriptcommands we call funtion (ServerAdmins), you can find that function in file plugin_http. Also make sure you have my functions from functions.gsx file, I made some functions so I dont have to type same lines again and again
-
@neho Thanks for the reply
In Julia I have this - set julia_json_url "https://fmjcod4.com/cod4x_plugins/json/" I am wondering do I need the julia key on the end or just leave like that above (without) ?
I have tried with and without and so not sure.
An example of what i have in scriptcommands.gsx below. I took url from the app in 3rd party plugin settings. Again not sure if that is correct.
Also does globallogic have to be gsx or gsc ? I have tried both but the one you sent me was gsx. I have also been looking at that and trying to add fucnctions from yours to the default openwarfare one. Server loads ok but maybe something else in there that stops this?
Thanks again
-
@smiley if you look at function setmyUrl you can see that you dont need to add identkey
functions.gsx
setmyUrl(){ json_url = getDvar( "julia_json_url"); juliakey = getDvar( "julia_identkey"); return json_url+juliakey; }
so your line should be simply
httpgetjson(setmyUrl()+"/server/admins", ::ServerAdmins, player);
Since you wrote "In Julia I have this - set julia_json_url "https://fmjcod4.com/cod4x_plugins/json/" you can see that my function setmyUrl reads "json_url = getDvar( "julia_json_url");" from server.cfg and also it reads the "julia_identkey"
-
Use either gsc or gsx, don't mix it that will not work. If I remember cod4x development added gsx after some update
-
Thank you . I have changed all to reflect what you have provided above.
I get this when I try to input a command. I guess there is something wrong with globallogic or callbacksetup. I am not getting errors in console and servers start ok.
I have checked all the 'NeHo' scripts that you gave via CoD4X Forum. I am 99.9% sure haha that it is all ok. So it must be something else.
When i type in !cmdlist ( I changed it from $ in server.cfg) I get the 26 commands that I normally get for webadmin...screensay, tell, undercover etc etc.
-
All good Happy Smiley here
I had posted on CoD4X also and had some help and a globallogic file given (edited) Initial errors with that but able to 'merge' and all functions are working great. There is some promod stuff, commands that I probably don't need but can look at that later.
1 error I got that I can tell you was in your messages.gsx. -^1Error: function 'sayclient' already defined in 'neho/messages.gsx': (file 'neho/messages.gsx', line 1)
#include neho\functions;After i removed line 1 all was ok and messages still coming through from julia.cfg
As always thank you so much for the help.
Smiley. -
One thing that i still do not understand. That is the player scores.
Like today all was reset in the app and mods game logs cleared etc. I join one server and I am then showing in top players.
I join my second server and I don't show in top players. It is the same for everyone. Which ever server they join first is the ONLY server they are recorded on. Whats stats will show up for them in game?
If I search for myself in the server I am NOT recorded on in top players (in this case Snipers as in pic) I appear in the search showing the scores from the other server. Zero now as i had reset all.
So after getting all the scripts working now which is great..in the end it will probably show the wrong stats
Smiley.