[Question] Running a PHP Script with SAMP.
#1

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

Do you mean the button on the site or in-game?
Reply
#3

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

You just need to do the PHP place the value on the database and then, use the database value ingame with pawn functions.
Reply
#5

Use the exec plugin, and execute your script from command line PHP.
Reply
#6

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

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!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)