Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 48 Guests
Online:

LATEST FORUM THREADS

»

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Send commands to server via code?
Hajas
General Member
Since: Feb 25, 2008
Posts: 35
Last: Nov 22, 2016
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Thursday, Feb. 20, 2014 01:33 pm
Hello,

I'm looking in a way to input console commands into the server via code, like was a admin online all the time able to configure the server with the usual console commands.

in Quake engine we have the function Cbuf_ExecuteText

with that we can send any command to the server via code like we were in the console.

for exemple:

Code:
Cbuf_ExecuteText(EXEC_NOW, "quit");


then the server will quit... should have some similar function in COD4 engine too, but don't know which the function is.

with that function will solve several of my problems, like some commands can't be replicated with perfection via code.

any other ideas/inputs will be great.

and about the clientcmd menu file will not work, since I need that to perform without any player online. maybe a servercmd variation? I tryed to make one but didn't work... :/

what I really need is to have a DVAR in the latched state to perform what I need to work...

for exemple, if we change the DVAR g_gametype in console and will dump the dvars we have like this for exemple:

Code:
g_gametype "dom" -- latched "sd"


then in fact the DVAR is not "sd" yet...

but if we do "the same" via code like this:

Code:
setDvar( "g_gametype", "sd" );


the DVAR is set right away with the new value, aside will only take effect after map restart, if you dump the var it's already "sd" and is not latched like via console.

so or I find out a way to input console commands into the server, or I find out a way to reproduce the latched DVARS via code...maybe theres another dvar function that do that set in latched state?

I know it's kinda of complicated, but I'm already crossed all the limits of the COD4 engine and I'm walking for some years in a very unknown places to improved even more my Frontlines mod. :D

any ideas? :P

thank you very much! :)
Share |
Hajas
General Member
Since: Feb 25, 2008
Posts: 35
Last: Nov 22, 2016
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Tuesday, Nov. 22, 2016 06:56 pm
Anyone? Still need this... :\
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»