PDA

View Full Version : Weapon killer


Geovanie Legend
06-21-2001, 03:09 PM
A long time ago I made a script that would delete a weapon from your inventory when you entered a level, but now i can't remember how it's done :(
Would someone be so kind as to post the script here for me or send it to me in a pm. thanks :)

CrazedMerlin
06-21-2001, 04:03 PM
do alot like this
if (playerenters&&hasweapon(LAT Boots)) {toweapons LAT Boots;
if (playerenters&&hasweapon(Heart Stone)) {toweapons Heart Stone;
if (weaponfired) {destroy;}
}
}
like that, you get the point

Geovanie Legend
06-21-2001, 04:12 PM
do alot like this
if (playerenters&&hasweapon(LAT Boots)) {toweapons LAT Boots;
if (playerenters&&hasweapon(Heart Stone)) {toweapons Heart Stone;
if (weaponfired) {destroy;}
}
}
like that, you get the point

So i could redo it some and make it like this?

if (playerenters) {
timeout=0.5;
}
if (playerenters&&hasweapon(LAT Boots)) {toweapons LAT Boots;
if (playerenters&&hasweapon(Heart Stone)) {toweapons Heart Stone;
if (isweapon||timeout) {destroy;}
}
}

grim_squeaker_x
06-21-2001, 06:13 PM
if (playerenters&&isweapon&&strequals(#L,levelname)) destroy;

Er1c
06-22-2001, 09:24 AM
Here's how it should be done...


if (playerenters) {
toweapons NAME TO DELETE;
}
if (isweapon)
destroy;


Very easy to make... Even easier with the NPC server.


removeweapon NAME TO DELETE;

CrazedMerlin
06-22-2001, 09:26 AM
yea but my way is easier if its alot of weapons you want to destroy

06-22-2001, 10:36 AM
Hmm... try this



if (playerenters) {
if (hasweapon(Weapon name)) {
toweapons Weapon name;
timeout=.05;
}}
if (isweapon||weaponfired) {
destroy;
}
if (timeout) {
if (isweapon) {
destroy;
}
timeout=.05;

}

Tyhm
06-22-2001, 12:55 PM
if(playerenters) toweapons Tree Seeds;
if(isweapon) destroy;

Warning: Though this seems to happen instantaneously, some NPCs will detect hasweapon(Tree Seeds). Very bad if you're running an autojailer on it! =_=;

supersaiyanboo2
06-22-2001, 05:52 PM
y just do this lil code lol:

if (weaponfired && !strequals(#L, UR LEVEL)){ //when the weapon is fired in another level//
destroy;
}