View Single Post
  #5  
Old 10-08-2011, 06:27 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Emera View Post
I suggest you use a GANI to display the nicknames. You an do much more with a GANI than you can with that. That is what we use on Lexia. Here is a bare bone system.
You don't need to use a timeout in a GANI like that, also you have an else on a with statement which makes no sense.

You could use a GANI script like this:

PHP Code:
SCRIPT
function onPlayerEnters() {
  
with (findimg(2)) {
    
text player.nick;
    
player.x;
    
player.y;
    
attachtoowner true;
    
attachoffset = {1.53.4};
    
style "bc";
    
layer 0;
    
mode 1;
  }
}
SCRIPTEND 
and when the player's nickname changes on the server-side you can just update the attr you're using. I.e:

PHP Code:
function onPlayerNickChanges(obj) {
  
obj.attr[3] = "";
  
obj.attr[3] = "nickname.gani";

Quote:
Originally Posted by Nogross View Post
What do you suggest then? And also the script I use atm. works perfectly, the only proplem is that it overdraws the texts if there are more then 2 people in a room.
The way you're doing it now is what I would use personally, it's much more flexible. Nicknames systems have been the source of lag complaints though so I wouldn't even make one tbh. I prefer mouse-over to display nickname systems at the end of the day.

Please learn to style your script, or at least run it through my http://fp4.ca/gs2beautifier/ before posting your script.

PHP Code:
//#CLIENTSIDE 

function onCreated() {
  
enablefeatures(200);
  
setTimer(0.05);
}

function 
onTimeOut() {
  
this.hideimgs(2004000); // Hide all potential images from last timeout
  
this.0;               // Set this.i to 0
  
for (temp.plplayers) {
    
this.showtext(200 this.itemp.pl.1.57temp.pl.3.05"Arial""cb", @ temp.pl.nick);
    
changeimgcolors(200 this.i0.510.51);
    
changeimgvis(200 this.i1);
    
changeimgzoom(200 this.i0.75);
    
this.i++;
    
this.showtext(201 this.itemp.pl.1.57temp.pl.3.85"Arial""cb", @ temp.pl.hearts "/" temp.pl.maxhp);
    
changeimgcolors(201 this.i10.10.11);
    
changeimgvis(201 this.i1);
    
changeimgzoom(201 this.i0.65);
    
this.i++;
    
showtext(202 this.itemp.pl.1.57temp.pl.4.35"Arial""cb", @ temp.pl.clientr.guildtag);
    
changeimgcolors(202 this.i1111);
    
changeimgvis(202 this.i1);
    
changeimgzoom(202 this.i0.65);
  }
  
setTimer(0.05);

If you're going to base your system off anyone's code base it off my 'player block drawer' in this post (2nd script): http://forums.graalonline.com/forums...04&postcount=6
__________________
Quote:

Last edited by fowlplay4; 10-08-2011 at 06:45 PM..
Reply With Quote