16.05.2014, 22:20
(
Последний раз редактировалось crs0r; 17.05.2014 в 16:46.
)
I am also trying to work with this nice plugin because of the nice overview and that my php skills are much higher than pawno. It is very easy and nice to do with but I still have problems with some functions like the timer. Here is an example:
I get this error:
Without the timer-function I will get freezed directly. I tried already everything but without success. I hope someone can help me with this.
Thank you, best regards from germany.
//EDIT: Has already anyone included the mysql extension? My tries failed hard... Thanks.
//EDIT2: Hmm, so much problems..
I tried to move an object:
But where I can define the object-id in the move function? I already checked the object.php file:
The same problems I have with pickups. There isnt an variable for the defined pickup. Thank you for your help!
PHP код:
Event::on('PlayerEnterVehicle', function($player, $vehicle){
if($vehicle->getModel($player) == '462'){
$player->sendClientMessage(COLOR_GREY, "[Info] You can rent this scooter for $50. Type: /rent");
Timer::create(function() {
$player->freeze($player);
}, 1000, false);
}
});
Quote:
Fatal error: Call to a member function freeze() on a non-object |
Thank you, best regards from germany.
//EDIT: Has already anyone included the mysql extension? My tries failed hard... Thanks.
//EDIT2: Hmm, so much problems..
I tried to move an object:
PHP код:
Event::on('GameModeInit', function() {
$lspdgate = Object::create(986, 1326.7, -1331.7, 14.36, 0, 0, 270);
});
CommandText::register('/open', function($player, $object){
$object->move(0, 0, 10, 1.00); // Where to add the object-id variable $lspdgate?
$player->sendClientMessage(COLOR_GREY, "[Info] The gate opens...");
});
PHP код:
public function move($x, $y, $z, $speed, $rotX = -1000.0, $rotY = -1000.0, $rotZ = -1000.0) // Here isnt an variable for the object-id... ?!
{
return MoveObject($this->id, $x, $y, $z, $speed, $rotX, $rotY, $rotZ);
}