random messages

Started by fanobliv, May 12, 2008, 10:01:44 PM

Previous topic - Next topic

fanobliv

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 ?
My ClanBase Rifle only (spearhead) server :81.171.96.39:12203
My TeamSpeak server (speaking dutch)      :85.92.128.59:8782

EarthMan

What kinda mod are you using?

fanobliv

cb rifle only. Thats all. Cant use the admin pro (will make the gametype from cb rifle only to team match....)
My ClanBase Rifle only (spearhead) server :81.171.96.39:12203
My TeamSpeak server (speaking dutch)      :85.92.128.59:8782

EarthMan

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:)

EarthMan

Note: for some odd reason I can't use tab, where it is wait _ and iprintln _ make a tab space in front of it.

fanobliv

ty! where 2 put it lol ?
My ClanBase Rifle only (spearhead) server :81.171.96.39:12203
My TeamSpeak server (speaking dutch)      :85.92.128.59:8782

fanobliv

what kind of file type must i use for this 1 Shader ?
My ClanBase Rifle only (spearhead) server :81.171.96.39:12203
My TeamSpeak server (speaking dutch)      :85.92.128.59:8782

EarthMan

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

EarthMan

lol, like my new avatar?

fanobliv

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 ?
My ClanBase Rifle only (spearhead) server :81.171.96.39:12203
My TeamSpeak server (speaking dutch)      :85.92.128.59:8782

[KC]Murdock

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"

fanobliv

ok im asking a m9 2 do it. im confused. Never heard of dmprecache, dont even know where 2 find it
My ClanBase Rifle only (spearhead) server :81.171.96.39:12203
My TeamSpeak server (speaking dutch)      :85.92.128.59:8782

EarthMan

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!

JADE

or get admin-pro ! and use it for the messages ! you can use the same message or use map specific .
im back for a while but not to stay so if you need anything fixed just ask away.

fanobliv

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.
My ClanBase Rifle only (spearhead) server :81.171.96.39:12203
My TeamSpeak server (speaking dutch)      :85.92.128.59:8782