communicating between client-side plugin and server
#1

Hi,

I'm creating client-side plugin. Can someone give me idea, how can client-side plugin communicate with server? I think it would need a server-side plugin... I mean, when I call
Code:
DoSomething(playerid);
the client-side plugin does something. Or when something happens on client, it calls
Code:
SomethingHappened(playerid, whatHappened);
Thanks, I hope I'm not breaking rules this time.
Reply
#2

Sure you'll need a server side plugin, how else could you communicate between the both sides? SA-MP has no function used for this.

In my case, I've been using sockets for a long time, getting great results from a client-side application I made that communicating the server. You can do a lot if you have such client-side program.

BlueG developed a sockets plugin which is really easy to use, but you should anyway, know what sockets are to use them at both sides.
Reply
#3

Quote:
Originally Posted by Amit_B
View Post
Sure you'll need a server side plugin, how else could you communicate between the both sides?
Using client messages or something else, but it would be slow. For example, server sends client message with text "startsomething", then when client gets message, it goes through client-side plugin and does execution. I'll try sockets, thanks.
Reply
#4

Any ideas of making socket client using C++ as easy as using BlueG plugin? I know, I shouldn't ask here, but...
Reply
#5

Quote:
Originally Posted by zgintasz
View Post
Any ideas of making socket client using C++ as easy as using BlueG plugin? I know, I shouldn't ask here, but...
What are you actually trying to accomplish? You want to create a client to communicate with the sockets plugin?
Reply
#6

Quote:
Originally Posted by Gh05t_
View Post
What are you actually trying to accomplish? You want to create a client to communicate with the sockets plugin?
Yes, you are absolutely right. I want to make client-side plugin communicate with server sockets plugin. I made two sa-mp servers communicate with each other using BlueG plugin. It was easy with the plugin, but creating sockets client using C++ isn't that easy and I'm searching easy examples for all day.
Reply
#7

It took me a day or two to learn how exactly does it works; anyway, i've developed the client side program with C#, which I find it easy to work with.
Reply
#8

I've found some great examples, but Visual Studio 2010 Express doesn't have required header files. I've tried to get them, but it was worthless. If anyone would like to help me, you can do it in PM, because I think moderators will get mad when they'll see someone asking C++ help.
Reply
#9

Most likely you forgot to install something that normally gets installed. A framework, or a package of visual studio.
Reply
#10

I made it using winsock, I've tried earlier without it . I'll try more tomorrow, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)