Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Showimg not working... (https://forums.graalonline.com/forums/showthread.php?t=84743)

oo_jazz_oo 03-19-2009 04:08 AM

Showimg not working...
 
This has been bothering me...showimg is being weird with indexes under 200.

Sometimes the images show, sometimes they dont...they always show for the client, but not for other players.
Some images do work however, such as block.png and bomb.png.

Heres the script.
PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
showimg(1"light4.png"player.xplayer.y);
  
  
showtext(2player.xplayer.y"Arial""c""[test]");


I can see the light on myself, but not on the other person (yes he has the weapon too). But I can see the text on him just fine.
I uploaded light4.png to the server, so I dont know what the problem is.

If I change it to say...block.png, the it shows perfectly fine.

However, I had a for() loop of 20 images showing, all of them showed for the client, and some actually showed on the other player...
So, its being really weird, and I have no clue what to do. -_-

(It was doing this on Dev mxo312, and also on N-Pulse, from what I tested)

cbk1994 03-19-2009 04:30 AM

There's a limit to the size of an image that can be shown on clientside to other players. This is to prevent people from displaying a tileset or another large image.

I suggest you use player.attr and a GANI script.

oo_jazz_oo 03-19-2009 04:35 AM

Wow. Since when? Because, I know for a fact i've shown lights like that before...

Thanks.

xXziroXx 03-19-2009 04:37 AM

Quote:

Originally Posted by oo_jazz_oo (Post 1475810)
Since when?

It's been that way as long as I can remember, which goes back to at least 2004. It's possible the limitation was introduced earlier, it should be mentioned in an newfeatures document.

WhiteDragon 03-19-2009 04:38 AM

I don't think the image size limit is the problem here. It's just most likely acting up because all the players having the showimg displaying index < 200 (which means show on all clients) probably tries to overwrite each other.

If all the players are running this weapon then I would just say use an index above 200 (with a loop on the players).

oo_jazz_oo 03-19-2009 04:42 AM

Quote:

Originally Posted by WhiteDragon (Post 1475812)
I don't think the image size limit is the problem here. It's just most likely acting up because all the players having the showimg displaying index < 200 (which means show on all clients) probably tries to overwrite each other.

If all the players are running this weapon then I would just say use an index above 200 (with a loop on the players).

Its only 2 players. And when I show 20 different texts with the same index, it shows for each player.
It just seems like theres a data limit for this..

I resized the image, and it will only show a certain ammount. After it reaches that ammount, it just stops showing. lol

WhiteDragon 03-19-2009 04:52 AM

Quote:

Originally Posted by oo_jazz_oo (Post 1475813)
Its only 2 players. And when I show 20 different texts with the same index, it shows for each player.
It just seems like theres a data limit for this..

I resized the image, and it will only show a certain ammount. After it reaches that ammount, it just stops showing. lol

Well, then yes, that is the image size limit they were talking about.

You could do it like this:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
player.attr[10] = true;
}
function 
onPlayerEnters() {
  
temp.0;
  for (
temp.players) {
    if (
player.attr[10]) {
      
showimg(200+temp.i"yourimage.png"temp.p.xtemp.p.y);
      
temp.i++;
    }
  }


Or something to that effect.

cbk1994 03-19-2009 05:07 AM

Quote:

Originally Posted by oo_jazz_oo (Post 1475810)
Wow. Since when? Because, I know for a fact i've shown lights like that before...

I ran into the same problem on some servers before (with light2.png).


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

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