Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-28-2011, 06:44 AM
Arch_Angel Arch_Angel is offline
Registered User
Join Date: Apr 2007
Posts: 482
Arch_Angel is on a distinguished road
Send a message via AIM to Arch_Angel
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!
Reply With Quote
  #2  
Old 09-28-2011, 06:58 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by fowlplay4 View Post
[...] 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[]).
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 05:15 PM.


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