Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   deleting weapons (https://forums.graalonline.com/forums/showthread.php?t=18450)

ninjaterd 12-07-2001 02:18 PM

deleting weapons
 
how do u make it so it deletes a weapon....e.g wen u enetr the level it takes the bomb and the arrow weapon away from u....how do u do that?

Thak2 12-07-2001 07:05 PM

NPC Code:

if (playerenters) {
toweapons Bomb;
}
if (isweapon) {
destroy;
}



Just copy over the original weapon with a new, destructing weapon.

Saga2001 12-08-2001 12:15 AM

replace!!!
 
ok well since on all server the code:
NPC Code:

if (playerenters) toweapons ...;


make it:
NPC Code:

if (playenters) setplayerprop #c, ;
if (playerchats&&strequals( ,#c)) toweapons ...;
destroy;



i think...:p

royce 12-08-2001 03:19 AM

there is a built in flag thats hasweapon( the name of the weap goes here) {blah......so why not


if (hasweapon(Bomb) && isweapon {
destroy;
}

Kumada 12-08-2001 03:34 AM

if (playerenters){
toweapons usux;
destroy;
}

entravial 12-08-2001 04:01 AM

~AlphaFlame~

Use this... much more efficient than adding weapons to player account a bazillion times and taking them (LAG!)

if (playerenters && hasweapon(weapon-to-take)){
toweapons weapon-to-take;
if (isweapon)destroy;
}

Ta-freakin-da.

12-08-2001 11:26 PM

try this :)

NPC Code:

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

}


kyle0654 12-09-2001 01:01 AM

CLIENTSIDE
NPC Code:

if (playerenters && hasweapon([color=blue]weaponname[/blue])) {
toweapons weaponname;
}
if (created && isweapon) {
destroy;
}



SERVERSIDE
NPC Code:

removeweapon (weaponname));



All times are GMT +2. The time now is 05:00 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.