Raised This Month: $32 Target: $400
 8% 

Resolving a bug with Game_ui using VScripts


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fak
New Member
Join Date: Aug 2015
Old 10-12-2016 , 09:06   Resolving a bug with Game_ui using VScripts
Reply With Quote #1

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!

Last edited by Fak; 10-12-2016 at 09:11.
Fak is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:43.


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