Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Displaying text above heads. (https://forums.graalonline.com/forums/showthread.php?t=134263213)

Emera 05-13-2011 09:57 PM

Displaying text above heads.
 
Hello, i was wondering, is it possible to display a small text message above a players head if they are on stafftag saying "staff"? I'm not asking for whole scripts here but a little help would be great. Thanks guys.

Crow 05-13-2011 10:05 PM

What exactly do you want to do? Change the player's chat to something else when they do something? Or do you actually want to show some sort of "tag" above a player (visible for all other players)?

Mark Sir Link 05-13-2011 10:06 PM

can do this with either a gani script or by using showimgs in a constant loop

since the text Staff would be pretty static, gani would probably be preferred

cbk1994 05-14-2011 12:06 AM

Use a GANI. If you want the text to be an image, just make it like a normal GANI (with no player, single-direction, and the text floating above where the player would be) and put it in the player's attributes.

If you want to draw the text via script, use a GANI script.


Quote:

Originally Posted by cbk1994 (Post 1535959)
The simplest GANI script would be something like

PHP Code:

SCRIPT
function onPlayerEnters() {
  
onCreated();
}
function 
onCreated() {
  
player.zoom 2;
}
SCRIPTEND 

You'd then do something like

PHP Code:

player.attr[8] = "mygani.gani"

GANI paramaters are passed through attributes using commas, like this:

PHP Code:

player.attr[8] = "mygani.gani,2"


When drawing the image, set attachtoowner to true.


All times are GMT +2. The time now is 09:03 AM.

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