30.12.2015, 03:43
Thank you!
Keep up the good work!
Keep up the good work!
[15:27:19] filterscripts = "" (string) [15:27:19] [15:27:19] Server Plugins [15:27:19] -------------- [15:27:19] Loading plugin: Shoebill [15:27:19] Failed (libjawt.so: cannot open shared object file: No such file or directory) [15:27:19] Loaded 0 plugins. [15:27:19] [15:27:19] Filterscripts [15:27:19] --------------- [15:27:19] Loaded 0 filterscripts. [15:27:19] Number of vehicle models: 0
root@vps1129117:/# find -name "libjawt.so" ./usr/lib/jvm/java-8-oracle/lib/i386/libjawt.so ./usr/lib/jvm/java-8-oracle/jre/lib/i386/libjawt.so
export LD_LIBRARY_PATH=/usr/lib/jvm/java-8-oracle/lib/i386/libjawt.so:/usr/lib/jvm/java-8-oracle/jre/lib/i386/libjawt.so
#export JAVA_HOME=Path to JDK8 (32-bit) export LD_LIBRARY_PATH=.:/opt/jdk1.8.0_65/jre/lib/i386/client:/opt/jdk1.8.0_65/jre/lib/i386/server:/usr/local/lib ./samp03svr
#export JAVA_HOME=Path to JDK8 (32-bit) export LD_LIBRARY_PATH=.:/opt/jdk1.8.0_65/jre/lib/i386/:/usr/local/lib ./samp03svr
#export JAVA_HOME=Path to JDK8 (32-bit) export LD_LIBRARY_PATH=.:/opt/jdk1.8.0_65/jre/lib/i386:/opt/jdk1.8.0_65/jre/lib/i386/client:/opt/jdk1.8.0_65/jre/lib/i386/server:/usr/local/lib ./samp03svr
yum install libXext.i686 yum install libXrender.i686 yum install libXtst.i686
event.registerHandler(PlayerSpawnEvent.class, (e) -> {
[2016-01-04 14:18:48][INFO][out] net.gtaun.shoebill.object.impl.VehicleImpl@74f035[id=379,isStatic=false,modelId=0]
if(newState == PlayerState.DRIVER){ Vehicle vid = player.getVehicle(); System.out.println(vid);
package dev.acesamp; public class Test extends Gamemode { protected static final DialogId dialogSpawn = DialogId.create(); protected void onEnable() throws Throwable { EventManager event = getEventManager(); event.registerHandler(PlayerSpawnEvent.class, (e) -> { System.out.println("Message");//This message appears two times at the same second Callbacks.onPlayerSpawn(e.getPlayer()); }); event.registerHandler(PlayerRequestSpawnEvent.class, (e) -> { Callbacks.onPlayerRequestSpawn(e.getPlayer()); e.disallow(); });} evento.registerHandler(DialogResponseEvent.class, (e) -> { Callbacks.onDialogResponse(e.getDialog(), e.getPlayer(), e.getDialogResponse(), e.getListitem(), e.getInputText()); }); } @Override protected void onDisable() throws Throwable { } }
package dev.acesamp; public class Callbacks extends Test{ public static void onPlayerSpawn(Player player){ } public static void onPlayerRequestSpawn(Player player){ Server.showSpawnMenu(player); } } public static int onDialogResponse(DialogId dialog, Player player, int response, int listitem, String inputtext){ if(dialog == dialogSpawn){ player.spawn(); } } }
package dev.acesamp; public class Server extends Test{ public static void showSpawnMenu(Player player){ dialogSpawn.show(player, DialogStyle.LIST, "Title", "Option1", "Choose", ""); } }
public class Test extends Plugin {
private static Test instance;
public static Test getInstance() {
return instance;
}
@Override
public void onEnable() {
instance = this;
}
}
Test.getInstance().getEventManager().register(...);
MsgboxDialog.create(player, eventManager)
.caption("This is my dialog caption")
.message("Do you like this server?")
.buttonOk("Yes")
.buttonCancel("No")
.onClickOk((dialog) -> {
player.sendMessage("That's nice to hear!");
})
.onClickCancel((dialog) -> {
player.sendMessage("That's a shame :(");
})
.build()
.show();