SA-MP Forums

Go Back   SA-MP Forums > SA-MP > General

Reply
 
Thread Tools Display Modes
Old 03/03/2015, 10:16 PM   #1
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 4,570
Reputation: 332
Default Data Communication

Hello, friends. I'm developing an Anti-Cheater looking for files / processes in GTA San Andreas Player folder, and while this application is functional, but my goal is for the application to communicate with the gamemode file (.pwn).

Well, I have in mind that if the player does not load application (Launcher) he is unable to connect to the server, but I have no idea how I can call the application in pwn.

I had an idea that I would "write" one true / false value in a PHP page with the Anti-Cheater and then I was communicating with the application by the gamemode (.pwn) along with the include a_http would get page response catching true / false, but do not know how to do such a thing.

I ask everyone's help to achieve this, I know it's hard but a lot of people should know how to make the communication of the parties.

* I'm using ****** Translate *
__________________

Precisando de algum sistema? Chame!

ipsLuan is offline   Reply With Quote
Old 04/03/2015, 10:59 AM   #2
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,733
Reputation: 238
Default Re: Data Communication

You can possibly allow your application to communicate with MySQL.
If the application is running, it could set a specific value to 1, and if the application is closed, reset it to 0.
Then you can simply query your database from within pawn and check that value.
If it's 1, allow the player to connect.
If it's 0, kick him upon connecting with an error-message.

Also, you could add the same to a timer that runs every 5 seconds or so.
Then you can detect if the player has ended his application while being connected and you can kick him.
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
Youtube channel: https://www.youtube.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business
PowerPC603 is offline   Reply With Quote
Old 04/03/2015, 11:09 AM   #3
ikey07
High-roller
 
ikey07's Avatar
 
Join Date: Jul 2010
Location: Latvia,Riga
Posts: 1,167
Reputation: 180
Default Re: Data Communication

Most reasonable method would be to make a DLL which starts when SA game starts, and make it so it works just like an audio plugin.

But there is one problem, who gave you rights to check what files I have on my HDD ?
__________________
ikey07 is offline   Reply With Quote
Old 04/03/2015, 11:18 AM   #4
ev0lution
Gangsta
 
ev0lution's Avatar
 
Join Date: Jul 2009
Posts: 669
Reputation: 380
Default Re: Data Communication

Quote:
Originally Posted by ikey07 View Post
Most reasonable method would be to make a DLL which starts when SA game starts, and make it so it works just like an audio plugin.

But there is one problem, who gave you rights to check what files I have on my HDD ?
It would be a download that is required from this person's website, so you give them those rights by downloading their custom launcher/dll (as you can perfectly choose not to download it and not play on their server)

The problem with doing this is that 99% of potential players won't ever join your server because they can't be bothered downloading your custom software just to play on a server that they don't know is any good yet.
__________________
ev0lution is offline   Reply With Quote
Old 04/03/2015, 12:42 PM   #5
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 4,570
Reputation: 332
Default Re: Data Communication

Quote:
Originally Posted by ev0lution View Post
It would be a download that is required from this person's website, so you give them those rights by downloading their custom launcher/dll (as you can perfectly choose not to download it and not play on their server)

The problem with doing this is that 99% of potential players won't ever join your server because they can't be bothered downloading your custom software just to play on a server that they don't know is any good yet.
My goal is that we only use this feature after the server get a good number of fixed players.

Quote:
Originally Posted by PowerPC603 View Post
You can possibly allow your application to communicate with MySQL.
If the application is running, it could set a specific value to 1, and if the application is closed, reset it to 0.
Then you can simply query your database from within pawn and check that value.
If it's 1, allow the player to connect.
If it's 0, kick him upon connecting with an error-message.

Also, you could add the same to a timer that runs every 5 seconds or so.
Then you can detect if the player has ended his application while being connected and you can kick him.
So I've heard by the means of MySQL, but I need a database. I was pessando to do with the use of sockets, make a connection to the socket and communicated with the pawn, but I do not know the use of this tool with the pawn language.
I was told also by means of a_http, which created a file with the name of the game and created a boolean and put its value to true / false.

Anyway, what is the easiest and most effective?
__________________

Precisando de algum sistema? Chame!

ipsLuan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filterscript / Gamemode Communication ?? stuoyto Scripting Help 7 10/05/2012 03:56 AM
Communication between 2 servers. Michael@Belgium Scripting Help 10 03/05/2012 06:31 PM
Communication gamemode <> filterscript matejdro Help Archive 4 28/07/2010 05:40 PM
[Include] [INC] NPC-Bridge (GM to NPC Communication) Whiteagle Includes 8 01/03/2010 10:28 AM
MOVED: [INC] NPC-Bridge (GM to NPC Communication) JaTochNietDan Help Archive 0 12/02/2010 09:04 AM


All times are GMT. The time now is 11:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.