Hi Lapo,
I've searched through the forum, and see this has been asked before.
Basically, i want to make a "buddies" and "blocked" list.
Instead of using the built in buddie list system, i stored a list of names in the database, and loaded them into a persons "uVars.myBuddies"
Once the server has sent it into the client, it is stored clientside, and the uservar is not requested again (for bandwidth) (_root.MyBuddies = uVars.myBuddies)
The "Blocked" list works the same way.
What i was planning on doing, was when a user joins, just looping through the "_root.MyBuddies[]" array to see if the person is my buddy.
BUT, i cannot seem to find a way of getting the event of a new user joining the application. I see OnJoinRoom, but no, OnJoinGame type thing.
Any advice??? if i can get somthing like this for join game, and quit game, i think i can work the rest out.
Cheers.
Buddies and Database...
For your information... SmartFoxServer 1.6 will provide a way more advanced buddy list framework, allowing database persistence, online and offline buddy variables, block list, add-buddy-permissions and more ... all out of the box
We're working hard at it and we expect to release it within this month.
stay tuned
We're working hard at it and we expect to release it within this month.
stay tuned
alcho wrote:What about onUserEnterRoom()
I've actually found a better way to do the "on user enter game" -- and that's through this (example):
Code: Select all
function handleInternalEvent(evt) {
if(evt.name == "userJoin"){
var u = evt.user
var un = u.getName();
var uid = u.getUserId();
}
}
The problem is, when the user comes to leave, the HandleInternalEvent gives an error, as it cannot get the "u.getName"
Any ideas???
Then, all i need to do, is send EVERY user in the zone, the persons name... So i need to know how to do that, but i'm sure thats been asked before, so i'll search that.
Any ideas why i cannot get the name of the person who's quit through the ext???
Cheers.
Lapo -- a more advanced buddies system would be great! -- cannot wait for the update
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 64 guests