Posts: 723
Threads: 366
Joined: Jun 2016
Hi,
It's possible to retrieve in php file current playing player info? like i'am load from database money, but if player is playing money can increase, so i not always get how much money player have..
Posts: 1,661
Threads: 47
Joined: May 2013
Reputation:
0
As long as you update the database with the new money value (for example, using a seperate function), you can display the most up to date data.
Posts: 723
Threads: 366
Joined: Jun 2016
I know i can update, but i ask maybe there is other solution, like call from php file to sa-mp server with all player name if player connected retrieve variable info and use it?
Posts: 513
Threads: 4
Joined: Jun 2015
Reputation:
0
Why would you complicate yourself when an update query is the most simple method to sync money.
Posts: 723
Threads: 366
Joined: Jun 2016
There is not only for money, xp, playtime, you know everything safe in mysql can harm server, if not using properly, when spaming money giving commands or something else..
SickAttack
There is something like in website you click and you get information about player stats, xp,name, and so on so in server, http i need function in php to communite to sa-mp server.
Posts: 3,934
Threads: 353
Joined: Jan 2010
Reputation:
0
I'm not sure that's actually possible.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Write your own custom API in Pawn (sort of reverse API, then) with the socket plugin. Using CallLocalFunction to translate the incoming command (from PHP) to a function call. Same principle that ZCMD uses, basically.
Posts: 723
Threads: 366
Joined: Jun 2016
But can i get instantly answer? because player click button and i want to show instantly that things