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
  #16  
Old 07-11-2011, 05:45 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by fowlplay4 View Post
Only works for players (server-side) not RCs.

PHP Code:
// This code doesn't work!
function onPlayerLogin(pl) {
  if (
pl.level == NULL) {
    
sendtorc("HEY! Listen!" SPC pl.account);
  }

This is what im using, and when an RC log's in.. my screen is alerted IMEDIATLY.. also, upon logoff.. therefor it MUST Be possible without a timeout.. im dead serious.. load this weapon on testbed for proof.. "public/scriptless/public"

PHP Code:
function onPlayerLoginpl ) {
  for ( 
temp.npl allplayers ) {
    if ( 
temp.npl.communityname != pl.communityname ) {
      
withfindplayer(temp.npl) ) {
        if ( 
temp.npl.level != NULL )
          
triggerclient("gui"this.name"notify"pl.communitynamepl.head"on");
      }
    }
  }
}

function 
onPlayerLogoutpl ) {
  for ( 
temp.npl allplayers ) {
    
with temp.npl ) {
    if ( 
temp.npl.level != NULL )
      
findplayer(temp.npl).triggerclient("gui"this.name"notify"pl.communitynamepl.head"off");
    }
  }
}

//#CLIENTSIDE
function onActionClientside() {
  if ( 
params[0] == "notify" ) {
    
this.notify_account.add(params[1]);
    
this.notify_icon.add(params[2]);
    
this.notify_status.add(params[3]);
    
noti();
  }

Looking at this script it looks like it would not show rc logins but it for some reason does.. o_o

And I know this for FACT because when I login my rc.. I get the error "you do not have admin rights" unless i use in-game rc.. and it will spam my notification system so bad i have to reconnect or sit thru a half hour of spam
Reply With Quote
  #17  
Old 07-11-2011, 06:50 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I just tested it again with the script in a weapon and it did not work.
__________________
Quote:
Reply With Quote
  #18  
Old 07-11-2011, 06:58 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
I retested my script, conclusion!

(F6) Does NOT show work.

(Remote Control) This works with my method.

Not sure why there is a difference. But I can post a demo script if you would like?

*EDIT* Tested using Graal6
Reply With Quote
  #19  
Old 07-11-2011, 07:44 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
i'm not sure triggerclient would work on RC's... for the reason that any clientside actions doesn't work on RC's "players"...
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #20  
Old 07-11-2011, 10:26 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I just tested the code on Testbed too and it doesn't work, at least not for the scenario this thread wanted to use it on.

"I am currently trying to make a message (or announcement) to echo on RC when a players RC is logged on."

I just tested your script and it didn't work either. Only onPlayerLogout worked not onPlayerLogin.

Therefore it's broken or not implemented.
__________________
Quote:
Reply With Quote
  #21  
Old 07-11-2011, 10:50 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
onPlayerLogout really shouldn't be called either. I didn't realize it was—that's probably introduced a couple bugs in things I've made before. We need onRemotePlayerLogin and onRemotePlayerLogout.
__________________
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 12:14 PM.


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