25.01.2015, 14:15
- All callbacks that handle return values are now correctly usable. (Cancel PlayerUpdateEvent, PlayerTextEvent, etc.)
- You can now call native functions from other plugins (make sure the shoebill plugin is the first entry in the plugins line in your server.cfg)
- Fixed the player.spawn() bug, they will now spawn normally
Cancel callbacks:
Код:
eventManager.registerHandler(PlayerTextEvent.class, event -> {
if(event.getPlayer().isSpectating())
event.disallow(); //There will be no message in the chat if the player is currently spectating somebody
});
Код:
AmxCallable createDynamicObject = null;
for(AmxInstance instance : Shoebill.get().getAmxInstanceManager().getAmxInstances()) {
createDynamicObject = instance.getNative("CreateDynamicObject");
if(createDynamicObject != null) {
//found CreateDynamicObject native, call it like this:
createDynamicObject.call(18421, ....); //normal pawn arguments. Make sure you put a f after a Float value, like this: 13.0f or 0f
break;
}
}

