Invitation system setup

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Hassan Khallouf
Posts: 41
Joined: 06 Jul 2017, 04:35

Invitation system setup

Postby Hassan Khallouf » 25 Jun 2020, 11:52

Hello,
I'm trying to make a simple invitation system with a custom handler when the user accepts.

I can't find any documentation on how to setup the requests

I'm using a simple request from C# in unity

Code: Select all

Client.Send(new InviteUsersRequest(user,50,new SFSObject() ));


but where is this supposed to be caught? do I have to register a listener in the server?
if I have to make a special listener in the server then what's the point of the API? I can make a custom request to propagate the invitation anyways

and I can't find any docs to set this up,
help is appreciated
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Invitation system setup

Postby Lapo » 25 Jun 2020, 12:42

Hi,
did you check the example from the C# API doc?
http://docs2x.smartfoxserver.com/api-do ... 221f98.htm

do I have to register a listener in the server?

Since your request is initiated from client side I would handle the response from client side too, as the example shows.
Otherwise you can learn more about sending invitations from server side here:
http://docs2x.smartfoxserver.com/Advanc ... s/game-api

Let us know if anything is unclear.
Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 67 guests