(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fbr-onemedia.000webhostapp.com%2Fimages%2Fone-media.png%3Fcrc%3D4078626641&hash=63a2fab5e343960bf739e6988c05b554e053d574)
MODIFIED SCRIPT SAMPLE
In order to facilitate and encourage contributions and development of servers written in Java for Vice City Multiplayer, we publish this modification of Newk5's sample Java script. This modification will be updated constantly, bringing new commands and features.
To get started, follow the step-by-step belowInstall Microsoft Visual C++ 2010 Redistributable Packagex64 - https://www.microsoft.com/en-US/Download/confirmation.aspx?id=14632
x86 - https://www.microsoft.com/en-us/download/confirmation.aspx?id=5555
Install Microsoft Visual C++ 2010 SP1 Redistributable Packagex64 - https://www.microsoft.com/en-us/download/confirmation.aspx?id=13523
x86 - https://www.microsoft.com/en-us/download/confirmation.aspx?id=8328
Install Visual C++ Redistributable Packages for Visual Studio 2013https://www.microsoft.com/en-us/download/details.aspx?id=40784
Install Visual C++ Redistributable for Visual Studio 2015https://www.microsoft.com/pt-br/download/details.aspx?id=48145
Java SE Development Kit 8https://www.oracle.com/java/technologies/javase-jdk8-downloads.html
Install Apache NetBeanshttps://netbeans.apache.org/download/index.html
Follow the instructions in vcmp-sample-scripthttps://github.com/onemediainternational/vcmp-sample-script.git
Be aware that the teams and vehicles present in this modification were ported from the Warchief 2.0 script
one media team of game servers
Lauro de Freitas, Bahia, Brasil
2020.1
Usage of .sleep is not recommended as it will hang up the whole server thread for 5 seconds
public void heal(Player player) throws InterruptedException{
TimeUnit.SECONDS.sleep(5);
player.setHealth(100);
}
its better to use proper timer than using .sleep as timer
public void heal(Player player) {
timerRegistry.register(false, 5000, new Runnable() {
@Override
public void run() {
player.setHealth(100);
}
});
}