Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-20-2011, 10:17 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Updating Co-Ordinates GUI

I have made a very simple GUI which displays the players X and Y. But, i want it to update every 0.05 seconds. I don't yet know how to set timeouts so any help would be greatly appreciated.

PHP Code:
//#CLIENTSIDE 


function onCreated() {
    
setTimer(0.05);
    new 
GuiWindowCtrl("CoOrds_Window1") {
        
profile = GuiBlueWindowProfile;
        
clientrelative = true;
        
clientextent = "109,56";

        
canclose = false;
        
canmaximize = false;
        
canminimize = false;
        
canmove = false;
        
canresize = false;
        
closequery = false;
        
destroyonhide = false;
        
text = "Co-Ordinates";
        
x = 1045;
        
y = 596;

        new 
GuiTextCtrl("CoOrds_Text1") {
            
profile = GuiBlueTextProfile;
            
height = 20;
            
text = "player.x";
            
width = 40;
            
x = 9;
            
y = 7;
        }
        new 
GuiTextCtrl("CoOrds_Text2") {
            
profile = GuiBlueTextProfile;
            
height = 20;
            
text = "player.y";
            
width = 41;
            
x = 58;
            
y = 7;
        }
        new 
GuiTextEditCtrl("CoOrds_TextEdit1") {
            
profile = GuiBlueTextEditProfile;
            
height = 20;
            
text = player.x;
            
width = 47;
            
x = 6;
            
y = 26;
        }
        new 
GuiTextEditCtrl("CoOrds_TextEdit2") {
            
profile = GuiBlueTextEditProfile;
            
height = 20;
            
text = player.y;
            
setTimer(0.05);
            
width = 47;
            
x = 53;
            
y = 26;
        }
    }
} 
__________________
Reply With Quote
 


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 +2. The time now is 04:12 AM.


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