messed up pickup script
Posted: Mon Apr 09, 2007 5:34 am
ok, i have multiple pickup scripts for guns. but the pp19 script doesnt work. when i pick it up with no gun, i dont get the pp19.
if i pick up with a gun, i get the ammo.
SCRIPT
if i pick up with a gun, i get the ammo.
SCRIPT
Code: Select all
{
pickup [false]
Spawn[ ()
{
Console(false);
BoxWidth(80);
BoxHeight(50);
SetCollision();
AddCollisionOrder("Setup");
} ]
Setup[ ()
{
LowLevel("Idle");
} ]
Idle[ ()
{
if(GetAttribute("galil","Player") < 1 and (GetAttribute("m16","Player") < 1) and (GetAttribute("famas","Player") < 1) and (GetAttribute("ak47","Player") < 1))
{
if(GetAttribute("mp7","Player") < 1 and (GetAttribute("mac","Player") < 1) and GetAttribute("ump","Player") < 1 and (GetAttribute("pp19","Player") < 1))
{
if(GetAttribute("mg36","Player") < 1 and (GetAttribute("awp","Player") < 1))
{
if(GetAttribute("m3","Player") < 1)
{
if(pickup = false)
{
ModifyAttribute("pp19", 1, "Player");
ModifyAttribute("smg_shell", random(25,80), "Player");
PlaySound("respawn.wav");
pickup = true;
TeleportEntity("pp19" , "temp" );
HighLevel("Wait");
}
}
else
{
HighLevel("Spawn");
}
}
else
{
HighLevel("Spawn");
}
}
else
{
ModifyAttribute("smg_shell", random(55,120), "Player");
PlaySound("respawn.wav");
TeleportEntity("pp19" , "temp" );
}
}
else
{
HighLevel("Spawn");
}
} ]
Wait[ ()
{
Delay("", 1, "");
pickup = false;
NewOrder("Spawn");
} ]
}