Page 1 of 1

Help with my bazoka control script

Posted: Thu Mar 25, 2004 10:43 am
by Pollo_Expresss
Hi all

I?ve being working in a script that allows me to activate/desactivate the rockets via rcon in game for spearhead (in BT the dm flags are efficient).

Well, it works, but it takes the weapon from the guy who chose the bazoka and I would like to give him some other weapon like a smg and don?t know in what part of the script have I to put it.

The script is inspired in the Snake server path and here it is:

Code: Select all

main:
//***********************************************
// Ejecuci?n de inicio 
//***********************************************

// Pollo control de bazokas Off / On
if (getcvar (pcb) == "1")
      {
	level waittill spawn
	level.pcb_run = 0
	if (level.pcb_run != 1)
              {
		level.pcb_run = 1
		thread fuerabazoka
	      }
      }
end

fuerabazoka:

// Code delay for stability
if (int(getcvar (ssp_standscandelay)) < 1) {
	setcvar "ssp_standscandelay" "1"
}
local.scandelay = getcvar (ssp_standscandelay)
wait local.scandelay

//Desactivar armas

if (getcvar (pcb_bazoka) == "0" && $player != NULL)
      {
	$player take weapons/bazooka.tik
	$player take weapons/panzerschreck.tik
      }
goto fuerabazoka
end
Well I tried to put another if inside the first for give a weapon if allies and another if axis but it crashes the script, I think probably I have to put it in another part.

Please help.

Posted: Thu Mar 25, 2004 2:35 pm
by nuggets
i think that if you put in

Code: Select all

main: 
//*********************************************** 
// Ejecuci?n de inicio 
//*********************************************** 

// Pollo control de bazokas Off / On 
if (getcvar (pcb) == "1") 
      { 
   level waittill spawn 
   level.pcb_run = 0 
   if (level.pcb_run != 1) 
              { 
      level.pcb_run = 1 
      thread fuerabazoka 
         } 
      } 
end 

fuerabazoka: 

// Code delay for stability 
if (int(getcvar (ssp_standscandelay)) < 1) { 
   setcvar "ssp_standscandelay" "1" 
} 
local.scandelay = getcvar (ssp_standscandelay) 
wait local.scandelay 

//Desactivar armas 

if (getcvar (pcb_bazoka) == "0" && $player != NULL) 
      { 
   $player take weapons/bazooka.tik 
   $player take weapons/panzerschreck.tik 
$player item/weapons/thompsonsmg.tik
end
      } 
goto fuerabazoka 
end 
you may find what you need

Thank you

Posted: Tue Mar 30, 2004 12:54 am
by Pollo_Expresss
Thx nuggets it works, I posted very late ?cause I have been very bussy, sorry hehehe and thank you again.

:lol: :lol: