Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Displaying HP/Name under player (https://forums.graalonline.com/forums/showthread.php?t=134264661)

Arch_Angel 09-28-2011 06:44 AM

Displaying HP/Name under player
 
So I'm working with a script showing the players nick under him, as well as "HP: XX/XXX". I know in order to have this work with everyone on the server, you need to add a GANI... But I have NO idea what so ever how I would implement this. Any help or guidance would be appreciated!

cbk1994 09-28-2011 06:58 AM

Quote:

Originally Posted by fowlplay4 (Post 1516670)
[...] I would suggest you take a different route with your nickname script, and this would be for better as players would be able to disable them and such as.

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
setTimer(0.05);
}

function 
onTimeout() {
  
hideimgs(2001000); // This will need to be re-optimized as hiding then redrawing every frame is bad :(
  
drawNicknames();
}

function 
drawNicknames() {
  
// Loop through Players
  
for (temp.pplayers) {
    
// Draw Text under Player
    
with (findimg(200 temp.p.id)) {
      
temp.p.1.5;
      
temp.p.3;
      
style "bc";
      
text temp.p.nick;
    }
  }


I didn't include the enablefeatures part of the script because I assume you already know how to use it, also I noticed you deleted your thread when you had your problem fixed. Don't do that!

Almost the same question you have. Showing health will work the same way as HP except you'll get the value from a player attribute (player.attr[]).


All times are GMT +2. The time now is 12:03 PM.

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