SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 06/06/2013, 10:28 PM   #11
Rsmiley
Little Clucker
 
Join Date: Oct 2010
Posts: 15
Reputation: 2
Default Re: AW: SA-MP Gamemodes with PHP

Quote:
Originally Posted by lapayo View Post
Well your problem doesnt seem to be based on the php version, because the loading of the plugin already fails.
I am trying to figure the problem out. What version are you using? 32 bit or 64 bit? At the moment it is only tested on Debian 7 32bit and Ubuntu 12.10 32bit.
(The last on is of course php related, but this isnt a problem, because samphp uses an independent php library )
It's 32bit.
__________________
Just beginning to work with PAWN
PHP/MySQL scripter. Do work for $
Rsmiley is offline   Reply With Quote
Old 06/06/2013, 10:37 PM   #12
[DOG]irinel1996
High-roller
 
[DOG]irinel1996's Avatar
 
Join Date: Jan 2010
Posts: 1,703
Reputation: 288
Default Re: SA-MP Gamemodes with PHP

Awesome, I'll give a try, thank you man.
[DOG]irinel1996 is offline   Reply With Quote
Old 06/06/2013, 10:48 PM   #13
Emmet_
Guest
 
Posts: n/a
Default Re: SA-MP Gamemodes with PHP

The best part is that MySQL is integrated into PHP and we can use it in this plugin. Very nice job!
  Reply With Quote
Old 06/06/2013, 11:06 PM   #14
Whiteagle
Big Clucker
 
Join Date: Mar 2008
Posts: 73
Reputation: 2
Default Re: SA-MP Gamemodes with PHP

I just logged in to tell you that this is an awesome piece of software.

The idea is obviously great and the implementation looks excellent, you managed to create a great core structure!

I just have a couple of question:

- How does it work? Is the PHP thread kept always running and events are fired from the plugin? - just out of curiosity
- Have you made a trial running it for a long time and testing with some regular players? How did it went in terms of performance and such?
- Any Benchmarks yet?

Will be waiting for the Windows Version to test it out

> If you need an help with documentation of the core let me know, I'm willing to help! <

PHP is such a powerful language, that evolved so much since the early times, too bad some people still imagine it as a crappy functional language instead of the swiss army knife it is!

If you manage to get a cross-platform version of it and manage to keep it updated well, just forget PAWN, C++, .NET and Java.
I really really hope for the best for this project.

Heads up for this.
Whiteagle is offline   Reply With Quote
Old 07/06/2013, 12:05 AM   #15
lapayo
Little Clucker
 
Join Date: Jun 2013
Posts: 25
Reputation: 37
Default AW: SA-MP Gamemodes with PHP

Quote:
Originally Posted by Rsmiley View Post
It's 32bit.
Okay, I am downloading a copy right now and will try to make it running tomorrow.

Quote:
Originally Posted by Whiteagle View Post
How does it work? Is the PHP thread kept always running and events are fired from the plugin?
Yes, the PHP script including its environment stays in the memory as long as the server is running.
On events the plugin calls back in the PHP context
Quote:
Originally Posted by Whiteagle View Post
Have you made a trial running it for a long time and testing with some regular players? How did it went in terms of performance and such?
Not really, I also dont really, I have a server running, but I restarted it very often because of new features
IŽll try to leave it running now
Quote:
Originally Posted by Whiteagle View Post
Any Benchmarks yet?
No, but I will try to make some in the future, because this is something that is very interesting to me. But at first I have to complete some other tasks before I can concentrate on this.

Quote:
Originally Posted by Whiteagle View Post
> If you need an help with documentation of the core let me know, I'm willing to help! <
Help would be really awesome. I will contact you when I start with the documentation

And thanks to everyone for the nice words

Last edited by lapayo; 07/06/2013 at 01:42 AM.
lapayo is offline   Reply With Quote
Old 07/06/2013, 01:53 AM   #16
Rsmiley
Little Clucker
 
Join Date: Oct 2010
Posts: 15
Reputation: 2
Default Re: SA-MP Gamemodes with PHP

Thank you lapayo!

I'll check back in later or tomorrow!
If you'd like any help with testing or anything (once its workin on CentOS that is), let me know and I'll do my best to assist
__________________
Just beginning to work with PAWN
PHP/MySQL scripter. Do work for $
Rsmiley is offline   Reply With Quote
Old 07/06/2013, 02:17 AM   #17
lapayo
Little Clucker
 
Join Date: Jun 2013
Posts: 25
Reputation: 37
Default AW: Re: SA-MP Gamemodes with PHP

Quote:
Originally Posted by Rsmiley View Post
Thank you lapayo!

I'll check back in later or tomorrow!
If you'd like any help with testing or anything (once its workin on CentOS that is), let me know and I'll do my best to assist
I successfully compiled a version on centos 5.9
You can download it here:
http://www.sney.net/files/samphp-release-centos.zip

If you need the libphp5.so you can download it here:
http://www.sney.net/files/libphp5.so_centos.zip
(Download it, extract libphp5.so to /usr/local/lib and run "/sbin/ldconfig /usr/local/lib" as root)

Please let me know if these binaries work for you, so I can add them to the first post

And now: Sleeping (4 A.M.)
lapayo is offline   Reply With Quote
Old 07/06/2013, 02:48 AM   #18
[CG]Milito
Huge Clucker
 
[CG]Milito's Avatar
 
Join Date: Sep 2012
Posts: 333
Reputation: 14
Default Re: SA-MP Gamemodes with PHP

Oh dude!
This is Awesome! I'm going to give it a try.
__________________
[CG]Milito is offline   Reply With Quote
Old 07/06/2013, 02:57 AM   #19
Rsmiley
Little Clucker
 
Join Date: Oct 2010
Posts: 15
Reputation: 2
Default Re: AW: Re: SA-MP Gamemodes with PHP

Quote:
Originally Posted by lapayo View Post
I successfully compiled a version on centos 5.9
You can download it here:
http://www.sney.net/files/samphp-release-centos.zip

If you need the libphp5.so you can download it here:
http://www.sney.net/files/libphp5.so_centos.zip
(Download it, extract libphp5.so to /usr/local/lib and run "/sbin/ldconfig /usr/local/lib" as root)

Please let me know if these binaries work for you, so I can add them to the first post

And now: Sleeping (4 A.M.)
It works now! After arguing with it a little, and I recommend putting the libphp5.so instructions in the first post. I was wondering why you were fresh installing php, until I re-read this post.

Also, a protip to people trying to use this. Be sure to load a gamemode, even an empty one. The PHP one will load with the gamemode in server.cfg. I'm just using this lol

Code:
#include <a_samp>

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode");
	print("----------------------------------\n");
}
public OnGameModeInit()
{
	return 1;
}
public OnGameModeExit()
{
	return 1;
}
Thanks again! Gonna play with it more tomorrow and see if I can't throw together some simple GMs to start~
__________________
Just beginning to work with PAWN
PHP/MySQL scripter. Do work for $
Rsmiley is offline   Reply With Quote
Old 07/06/2013, 09:02 AM   #20
Gamer_Z
High-roller
 
Gamer_Z's Avatar
 
Join Date: Jun 2009
Location: Eindhoven, NL
Posts: 3,606
Reputation: 1354
Default Re: SA-MP Gamemodes with PHP

so, I expect this does allow dynamic mode changing without restart too?
__________________
I'm done with these forums (really? Censoring 'g o o g l e', forums were shit anyways) and sa-mp as a whole (why does it attract so many toxic people?).
Bye.
Do not contact me for anything.
Gamer_Z is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gamemodes for 0.3d ? Mr.Fames Scripting Help 16 08/12/2011 09:54 PM
beg for gamemodes gf sql vagosz Help Archive 3 29/12/2009 10:28 AM
I want a new gamemodes crime Help Archive 10 13/08/2009 10:49 PM


All times are GMT. The time now is 03:57 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.