Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-07-2010, 09:44 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
find player attribute for allplayers

I have this:

PHP Code:
function onActionServerSide() {
  if (
params[0] == "loadPTList") {
    for (
plallplayers) {
      if (
findplayer(pl).attr[5]) {
        
temp.searching_list.add(findplayer(pl));
        
triggerClient("gui"name"sendList");
      }
    }
  }

I tested and the serverside is getting triggered up until the if command. What I'm obviously trying to do is if the player.attr[5] for all players on at that time are true, to add them to a temp.array, but its not, its stopping at the if command, and mine, at least in testing, is true.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 08-07-2010, 10:09 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
allplayers is an array of player objects, not account names.

PHP Code:
function onActionServerSide() { 
  if (
params[0] == "loadPTList") { 
    
temp.searching_list null;
    for (
temp.plallplayers) { 
      if (
pl.attr[5]) { 
        
searching_list.add(pl.account);
      } 
    }
    
    
triggerClient("gui"name"sendList"searching_list); 
  } 

__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:41 PM.


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