SA-MP Gamemodes with PHP

I just edit my post :/
Edit: MSVCP120.dll is missing (Microsoft visual c++ 2012 redistributable probably)
Microsoft visual c++ 2013* redistributable x86
Reply

Quote:
Originally Posted by Enchancer
Посмотреть сообщение
MSVCP120.dll is missing (Microsoft visual c++ 2012 redistributable probably)
Yep, you're right.
I had upgraded this project from vs 2010 for vs 2013, so you need to install the microsoft visual c++ 2012 redistributable to get it working.

___________
SAMPHP Plugin revision 2.0B is there!
You can download this version directly from our GitHub repository.
Changelog in this version:
Quote:
+ PHP Version updated for 5.6.3
+ Added MySQL and PDO support
+ Updated the extension path for <server folder>/php/ext, now you can run the extensions you want, without trouble finding the extension directory.

The production release is almost there, and it will be optional*, since the unique difference in that release will be AMX handlers.(Call, Register, etc.)

* Unless if critical bugs are found.


@Edit: the windows binaries released 2 - 3 days ago had a bug, which I had repaired now.
For the people who's using the version 2.0B, I would advice you to re-download the package, and just update the samphp.dll file.

The binaries for linux should be created in the following days, I'm currently having some issues with my computer HDD.
Reply

https://github.com/Bubelbub/SAMPHP.git
Maybe someone has time to complete my changes...

I forked the official repository and added Erorcun's changes.
Then i tried to move the project from the "build-vs2008" to the CMake application. (Available for windows and linux)
It would be easier to compile it on linux/windows with that, i think.

The current state is that the cmake cmd works but compiling it on Windows failed with "Missing zend_config.h - No such file or directory".
Maybe we should add the php library instead the sources?

And for the bug with the libphp5.so we should use a static build.
I think thats better. Some machines have an older php version as default...



And after that i think we could integrate this streamer plugin.
Then the php gamemodes would be greater than the pawn gamemodes
https://github.com/samp-incognito/sa...mer-plugin.git
Reply

Hi there Bubelbub
The plugin is now released in a new thread, as well in a new repository.
Link for the new thread: https://sampforum.blast.hk/showthread.php?tid=547469
Link for the new repository: https://github.com/crodriguespt/samphp

Follow the instructions found in the new thread related to compiling the plugin on windows.
Remember, you NEED to download the php source code and build it.
About the plugin for linux, I didn't changed anything there yet.
Quote:

And for the bug with the libphp5.so we should use a static build.
I think thats better. Some machines have an older php version as default...

could you send me a private message it more informations about that bug?

About the streamer plugin, the following releases will have full support to other plugins callbacks.

Once again, please, use the new thread for questions, bug reports and feedback, since I'm the current developer, and I can't edit the main post of this thread.
Reply

Not working with windows xp sp3 32bit.
AND
Link for the new thread: https://sampforum.blast.hk/showthread.php?tid=547469 NOT WORKING, it writes me i dont dont have permissions
Reply

Quote:
Originally Posted by katumas
Посмотреть сообщение
Not working with windows xp sp3 32bit.
AND
Link for the new thread: https://sampforum.blast.hk/showthread.php?tid=547469 NOT WORKING, it writes me i dont dont have permissions
This plugin hasn't been updated in almost a year and your operating system isn't even supported by Microsoft anymore
Reply

I had performed a update in the last days to the plugin after the donation I had received and the request I had to continue the development of it.

I will release an update for the plugin in a new thread(clean thread) as soon as I get the framework rewritten(I will offer 2 versions of the framework to be downloaded apart of the plugin itself, the plugin now will only consist in the plugin itself(dll's, and the basic PHP environment) and time to do so.

So you can expect it in mid September to be online, totally updated and bug free(or at least will try to do so)
Reply

Quote:
Originally Posted by GWMPT
Посмотреть сообщение
I had performed a update in the last days to the plugin after the donation I had received and the request I had to continue the development of it.

I will release an update for the plugin in a new thread(clean thread) as soon as I get the framework rewritten(I will offer 2 versions of the framework to be downloaded apart of the plugin itself, the plugin now will only consist in the plugin itself(dll's, and the basic PHP environment) and time to do so.

So you can expect it in mid September to be online, totally updated and bug free(or at least will try to do so)
When you release SAMPHP ?
Reply

i'm samphp fanboy
Reply

Guys, do not throw. It is waiting for the release
Reply

php 7 for samp 0.3.7 would be great! (Windows 10 32bit support )
Reply

I would like to use illuminate/database. But the server just crashing every time I try to connect to the database - no error information. The php version is always correct.
Reply

Quote:
Originally Posted by TutNichts
Посмотреть сообщение
I would like to use illuminate/database. But the server just crashing every time I try to connect to the database - no error information. The php version is always correct.
well you need to set php which extension to load, you are probably missing \PDO.

add try/catch statement around part where you make new instance of your class, and in catch you can do fwrite/file_put_contents
Reply

I am no longer updating this plugin, and the future updates are canceled/postponed(There is a possibility that I, later, might update this plugin without the framework, so people can develop their own frameworks and have a better base to work with.)

If someone is willing to continue the development in the meanwhile, you can find the version 2(If not mistaken) at https://github.com/crodrigues96
I would like to point out that this version has some useless C/++ code lines which are intended to be removed.
Reply

Quote:
Originally Posted by GWMPT
Посмотреть сообщение
I am no longer updating this plugin, and the future updates are canceled/postponed(There is a possibility that I, later, might update this plugin without the framework, so people can develop their own frameworks and have a better base to work with.)

If someone is willing to continue the development in the meanwhile, you can find the version 2(If not mistaken) at https://github.com/crodrigues96
I would like to point out that this version has some useless C/++ code lines which are intended to be removed.
Can you release working version for 0.3.7 i think its not to be hard to do this.
Its possible to use plugins? like streamer etc.
Reply

I do not have time to update this plugin, since it will take up to 3 - 4 hours to fully update it, this is, if not more.
Not counting with the PHP compilation I need to execute before proceeding to the update of the plugin.
Reply

I'm working on a new version of the plugin, with the new PHP-engine. Maybe I will release as soon as fix some errors with calling functions by reference to foreign plugins (ints and floats works perfectly, except for the strings) and finish the framework.

https://github.com/BonhommeG/SAMP-PHP
Reply

Quote:
Originally Posted by amirm3hdi
Посмотреть сообщение
For now I'm using an include/require for all my variables to use them in each function/event,
I'll try the global method too.

Also, I'm trying to show dialog but it doesn't work at all, no errors too :/ check:
PHP код:
Event::on("PlayerSpawn", function ($player) {
    
$dialog Dialog::create(5"{00FFFF}Weapon Class""Select""Cancel");
    foreach(
getWeaponClasses() as $class) {
        
$dialog->addRow("{FFFF00}$class[name]\t{DDDDDD}".
            
Server::getWeaponName($class[weapons][0][0])." ($class[weapons][0][1])\t".
            
Server::getWeaponName($class[weapons][1][0])." ($class[weapons][1][1])\t".
            
Server::getWeaponName($class[weapons][2][0])." ($class[weapons][2][1])",
            
$class
        
);
    };
    
$dialog->on("Success", function($player$dialog$class) {
        echo 
gettype($class);
    })->
showPlayer($player);
 }); 
Another question, is it okay to use normal samp functions? like ShowPlayerDialog?
What does getWeaponClasses() returns(an object, array, etc) and looks like? Also what is the dialog supossed to do, because your code looks strange.
Reply

Quote:
Originally Posted by BlackBank3
Посмотреть сообщение
What does getWeaponClasses() returns(an object, array, etc) and looks like? Also what is the dialog supossed to do, because your code looks strange.
Here's what getWeaponClasses() returns: (I included only 1 item)
PHP код:
function getWeaponClasses() {
    return [
        [
            
name => "Assault",
            
weapons => [[WEAPON_M4150], [WEAPON_UZI400], [WEAPON_GRENADE2]]
        ]
    ];

Well I can't find any examples for dialog style 5...
But I think this is the right way to add rows, if not, can u provide an example?
Reply

I'm not sure if the version uploaded has support to table "like" dialogs.
This plugin needs a update for sure, I'll try to do a update in the upcoming days.


It's sad that nobody else picks on this project and continue developing it, like I did when lapayo released the original version.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)