SA-MP Forums Archive
command to send a message - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: command to send a message (/showthread.php?tid=370897)



command to send a message - Samer_P - 21.08.2012

Hello everyone i have 2 servers connected on 1 database using mysql @ some servers i found that they can send a message from server 1 to server 2 i wonder how this works i know how to script but can someone give me an idea how can i make it work. Thanks


Re: command to send a message - Misiur - 21.08.2012

Quite simple - you need to set a timer which will check if there are any changes in table, and if there were any, grab them.


Re: command to send a message - Samer_P - 21.08.2012

i though about this but this dosen`t lag the server? because the timer always checking and reading the database even when updating it


Re: command to send a message - Misiur - 21.08.2012

SQL query is the heaviest thing any code does. You can do it in some other way - f.e run some other language (php/python) script on the server machine, and if detects changes in db, then create temporary file which if detected by your script runs real sql query. Or something like that.


Re: command to send a message - Samer_P - 21.08.2012

hmmm Thanks for help i`ll try the both and see the result reputation for you