Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Returning players clientside (https://forums.graalonline.com/forums/showthread.php?t=134268064)

devilsknite1 04-10-2013 05:30 PM

I was messing with it originally, and player.chat only outputs the first entry, but echo() outputs all of them. Then the first time I stored it to a variable using
PHP Code:

for ( temp.players 

temp.i would return null, so it seems a little sketchy at some times, but after updating the weapon again it seemed to have fixed itself (lag?).

DustyPorViva 04-10-2013 07:19 PM

Quote:

Originally Posted by devilsknite1 (Post 1716002)
I was messing with it originally, and player.chat only outputs the first entry, but echo() outputs all of them. Then the first time I stored it to a variable using
PHP Code:

for ( temp.players 

temp.i would return null, so it seems a little sketchy at some times, but after updating the weapon again it seemed to have fixed itself (lag?).

Because when you use player.chat it replaces each instance with the next, so you're only seeing one value.

Doing something like: player.chat @= temp.i; will be a lot different. Stick to using echo four outputting loop data though.

Admins 04-11-2013 03:41 AM

Normally the players[] array should be fine on client-side, displaying all players of the 3x3 map area (on iphone servers: all visible players)


All times are GMT +2. The time now is 01:15 AM.

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