"h" to console with " "? \"?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

"h" to console with " "? \"?

Post by Elgan »

how would i do

stufftext "hi"
with the " and ".

tried using \" but its not working!!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

What are you asking, how to skip to the next line? Just do another stufftext.

Here is how the loading sign get seen.
postinclude ui/loadingbar.txt // flashing loading sign

Maybe what you are looking for is something like this.
stuffcommand "centerprint Floor4"
Last edited by tltrude on Sun Apr 03, 2005 11:01 pm, edited 1 time in total.
Tom Trude,

Image
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

from script..


when u enter a cvar in console u have to put " " arround the line or it only uses the first word,


camper_cmd "0 stufftext say hi"

if i do froms cript stufftext "0 stufftext say hi"

it wud only be lik eentering


camper_cmd "0"
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

Maybe what you are looking for is something like this.
stuffcommand "centerprint Floor4"

Or this.
stuffcommand "primarydmweapon smg;join_team allies;"popmenu 0;dm_playermodel american_Army"
Tom Trude,

Image
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

tltrude wrote:Maybe what you are looking for is something like this.
stuffcommand "centerprint Floor4"
nope. the stufftext say thing was just an example sorry.

i just need ot be able to stufftext something with more then one word.

like

stufftext camper_cmd "so_domething do_it_now"

and it wud like like entering it into console.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

yeah, try a semicolon ";".
Tom Trude,

Image
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

the l seperates the string. i need to bundle it up./

sorry im never clear:(.

the ; splits it up.

camper_cmd is a cvar. if u type camper_cmd hello world. it would be the same as typing camper_cmd hello. mohaa doesnt count the full string. it stops at the " " space. so to catcxh it all i have to do. camper_cmd "hello world".


Now thats easy to type in console but i have some script that loops through the players to stufftext this.

rcon camper_cmd "im_admin " + $player.entnum

then the script finds the admin by getting the ent num. Then makes that player the admin so it knows to send all info to this player.

i cant send this
"rcon camper_cmd im_admin " + $player.entnum

because the console will only take the cvars first value (im_admin) and miss off the number.

i would like ot be able to just get the ent num on the end also by doing something like this.

("rcon camper_cmd \"im_admin " + $player.entnum + "\"")

but it dont work:(.

alternativly i cud make 63 versions of imadmin(0-62) orrr send the cmd to see if the player is admin and wait 5 seconds if nothing was recieved then the player is no admin. moove onto next. but this would take agesss and i wanna be able to find the admins quickly on each level.

so ..i hope everyone understands now:)..or just more confused:P.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

I know what you mean, been trying to figure it out myself a while ago but no result... :? Guess there's no way to do this... :(
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

Rookie One.pl {sfx} wrote:I know what you mean, been trying to figure it out myself a while ago but no result... :? Guess there's no way to do this... :(
:( grrrrrrrr.

ill have ot do it the lonng way nowwwwwwwwww
mefy
Corporal
Posts: 33
Joined: Tue Oct 21, 2003 2:57 am

Post by mefy »

Maybe try double-escaping it, like this:

("rcon camper_cmd \\\"im_admin " + $player.entnum + "\\\"")
New Gametypes for Medal of Honor
Capture-The-Flag | Freeze-Tag | Demolition
www.planetmedalofhonor.com/mefy
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

nope:(
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

do u mean something of the sort of


in console: say "im saying this as though I press T... but I didnt"
Image
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

[HDL]-{Gen} Dragon wrote:do u mean something of the sort of


in console: say "im saying this as though I press T... but I didnt"

yep..i think..:S
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

w00t! finally I served some use on this Earth :lol:
Image
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

but in scripot witha cvar.hehehe
Post Reply