07.06.2013, 22:49
Are you planning on allowing filterscripts as well?
public function playAudioStream($url, $x = 0.0, $y = 0.0, $z = 0.0, $distance = 50.0, $usePos = false)
{
return PlayAudioStreamForPlayer($this->id, $x, $y, $z, $distance, $usePos);
}
Well, not planned yet, but possible. But given the fact, that you can have unlimited events, you could simply create a new file and include this in the gamemode.php. (Do you want a shared or a isolated environment for the filterscripts?)
And some news I finally managed to create a version for windows. You can download the binaries from the first topic (Compiling instructions will follow later, it was very complicated ) I also created new releases for centos and debian/ubuntu, using the new code I hope the new code is as stable as the old one I also added a feature, that you can start a gamemode using the server.cfg. Simply add "samphpmode grandlarc" and it will automatically load grandlarc/gamemode.php. If there is no gamemode set it will load gamemode.php as before. Finally I also added an empty gamemode to the binary release. (thx Rsmiley ) Maybe someone wants to help testing the windows version. |
Well, I'm running PHP 5.3.22 and Operating system: CentOS Linux 5.9
And I assume 5.3 wouldn't work, from this? |
You have to compile PHP, or find repository for CentOS, for debian you have ex. dotdeb.org
And how about use other plugins written for pawn, timers etc |
Why don't you link the plugin SDK with PHP using some kind of abstraction layer between them? This way, you won't have any problems porting existing plugins and scripts.
EDIT: Actually, this is a brilliant idea. I'm going to implement it soon if you don't do it first! |
class Stupid_Functions {
static public function Hai($player) {
SendClientMessageToAll(0xFFFFFF, "Everyone says hello to ".$player->GetPlayerName()."!");
}
}
////
Event::on("PlayerConnect", function($player) {
Stupid_Functions::Hai($player);
});
Event::on('PlayerConnect', ['Stupid_Functions', 'Hai']);