Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   question about a script for the PM window(previously named "question") (https://forums.graalonline.com/forums/showthread.php?t=81195)

Chompy 08-13-2008 09:01 PM

Uhm, isn't allplayers[] an array containing objects? So why are you using findplayer() on an object? :o

And, are you sure it finds the object for the Staff on RC though?

And, findplayer() only finds player objects of players online, so it will not return RCs

Crow 08-13-2008 09:45 PM

I fixed it, problem was probably findPlayer(), yessum. Bad Frankie, bad!

Vulgar 08-14-2008 07:14 PM

Quote:

Originally Posted by Frankie (Post 1413909)
I can't get it -.-

PHP Code:

function Admin_TextList1.onDblClick()
{
  
temp.toks params[1].tokenize(":");
  for (
temp.plallplayers)
  {
    if (
pl == temp.toks[0] && pl.headimg == "era_head-remotecontrol.png")
    {
      
this.pmAccount pl;
    }
  }
  (@ 
"-Playerlist").openPMWindow({findPlayer(this.pmAccount)}, false); 


it's supposed to PM the RCs but if you have player and RC open it will try PMing the player.

so I'm using the allplayers so I can get the ID of the RC and not the player, but I can't get it to work right.

Wouldn't you want it to check for player.level = NULL? If not then why.

Crow 08-14-2008 07:49 PM

Quote:

Originally Posted by Vulgar (Post 1414309)
Wouldn't you want it to check for player.level = NULL? If not then why.

Because this is clientside. Every player not in your level will appear to have no level, though you can check every headimg clientside (because of the playerlist).


All times are GMT +2. The time now is 05:46 AM.

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