Help with my bazoka control script

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Pollo_Expresss
Sergeant
Posts: 60
Joined: Thu Jan 08, 2004 12:18 am
Location: Spain

Help with my bazoka control script

Post 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.
*(ICE)*-Sd_Pollo_Expresss
http://www.iceclanweb.net

Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post 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
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Pollo_Expresss
Sergeant
Posts: 60
Joined: Thu Jan 08, 2004 12:18 am
Location: Spain

Thank you

Post 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:
*(ICE)*-Sd_Pollo_Expresss
http://www.iceclanweb.net

Image
Post Reply