SA-MP Gamemodes with PHP

Holy shit, Nice job.
New way of Scripting SA-MP, surely gonna use this.
Reply

Sorry guys, I really hadnt had much time in the last year and somehow forget about the project.
Of course everyone is allowed to help in the development. The easiest way is to use github and do a pull request.

If someone has newer binaries, i can of course link them in the first post, simply send me a message.

lapayo
Reply

I've compiled it with new natives and some fixes and posted in previous page. Thanks for the plugin btw =)

Some of my friends says there will be memory loss while passing c assembly to small-c assembly - or something like that. Is this true?
Reply

Quote:
Originally Posted by erorcun
Посмотреть сообщение
memory loss while passing c assembly to small-c assembly
Sorry, I dont really know what you mean with "passing c assembly to small-c assembly".

And I linked your new Binaries in the first post, thanks for them.
Reply

Hello, i have a problem with "pdo framework" please help me. I'm taking this Fatal error. How can i solve this problem? Thanks already all.

Error opcode:
Код:
Fatal error: Class 'PDO' not found in (on line 11)
Reply

Quote:
Originally Posted by Players
Посмотреть сообщение
Hello, i have a problem with "pdo framework" please help me. I'm taking this Fatal error. How can i solve this problem? Thanks already all.

Error opcode:
Код:
Fatal error: Class 'PDO' not found in (on line 11)
You might need to install php-pdo
Reply

Quote:
Originally Posted by ikkentim
Посмотреть сообщение
You might need to install php-pdo
I do it. But i'm still taking errors. Please help me

Here is some screnshots, i hope thats helps you.


Reply

Sorry about flooding but please anybody help me.
Reply

Just to let you guys know.
Next month I will continue the development of this plugin(already got the confirmation of lapayo ~2 weeks ago)

@Above, had you tried to load the module with dl?
example:
PHP код:
dl("php_mysqli.dll"); 
Reply

How do I make it work with Gamer_Z's Anti-Cheat ?
Reply

It depends.
Samphp cannot(yet) handle other plugins callbacks.
However, you can register the plugin natives with RegisterAMXNative.
PHP код:
RegisterAMXNative("<function name>""<return type or null>""<arg1>""<arg2">); 
You can take a look on the code here, the comment helps to understand how does the function works.
Reply

Thank you,

By the way, would be nice if there would be an option to make a dialog loop, so for example if when the player login 's and he entered the wrong password, then I could just send him back and count the number of failed logins.
Reply

Quote:
Originally Posted by xkirill
Посмотреть сообщение
Thank you,

By the way, would be nice if there would be an option to make a dialog loop, so for example if when the player login 's and he entered the wrong password, then I could just send him back and count the number of failed logins.
With the framework, that is a bit complicated, however when i have the possibility to continue the development of the plugin, i will try to implement it.
Reply

Looks Great, I'll surely give it a try.
Reply

Код:
In file included from /usr/local/include/sampgdk/sdk.h:61:0,
                 from /usr/local/include/sampgdk/export.h:20,
                 from /usr/local/include/sampgdk/a_players.h:2,
                 from ./src/samphp.h:9,
                 from ./src/bindings.h:4,
                 from ./src/bindings.cpp:1:
/usr/local/include/sampgdk/amx/amx.h:28:23: fatal error: sclinux.h: No such file or directory
compilation terminated.
In file included from /usr/local/include/sampgdk/sdk.h:61:0,
                 from /usr/local/include/sampgdk/export.h:20,
                 from /usr/local/include/sampgdk/a_players.h:2,
                 from ./src/samphp.h:9,
                 from ./src/main.cpp:7:
/usr/local/include/sampgdk/amx/amx.h:28:23: fatal error: sclinux.h: No such file or directory
compilation terminated.
In file included from /usr/local/include/sampgdk/sdk.h:61:0,
                 from /usr/local/include/sampgdk/export.h:20,
                 from /usr/local/include/sampgdk/a_players.h:2,
                 from ./src/samphp.h:9,
                 from ./src/samphp.cpp:1:
/usr/local/include/sampgdk/amx/amx.h:28:23: fatal error: sclinux.h: No such file or directory
compilation terminated.
In file included from ./libs/zeex/fakeamx.cpp:15:0:
./libs/zeex/fakeamx.h:18:25: fatal error: sampgdk/amx.h: No such file or directory
compilation terminated.
Finally I managed to install SAMPGDK, but for some reason it gives me the error above while running ./build.sh
I went into /usr/local/include/sampgdk/ and everything is there, as well as sclinux in amx folder.

I've already those packages installed
Код:
gcc/g++ version 4.7.2 (Debian 4.7.2-5)
PHP 5.5.15-1~dotdeb.1
Doxygen 1.8.7
Python 2.7.3
libxml2-dev
cmake version 3.0.0
Running Debian Wheezy 7.6 OS

While installing SAMPGDK there were no errors.
Код:
root@*:home/samp/sampgdk/build# make
[  0%] Built target sampgdk_init
Scanning dependencies of target sampgdk
[  2%] Building C object CMakeFiles/sampgdk.dir/src/internal/init.c.o
Linking C shared library libsampgdk.so
[ 97%] Built target sampgdk
[100%] Building Doxygen documentation
[100%] Built target sampgdk_doc
root@*:/home/samp/sampgdk/build# make install
[  0%] Built target sampgdk_init
Scanning dependencies of target sampgdk
[  2%] Building C object CMakeFiles/sampgdk.dir/src/internal/init.c.o
Linking C shared library libsampgdk.so
[ 97%] Built target sampgdk
[100%] Building Doxygen documentation
[100%] Built target sampgdk_doc
Install the project...
-- Install configuration: ""
(the rest was "up-to-date" and "installing...")
Reply

Why not posting this on the SAMPGdk thread ? I think no one can answer you better than Zeex.
Reply

Wanted to know if anybody is developing a new plugin like this, Kikito said he will start to develop a new one next month(September - this month), but I haven't heard anything new from him nor about this plugin.
Quote:
Originally Posted by Kikito
Посмотреть сообщение
Just to let you guys know.
Next month I will continue the development of this plugin(already got the confirmation of lapayo ~2 weeks ago)
He blocked the PM and the visitor message, so I can't contact him.
Reply

SAMPHP is using the php.dll which you can find in the sa-mp server folder.
That file is basically the PHP standalone, which allows to execute the plugin, even if you don't have the PHP installed.

I will try to release another pre-release this afternoon, with mysql + pdo, and a few more bug repairs.

@Edit, you're using the samphp found in the first page, right?
If so, I think it's time to move on... https://github.com/Lapayo/SAMPHP/releases
Download the SAMPHP_WINDOWS and having fun with it.
Reply

No I'm using this one:
Quote:
Originally Posted by Kikito
Посмотреть сообщение
You can download the windows version* over our GitHub page.
Thank you for your explanation, I understand better now.
But I still don't understand why phpversion () output 5.4.15 if your php5.dll is used instead of my php server.
So in reality, our extensions mysqli or PDO (or others) must match your php5.dll? In this case, it could be wise for including it in the package to avoid this kind of problem (or to avoid having to read all the pages of the topic, I do not speak English very well as you can see ^^)

Edit:
Quote:
Originally Posted by Kikito
Посмотреть сообщение
@Edit, you're using the samphp found in the first page, right?
Oh right, I think you're right. I probably mixed the two archives! I'm sorry for making you waste your time.
A terrible mistake. I'm a little tired :/
Reply

Well, about the PHP version, Could you download it once again and replace the php5.dll, sampgdk4.dll and the plugin folder?

I've downloaded now the pre-release(just to make sure), and the php version installed is 5.6.2.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)