Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   disabling sword (https://forums.graalonline.com/forums/showthread.php?t=134256396)

Mattehy 10-10-2009 09:15 PM

disabling sword
 
how to disable the sword function with out disabling bombs and other weapons of D? (disableweapons(); doesnt work, it disables both)

Tigairius 10-10-2009 09:23 PM

First, use disableweapons to disable the use of everything, then re-script the firing of weapons by detecting when the "D" key is pressed and activating the current weapon using
PHP Code:

player.weapon.trigger("WeaponFired"NULL); 


Deas_Voice 10-10-2009 09:24 PM

you could replace the sword gani ^^

DustyPorViva 10-10-2009 09:38 PM

Quote:

Originally Posted by Deas_Voice (Post 1528978)
you could replace the sword gani ^^

Doesn't stop the actual effects, like cutting bushes. Not sure about damaging other players.

Deas_Voice 10-10-2009 09:40 PM

Quote:

Originally Posted by DustyPorViva (Post 1528995)
Doesn't stop the actual effects, like cutting bushes. Not sure about damaging other players.

god damit >_<

Mattehy 10-10-2009 09:47 PM

thanks tig worked magicaly xD

DustyPorViva 10-10-2009 09:49 PM

if (player.freezetime == -1) player.weapon.trigger("WeaponFired", NULL);

You might want to use that so they can't fire weapons even while frozen.

Mattehy 10-10-2009 10:22 PM

i did tat but player.freezetime <= 0

DustyPorViva 10-10-2009 10:24 PM

Well, with player.freezetime, -1 is the value returned when the player is not frozen.

Mattehy 10-10-2009 10:35 PM

can you help me i need to know how to disable pickup any type of object x.x


All times are GMT +2. The time now is 10:16 AM.

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