php directly to sa-mp
#1

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..
Reply
#2

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.
Reply
#3

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?
Reply
#4

https://sampwiki.blast.hk/wiki/HTTP
Reply
#5

Why would you complicate yourself when an update query is the most simple method to sync money.
Reply
#6

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.
Reply
#7

I'm not sure that's actually possible.
Reply
#8

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.
Reply
#9

But can i get instantly answer? because player click button and i want to show instantly that things
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)