Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Player's account in showani? (https://forums.graalonline.com/forums/showthread.php?t=134259808)

12171217 07-13-2010 12:10 AM

Player's account in showani?
 
I'm using a scripted showani and I need to know what the client's account is.

Let's say I simply wanted to showtext the player's account where the gani is. I want the account of whomever is VIEWING it, not the client SHOWING it.

Crow 07-13-2010 01:42 AM

Quote:

Originally Posted by 12171217 (Post 1587243)
I'm using a scripted showani and I need to know what the client's account is.

Let's say I simply wanted to showtext the player's account where the gani is. I want the account of whomever is VIEWING it, not the client SHOWING it.

Gani scripts will show the viewer's "values" when using client. or clientr.vars, so you'll have to store the account in one.

cbk1994 07-13-2010 06:23 AM

Quote:

Originally Posted by Crow (Post 1587249)
Gani scripts will show the viewer's "values" when using client. or clientr.vars, so you'll have to store the account in one.

Just use a global variable, in some system script:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
localPlayer player;


then access like

PHP Code:

localPlayer.account 


12171217 07-13-2010 08:10 AM

I would've preferred to do it without hackery, but I guess it's the only way.

Crow 07-13-2010 10:19 AM

Quote:

Originally Posted by cbk1994 (Post 1587299)
Just use a global variable, in some system script:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
localPlayer player;


then access like

PHP Code:

localPlayer.account 


Sure that works?

cbk1994 07-13-2010 04:19 PM

Quote:

Originally Posted by Crow (Post 1587354)
Sure that works?

I can't see any reason it wouldn't, but I haven't tested it.


All times are GMT +2. The time now is 12:43 AM.

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