MOH Central

Medal of Honor Series Forum => MOHAA Series: General => Topic started by: fanobliv on May 12, 2008, 10:01:44 PM

Title: random messages
Post by: fanobliv on May 12, 2008, 10:01:44 PM
Im just ganne ask more help :D

   

   i got my own server.

   

   I want 2 make text messages that return every  1 min or something how must/can i do/make that ?
Title: random messages
Post by: EarthMan on May 12, 2008, 10:27:42 PM
What kinda mod are you using?
Title: random messages
Post by: fanobliv on May 12, 2008, 10:28:37 PM
cb rifle only. Thats all. Cant use the admin pro (will make the gametype from cb rifle only to team match....)
Title: random messages
Post by: EarthMan on May 12, 2008, 10:35:53 PM
Well then here is a messaging script I use:

   
Messages:
   while (1)
   {
      locprint 230 20 "MESSAGE HERE"
      wait 5
      locprint 230 20 "MESSAGE HERE"
      wait 5
      locprint 230 20 "MESSAGE HERE"
      wait 5
      locprint 230 20 "MESSAGE HERE"
      wait 5
      locprint 230 20 "MESSAGE HERE"
      wait 50
   }
   
   end

   

   It appears on the bottom of the screen; or in bold on the side:

   
message_them:
   wait 3
      while (level.messagesactive == 1)
      {
         wait 20
         if (level.messagesactive == 1) {
   
               iprintlnbold "MESSAGE HERE"
            wait 2
               iprintlnbold "MESSAGE HERE"
            wait 2
               iprintlnbold "MESSAGE HERE"
            wait 2
               iprintlnbold "MESSAGE HERE"
            wait 2
               iprintlnbold "MESSAGE HERE"
   
         }
      }
   end]

   

   On the side of the screen bold; or, in regular text on the side of the screen:

   

   

   Messages:

   

   
while (1)
   {
      iprintln "MESSAGE HERE"
      wait 1.5
      iprintln "MESSAGE HERE"
      wait 1.5
      iprintln "MESSAGE HERE"
      wait 1.5
      iprintln "MESSAGE HERE"
      wait 1.5
      iprintln "MESSAGE HERE
      wait 50
   }
   
   end]

   

   Pick what you you like:)
Title: random messages
Post by: EarthMan on May 12, 2008, 10:38:19 PM
Note: for some odd reason I can't use tab, where it is wait _ and iprintln _ make a tab space in front of it.
Title: random messages
Post by: fanobliv on May 13, 2008, 06:02:49 AM
ty! where 2 put it lol ?
Title: random messages
Post by: fanobliv on May 13, 2008, 07:07:34 PM
what kind of file type must i use for this 1 Shader ?
Title: random messages
Post by: EarthMan on May 13, 2008, 10:31:46 PM
No, you would put this in an .scr file for example, make a .scr file named messages.scr save that into you mod's global file, now in your map where all the execs are type this under one of them: exec global/messages.scr

   Now open up your messages.scr file and and one of the message types that I showed you. Also edit the messages to you likings:) Save it again and then go load the map that you just edited, and see if it works!

   

   Example for malta:

   

   

   
main:
      level.script = maps/dm/MP_Malta_DM.scr
      level.music = mp_malta_dm
   
   
      setcvar "g_obj_alliedtext1" "Malta"
      setcvar "g_obj_alliedtext2" ""
      setcvar "g_obj_alliedtext3" "-|Warriors of Doom|-"
      setcvar "g_obj_axistext1" "Recruiting"
      setcvar "g_obj_axistext2" "www.mods-r-us.net"
      setcvar "g_obj_axistext3" "Enjoy You Stay"
      setcvar "g_gametypestring" "*YodaRules*"
   
      setcvar "g_scoreboardpic" "mp_malta_dm"
   
      if(level.roundbased)
         thread roundbasedthread
   
      level waittill prespawn
   
      exec global/ambient.scr
      exec global/dmprecache.scr
      exec global/SMUSIC.scr
      exec global/door_locked.scr
      exec global/exploder.scr
      exec global/messages.scr
   
   end
   
      $alliedmortar.collisionent = $granatwerfer_collision
      $alliedmortar_turret0.collisionent = $granatwerfer_turret_collision
      $alliedmortar thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/p_granatwerfer_d.tik" $granatwerfer_destroyed_collision
      $alliedmortar_turret0 maxyawoffset "40"
   
      $alliedmortar2.collisionent = $granatwerfer_collision
      $alliedmortar2_turret0.collisionent = $granatwerfer_turret_collision
      $alliedmortar2 thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/p_granatwerfer_d.tik" $granatwerfer_destroyed_collision
      $alliedmortar2_turret0 maxyawoffset "40"
   
      $axismortar.collisionent = $granatwerfer_collision
      $axismortar_turret0.collisionent = $granatwerfer_turret_collision
      $axismortar thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/p_granatwerfer_d.tik" $granatwerfer_destroyed_collision
      $axismortar_turret0 maxyawoffset "40"
   
      $axismortar2.collisionent = $granatwerfer_collision
      $axismortar2_turret0.collisionent = $granatwerfer_turret_collision
      $axismortar2 thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/p_granatwerfer_d.tik" $granatwerfer_destroyed_collision
      $axismortar2_turret0 maxyawoffset "40"
   
      level waittill spawn
   
      // Add in our clip brush at the cheat point.
      local.clipbrush = spawn script_object
      local.clipbrush.origin = ( -1056 -384 -1412 )
      local.clipbrush setsize ( -36 -16 -76 ) ( 36 16 76 )
      local.clipbrush solid
   
      $mg42 pitchcaps ( -25 45 0)
      $mg42 maxyawoffset "80"
      $mg42_2 pitchcaps ( -25 45 0)
      $mg42_2 maxyawoffset "65"
      level.portcullis_open = 0
      $trapdoor thread trapdoor_init
      $portcullis_switch bind $portcullis_switch_origin
   
      //make all the switches non solid so as not to injure the player when triggered.
      $portcullis_switch notsolid
      $portcullis_switch_origin notsolid
      $portcullis open $portcullis_entity
   
      $walltrigger thread exploder_init 1
      $bridgetrigger thread exploder_init 2
      $walltrigger2 thread exploder_init 3
      $nudietrigger thread exploder_init 4
      $debristrigger thread exploder_init 5
      $balconytrigger thread exploder_init 6
      $limestonetrigger1 thread exploder_init 7`
      $limestonetrigger2 thread exploder_init 8
      $towercorner_trigger thread exploder_init 9
      $prisoncorner_trigger thread exploder_init 10
      $bunkertrigger thread exploder_init 11
      $alleytrigger thread exploder_init 12
   
   end
   
   
   roundbasedthread:
   
      level waitTill prespawn
   
      level waittill spawn
   
   
      // set the parameters for this round based match
      level.dmrespawning = 0 // 1 or 0
      level.dmroundlimit = 5 // round time limit in minutes
      level.clockside = kills // set to axis, allies, kills, or draw
   
      level waittill roundstart
      $portcullis open $portcullis_entity
   
   
   //--------------------------------------------------------------
   //Open Portcullis
   //--------------------------------------------------------------
   animate_portcullis_switch:
   
      dprintln "animating the switch"
      dprintln "level.portcullis_open = " level.portcullis_open
      if( level.portcullis_open == 1 )
      {
         dprintln "rotating down"
         $portcullis_switch_origin speed 5
         $portcullis_switch_origin rotatezdownto 180
         $portcullis_switch_origin waitmove
         $portcullis_switch_origin playsound switchbox
      }
      else
      {
         dprintln "rotating up"
         $portcullis_switch_origin speed .1
         $portcullis_switch_origin rotatezupto 0
         $portcullis_switch_origin waitmove
         $portcullis_switch_origin playsound switchbox
      }
   end
   
   toggle_portcullis:
      $portcullis_trigger triggerable
      thread animate_portcullis_switch
      if (level.portcullis_open == 1)
      {
         $portcullis_entity playsound portcullis_close_move
         $portcullis close $portcullis_entity
         wait 5
         $portcullis_entity playsound portcullis_close_stop
         level.portcullis_open = 1
      }
      else
      {
         $portcullis_entity playsound portcullis_open_move
         $portcullis open $portcullis_entity
         wait 5
         $portcullis_entity playsound portcullis_open_stop
         level.portcullis_open = 1
      }
      $portcullis_trigger nottriggerable
   end
   
   trapdoor_init:
      self solid
      self damage 0
      level.trapdoor_state = 0
   trapdoor_loop_start:
      self waittill use
      if (level.trapdoor_state  == 0)
      {
         self thread trapdoor_open
      }
      else if (level.trapdoor_state  == 1)
      {
         self thread trapdoor_close
      }
      goto trapdoor_loop_start
   end
   
   trapdoor_cycle local.duration:
      wait local.duration
      if (level.trapdoor_state == 1)
      {
         self thread trapdoor_close
      }
   end
   
   trapdoor_open:
      level.trapdoor_state = 1
      self openportal
      self playsound gate_wood_open_move
      self rotatezupto 90
      self time 1
      self waitmove
      self playsound gate_wood_open_stop
      self thread trapdoor_cycle 15
   
   end
   
   trapdoor_close:
      self playsound gate_wood_close_move
      level.trapdoor_state = 0
      self rotatezdownto 0
      self time 1
      self waitmove
      self playsound gate_wood_close_stop
      self closeportal
   end
Title: random messages
Post by: EarthMan on May 14, 2008, 12:27:23 AM
lol, like my new avatar?
Title: random messages
Post by: fanobliv on May 14, 2008, 08:24:24 AM
im totally confused now :S:S:S:S. i got the scr file now but what about the new script you sended lol ? must i so so much 2 get it work ?
Title: random messages
Post by: [KC]Murdock on May 14, 2008, 11:25:50 AM
two things you can do....open up your map script like mohdm1.scr and below level wait till spawn past "exec yourscriptfile.scr". This method uses the mapscript so you have to do that for all the maps in your rotation. But you can have diff messages on diff maps.

   The other way (more simple) is to exec it from the dmprecache.scr (found in global) this file is execed every time a map loads.

   Open the file scroll to the bottom and do 'exec yourscriftfile.scr" (your script file has to be in the global dir, otherwise its 'exec "map"/yourscripfile.scr"
Title: random messages
Post by: fanobliv on May 14, 2008, 05:32:16 PM
ok im asking a m9 2 do it. im confused. Never heard of dmprecache, dont even know where 2 find it
Title: random messages
Post by: EarthMan on May 14, 2008, 08:31:58 PM
You can't just always ask other people to do stuff for you, even the hard stuff, in modding you actually have to do work. Usually you will find a dmprecache in mod's file. Every single normal map's .scr file you see exec dmprecache.scr. The dmprecache.scr is found in you mod's global file. If you don't load the dmprecache, your server will get messed up. Murdock's way is a lot simpler, after all the weapon's in the dmprecache.scr, add one of the messages like I have shown you, save it, then it'll be a lot easier because the map's .scr already loads the dmprecache.scr!
Title: random messages
Post by: JADE on May 15, 2008, 10:13:14 PM
or get admin-pro ! and use it for the messages ! you can use the same message or use map specific .
Title: random messages
Post by: fanobliv on May 16, 2008, 06:31:02 PM
JADE :
   or get admin-pro ! and use it for the messages ! you can use the same message or use map specific .

   

   

   i cant, its switching my gametype 2 teammatch all the time.
Title: random messages
Post by: [KC]Murdock on May 16, 2008, 07:15:02 PM
but cb-rifle only isnt team match? What is it for gametype then? I mean the gametype is just a name you can change it any name you want. like ---setcvar "g_gametypestring" "*put here your gametype name"---
Title: random messages
Post by: fanobliv on May 17, 2008, 12:51:48 PM
[KC]Murdock :
   but cb-rifle only isnt team match? What is it for gametype then? I mean the gametype is just a name you can change it any name you want. like ---setcvar "g_gametypestring" "*put here your gametype name"---

   

   

   Where can i type that ?!?!?!?!?!?!!? config ?!?!?!
Title: random messages
Post by: EarthMan on May 17, 2008, 01:03:10 PM
Usually in the server.cfg files, found in you mainta or maintt folder.

   Mainta = Medal of Honor Allied Assault Spearhead

   Maintt = Medal of Honor Allied Assault Breakthrough
Title: random messages
Post by: fanobliv on May 18, 2008, 11:27:31 AM
i mean for my server (i got ftp) !?>
Title: random messages
Post by: EarthMan on May 18, 2008, 01:34:28 PM
I've never used ftp sorry.
Title: random messages
Post by: fanobliv on May 18, 2008, 01:55:42 PM
So what do you use lol ?!
Title: random messages
Post by: [KC]Murdock on May 18, 2008, 02:08:36 PM
you problably have in your main (on your ftp) a file called server.cfg pr private.cfg or something similair. In this file all the server settings are. Like your rconpass your gametype maybe your maplist etc etc.

   If you open up pak5.pk3 at home you will see a directory called maps inside there are maps called dm and obj. In there there are the mapscripts (*.scr) for your standard maps. Get them out of the pk3 and make on your server a map in your main called maps. Inside there make two other maps called dm and obj, now put your mapscript in the corresponding directory's.

   In those mapsscript you find what you need.
Title: random messages
Post by: fanobliv on May 18, 2008, 02:15:32 PM
//

   //  [ w00h00.nl MoH:SH Sample Config File ]

   //

   

   // Server Name

   // Name that will appear on the server browser

   sv_hostname "FdX's - DMW ON Public Server - '"

   

   //rconPassword

   set rconPassword "PrIvAtE"

   

   // Game Type

   // 1 Free for All

   // 2 Team Based

   // 3 Round Based

   // 4 Objective

   // 5 Tug Of War

   // 6 Liberation

   

   // Health Drop

   // When enabled players will drop a health pack when killed

   set g_healthdrop 1

   

   // Realism

   // Toggles reaslistic mode

   set g_realismmode 0

   

   // Fast Run Speed

   // When checked, the speed at which players can run through levels is

   // increased.

   

   // Leaving it unchecked defaults to Medal of Honor Allied Assault's original run speed

   set sv_dmspeedmult 1.200000

   

   // Team Damage

   // Toggles friendly fire

   set g_teamdamage 0

   

   // Heal Rate

   // Determines how fast players heal when they use a health pickup

   set g_healrate 0

   

   // Time Limit

   // This sets the elapsed time at which the game ends, the winner being the player with the highest score at that time.

   timelimit 0

   

   // Frag Limit

   // The score at which the player or team will win the current map.

   fraglimit 10

   

   // Map Rotation Time

   // This sets the maximum amount of time in minutes players will spend in a particular map.

   maprotationtime 60

   

   // Team Spawn Delay

   // This sets a delay in seconds between spawns. This is useful if you would like the

   // player spawned in batches, rather than one at a time

   set sv_team_spawn_interval 0

   

   // Round Reset Time

   // This sets how long each round will take, in minutes. This can be smaller than the map rotation time, but not larger.

   roundlimit 5

   

   // Inactive Spectate

   // This sets the time in seconds after which an inactive player becomes a spectator. To save server bandwidth, 60 seconds is default.

   set g_inactivespectate 0

   

   // Inactive Kick

   // This sets the time in seconds after which an inactive player is kicked out of the game. 900 (15 minutes) seconds is default.

   set g_inactivekick 0

   

   // Use Gamespy

   // To use GameSpy gaming service for internet-based multiplayer games.

   // If this is 0, players will not be able to see your server via the in-game browser nor gamespy arcade.

   set sv_gamespy 1

   

   // Pure

   // Verifies that the files on the client are the same as those on the server.

   set sv_pure 0

   

   // Allow Vote

   // Enables players to call a vote.

   set g_allowvote 0

   

   // Flood Protect

   // Limits amount of text a player can type

   set sv_floodprotect 1

   

   // Forces players to only be able to spectate behind their own team.

   set g_forceteamspectate 1

   

   // dmflags -- flags that can be set in the dmflags variable.

   // DF_NO_HEALTH (1 << 0)

   // DF_NO_POWERUPS (1 << 1)

   // DF_WEAPONS_STAY (1 << 2)

   // DF_NO_FALLING (8 << 3)

   // DF_INSTANT_ITEMS (1 << 4)

   // DF_SAME_LEVEL (1 << 5)

   // DF_NO_ARMOR (1 << 11)

   // DF_INFINITE_AMMO (1 << 14)

   // DF_NO_FOOTSTEPS (1 << 17)

   // DF_ALLOW_LEAN (1 << 18)

   // DF_OLD_SNIPERRIFLE (1 << 19)

   // DF_GERMAN_SHOTGUN (1 << 20)

   // DF_ALLOW_OLDMAP_MINES (1 << 21)

   set dmflags 262152

   

   // Invulnerable Time

   // Amount of time (in seconds) a player is invulnerable for after spawning (default=3 seconds)

   set sv_invulnerabletime 6

   

   // Team Kill Warning

   // Amount of team kills before the player is warned

   set g_teamkillwarn 999

   

   // Team Kill Kick

   // Amount of team kills before the player is kicked off the server.

   set g_teamkillkick 999

   

   // Team Switch Delay

   // Frequency at which you can switch teams

   set g_teamswitchdelay 0

   

   // Allow Join Time

   set g_allowjointime 15

   

   // Private Clients

   // Clients that require a password to join

   set sv_privateclients 0

   

   // Password

   // Allows you to set a password for the server

   set sv_privatepassword ""

   

   // Keywords

   // Keywords which allow browsers to filter servers.

   set sv_keywords ""

   

   // Minimum Ping to allow clients to join with. 0 means anyone

   set sv_minping 0

   

   // Maximum Ping to allow clients to join with. 0 means anyone

   set sv_maxping 200

   

   // Maximum Rate

   set sv_maxrate 10000

   

   // Map

   // Starting map on the rotation.

   map "obj/obj_team4"

   

   // Map Rotation List

   sv_maplist "obj/obj_team2 obj/obj_team1 obj/obj_team4"

   

   // Default to no-sprint and original Allied Assault runspeed

   sv_sprinton 1

   sv_runspeed 287 // spearhead runspeed is 287

   

   //Spectator Chat To All

   set g_spectate_allow_full_chat 1

   

   // Server info

   sets .ServerAdminMail "mektri@msn.com"

   sets .Host "w00h00 Internet Services"

   sets .HacksNotAllowed "www.dmwworld.com"

   sets .Location "Amsterdam, The Netherlands"

   

   // Master servers

   seta sv_master1 "mohmaster.2015.com"

   seta sv_master2 "master0.gamespy.com"

   seta sv_master3 "master1.gamespy.com"

   seta sv_master4 "clanservers.net"

   

   // Bruteforce rcon

   sv_allowdownload 0

   

   I tried 2 make it // 7 MYNAME but that didnt work. i tried that gamesrting command but didnt work. is it because my server is spearhead ?!
Title: random messages
Post by: [KC]Murdock on May 18, 2008, 03:38:26 PM
NONO it doesnt work that way......

   

   just put at the bottom of your script :

   set g_gametype 4 //makes it objective

   set g_gametypestring "jou gametype string"

   

   Your missing the g_gametype in your script it should have been below the 1,2,3,4,5,5,6 diff gametypes....
Title: random messages
Post by: fanobliv on May 18, 2008, 04:43:55 PM
haha i know that ;) i already resetted it. Deletes that 1 lol.
Title: random messages
Post by: EarthMan on May 18, 2008, 10:45:14 PM
I have my ways.
Title: random messages
Post by: fanobliv on May 19, 2008, 07:49:57 PM
main:

   setcvar "g_gametypestring" "CB-Rifle Kutjes"

   setcvar "g_obj_axistext3" "Invision"

   end

   

   its working thanks :)
Title: random messages
Post by: EarthMan on May 19, 2008, 10:19:14 PM
You guys got way off track, so did you get the messages working or not?
Title: random messages
Post by: fanobliv on May 20, 2008, 06:14:27 AM
no. lol
Title: random messages
Post by: EarthMan on May 20, 2008, 09:49:56 PM
If you still can't figure it out, and you still want to do it, PM me and I'll try to give you more details about it.