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 11-09-2006, 03:36 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
pmswaiting()

HTML Code:
player.chat = (pmswaiting()? "Yes, I need to reply to them!": "No PM's waiting!");
Doesn't seem to be working =[
__________________
Reply With Quote
  #2  
Old 11-09-2006, 04:18 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Have you tried to echo pmswaiting()?
like
HTML Code:
temp.foo = pmswaiting();
echo(temp.foo);
and see if it returns 0/false or 1/true?

also pmswaiting() is TServerPlayer
__________________
Reply With Quote
  #3  
Old 11-09-2006, 05:19 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Like
PHP Code:
for (plallplayers) {
  if (
pl.pmswaiting())
    echo(
"there is a pm from " pl.account);

Reply With Quote
  #4  
Old 11-09-2006, 10:41 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Stefan View Post
Like
PHP Code:
for (plallplayers) {
  if (
pl.pmswaiting())
    echo(
"there is a pm from " pl.account);

Doesn't seem to work :[
__________________
Reply With Quote
  #5  
Old 11-12-2006, 08:19 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Weapon/GUI-script Andrew/PlayerCheck added/updated by xAndrewx
GraalScript: Function pmswaiting not found at line 3 in script of Andrew/PlayerCheck

[On Era]
__________________
Reply With Quote
  #6  
Old 11-12-2006, 08:34 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by xAndrewx View Post
Weapon/GUI-script Andrew/PlayerCheck added/updated by xAndrewx
GraalScript: Function pmswaiting not found at line 3 in script of Andrew/PlayerCheck

[On Era]
I hope you are not using it serverside
Reply With Quote
  #7  
Old 11-12-2006, 08:35 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Skyld View Post
I hope you are not using it serverside
Oh....hahahaha :s
I get it now =D
__________________
Reply With Quote
  #8  
Old 11-12-2006, 09:07 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by xAndrewx View Post
Oh....hahahaha :s
I get it now =D
Yeah, you use it clientside because the PM is queued until the player deals with it.

On the serverside, all PMs are immediately handled by the onPM() event.
__________________
Skyld

Last edited by Skyld; 11-13-2006 at 01:09 AM..
Reply With Quote
  #9  
Old 11-13-2006, 09:04 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Skyld View Post
Yeah, you use it clientside because the PM is queued until the player deals with it.

On the serverside, all PMs are immediately handled by the onPM() event.
Totally get it now, basically you need to check if a certain player has sent you a PM. Would be alot less laggy if there were a function that just returned who the people are that have sent you a PM though.
Thanks alot
__________________
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 11:26 PM.


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