AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   Resolving a bug with Game_ui using VScripts (https://forums.alliedmods.net/showthread.php?t=288979)

Fak 10-12-2016 09:06

Resolving a bug with Game_ui using VScripts
 
This is in CSGO, Hammer.
Hey so ill get right to it >

I have a knife and a bow parented to that knife.
The player that picks the knife activates the game_ui, every time he presses right click the bow shoots a bullet.

My problem is that if the player dies in warmup and respwans, if he presses right click the server crashes.

I'm trying to make a script to deactivate the game ui whenever the player dies, but it doesn't work for some reason. this is what i got:

PHP Code:

 function IsDead() {

 if(
activator.GetHealth()<1) { 
 
EntFire"!self""Deactivate""");

 }


And im getting this error in console

AN ERROR HAS OCCURED [the index 'GetHealth' does not exist]

CALLSTACK
*FUNCTION [IsDead()] fixui.nut line [4]
*FUNCTION [main()] InputRunScript line [1]

LOCALS
[this] TABLE
[this] TABLE

Any help? thanks in advance!


All times are GMT -4. The time now is 01:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.