Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Request: Playerenters (https://forums.graalonline.com/forums/showthread.php?t=67293)

Bl0nkt 07-12-2006 07:55 PM

Request: Playerenters
 
Can this event/function be called when a player logs on in a room please? It'd be so useful at times.

Warcaptain 07-12-2006 08:10 PM

It should be called when a player enters a room for any reason, even if its because they just logged on.

Does it not already do this?

Bl0nkt 07-12-2006 09:02 PM

It doesn't call it when you login in that room.

Admins 07-12-2006 09:48 PM

It should

Bl0nkt 07-12-2006 10:31 PM

2 Attachment(s)
Here's an example.

Pic 1 - I enter the room. When playerenters it loads those tiledefs.
Pic 2 - I reconnect in that same room. Notice the tiledefs not loading.

I can find other examples if need be.

Warcaptain 07-12-2006 10:43 PM

Perhaps it is not loading the tiledefs right then, you should try debugging it with some echo() in the playerenters

ie:

PHP Code:

function onPlayerEnters(){
  echo(
"welcome to the room");


enter the room normally and by logging on and appearing in that room and seeing if it echo's that

btw, echo is your best friend for debugging, use it.

Bl0nkt 07-12-2006 10:49 PM

Quote:

Originally Posted by Warcaptain
Perhaps it is not loading the tiledefs right then, you should try debugging it with some echo() in the playerenters

ie:

PHP Code:

function onPlayerEnters(){
  echo(
"welcome to the room");


enter the room normally and by logging on and appearing in that room and seeing if it echo's that

btw, echo is your best friend for debugging, use it.

Oddly enough, that worked both serverside and clientside. However, I've had difficulty using playerenters when trying to add weapons to a player entering the level.

Skyld 07-13-2006 01:54 AM

Quote:

Originally Posted by Bl0nkt
Oddly enough, that worked both serverside and clientside. However, I've had difficulty using playerenters when trying to add weapons to a player entering the level.

That is because Era's login routine clears weapons out and readds them as necessary during logon. You are probably adding them before the routine finishes.

Angel_Light 07-14-2006 12:58 AM

is tyhere another function or command like onPlayerLogin you could also use?


All times are GMT +2. The time now is 03:25 AM.

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