Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Only on Player Screen (https://forums.graalonline.com/forums/showthread.php?t=16351)

Mustang1988 11-07-2001 10:22 PM

Only on Player Screen
 
How would I make an image appear over a player, but only that certain player can see it? So when they fire a weapon, an image appears over them with a picture of something.

Fry 11-07-2001 10:26 PM

NPC Code:

//#CLIENTSIDE
if (playertouchsme) {
showimg 201,door.gif,playerx+1.5,playery-2;
freezeplayer 5;
timeout = 5;
}
if (timeout)
hideimg 201;


TDO2000 11-08-2001 01:17 AM

because Fry didn't really explain, why it's only for the player who used the weapon I'll do this:

the Index of the image only has to be higher then 200 then it will be local...

Fry 11-08-2001 01:50 AM

too lazy brr

Faheria_LAT1 11-08-2001 02:02 AM

Weapons can't have //#CLIENTSIDE btw..

Fry 11-08-2001 02:07 AM

I know, but my script wasn't a weapon, only a little npc =)

Loriel 11-08-2001 02:13 AM

Uh all wrong.
200 is only shown locally only.
//#CLIENTSIDE *is* needed for weapons on NPC Server. Although that's not NPC weapon what Fry made.
NPC Code:
//#CLIENTSIDE
if (weaponfired) {
setimg #c;
showimg 200,#f,playerx+1.5-width/2,playery-1-height/2;
setimg fkwarper.mng;
freezeplayer 5;
timeout = 5;
}
if (timeout)
hideimg 200;


I guess that would show whatever the chat text of the player is, and is automatically displayed centered or so...

LiquidIce00 11-08-2001 04:20 AM

no over 199 is local

Mustang1988 11-08-2001 01:41 PM

Thanks, guys. So //#CLIENTSIDE will work online? Or do I need an NPC Server?

Slaktmaster 11-08-2001 04:02 PM

//#CLIENTSIDE won't do anything on non-p2p servers but will make the script run on the client on p2p servers.

CATPIAN OVBIOS TO TEH RESCOUE

Mustang1988 11-08-2001 10:11 PM

Do I need it in the script? Or does the showimg script over 200 work for only local?

mhermher 11-08-2001 10:38 PM

Quote:

Originally posted by Loriel
Uh all wrong.
200 is only shown locally only.
//#CLIENTSIDE *is* needed for weapons on NPC Server. Although that's not NPC weapon what Fry made.
NPC Code:
//#CLIENTSIDE
if (weaponfired) {
setimg #c;
showimg 200,#f,playerx+1.5-width/2,playery-1-height/2;
setimg fkwarper.mng;
freezeplayer 5;
timeout = 5;
}
if (timeout)
hideimg 200;


I guess that would show whatever the chat text of the player is, and is automatically displayed centered or so...

WRONG! Over 199 and under 201 is locla, the rest is "unlocal"

Loriel 11-08-2001 11:13 PM

So 201 is not local? Uh.

Brad_Elven 11-08-2001 11:50 PM

what are the #s? 0-199 is shown to everyone, 200 and up is shown locally?

Xaviar 11-08-2001 11:51 PM

1 Attachment(s)
Quote:

Originally posted by newfeatures2001.txt
- When doing showimg with an image index not in 0..199 then
it will only be shown local

Hmm..For all you people that apparently don't have a copy...Here..I suggest you read it

Brad_Elven 11-09-2001 12:20 AM

Quote:

Originally posted by Xaviar


Hmm..For all you people that apparently don't have a copy...Here..I suggest you read it

Good God Man! That doesnt format correctly in IE

Xaviar 11-09-2001 12:59 AM

Quote:

Originally posted by Brad_Elven


Good God Man! That doesnt format correctly in IE

So download it and read it in notepad =P

Brad_Elven 11-09-2001 01:05 AM

Quote:

Originally posted by Xaviar


So download it and read it in notepad =P

hehe =D


All times are GMT +2. The time now is 08:30 PM.

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