Posts: 520
Threads: 146
Joined: Jan 2008
Reputation:
0
Hey guys,
I just wonder if it's possible to run a PHP script with SAMP, for example a Donator site script. If I like press the button to buy an Infernus, is it possible to send a PHP code so the PHP code spawns the Infernus in game while the player presses on that button?.
-Regards
Tony
Posts: 508
Threads: 9
Joined: Dec 2010
Reputation:
0
Do you mean the button on the site or in-game?
Posts: 109
Threads: 16
Joined: Jan 2011
Reputation:
0
Yes, it would be possible, you would however need to know PHP and MYSQL.
As you're only inserting a MYSQL Line into the DB as you would in the server - The only thing you'd have to do is make sure
A) The user is logged out
B) The user logs in AFTER they buy it.
Should work fine
Posts: 31
Threads: 1
Joined: Jun 2012
Reputation:
0
You just need to do the PHP place the value on the database and then, use the database value ingame with pawn functions.
Posts: 2,857
Threads: 62
Joined: Dec 2010
Reputation:
0
Use the exec plugin, and execute your script from command line PHP.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Sockets plugin is also an option. Open a listening socket in your sa-mp server and write to that with PHP. It's doable for I have done something like that before.
Posts: 520
Threads: 146
Joined: Jan 2008
Reputation:
0
Thanks guys, I think I got all information I needed. Since I'm allready using MySQL and like have 4 month experience I think I will make it work. Thanks Alot once agen!