Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Xmair
1
Immunity

Description
A player with immunity 1 can be killed with Helicannon.

Reproducible
Always

What you were doing when the bug happened
-

What you think caused the bug
-

PS: It would be awesome if we can get an immunity flag to prevent heliblade damage per-player. It's already the case for global and team based players.

CanAttack

Description
You can use the Helicannon even if your CanAttack/Controllable property is set to false. Stormeus fixed this in 0.4.7, the fix wasn't ported.

Reproducible
Always

What you were doing when the bug happened
-

What you think caused the bug
-

Tanks

Description
Tank's projectiles are not synced.

Reproducible
Always

What you were doing when the bug happened
-

What you think caused the bug
-
2
General Discussion / Xmair's VCMP Launcher
« on March 19th, 01:48 PM »
Xmair's VCMP Launcher

Over the course of a past few months, I had been trying to dive into the C# world. Therefore, I started developing a VCMP Launcher for practice purposes.



Screenshots










Features

Below is a list of features that distinguish it from other VCMP browsers:
  • Discord Rich Presence
  • VCMP Config Editor
  • Random Nicks



Download

Click here to download the browser. Beware that you need .NET Framework 4.5 in order to run this browser, which means Windows XP is not supported.

You may get prompted by your anti virus to remove this program as it contains a virus. Frankly speaking, I have no idea why this launcher is being tagged as a virus. I am willing to send a beta tester/developer the source code if needed.



Discord

All the bug reports and feedbacks are to be handled at the Discord server. Click here to join.
3
Bugs and Crashes / [Bug] Animation bug related to fall damage immunity
« on December 28th, 2020, 12:52 PM »
Description
Whenever you set your immunity to 32 and fall off a bike, your animation doesn't reset

Reproducible
Always, when your immunity is set to 32

What you were doing when the bug happened
Playing VCCNR

What you think caused the bug
No idea

Video
Without immunity 32:

https://youtu.be/YKl8o5l_6As

With immunity 32:

https://youtu.be/wo6mq3RRYTA
4
Bugs and Crashes / [Bugs] Multiple bugs
« on December 26th, 2020, 08:46 AM »
Description
Whenever you set the double of an ammo of a weapon you have, you get kicked.

Reproducible
Hard to reproduce, happens randomly

What you were doing when the bug happened
--

What you think caused the bug
No idea

Video

https://www.youtube.com/watch?v=62m5isa8j1c





Description
Whenever you set your ammo to 0, or use .RemoveWeapon, .GetWeaponAtSlot and .GetAmmoAtSlot return the same old values

Reproducible
Random, but happens a lot

What you were doing when the bug happened
--

What you think caused the bug
No idea

Video

https://www.youtube.com/watch?v=1q6dwf7ri_I

Note: These videos took 1-2 tries to reproduce the bugs



Description
In buildmode, calling RayTrace.Entity crashes the client.

Reproducible
Always

What you were doing when the bug happened
Working on a library

What you think caused the bug
No idea




Description
Upon disconnecting, the custom generic.txd doesn't unload, causing a weird behavior upon reconnecting to the same server with a different generic.txd

Reproducible
Always

What you were doing when the bug happened
Testing

What you think caused the bug
No idea




Description
Equipping Brass Knuckles kicks you

Reproducible
Always

What you were doing when the bug happened
Testing

What you think caused the bug
No idea
5
General Discussion / [Suggestion] "Unsafe" option
« on November 20th, 2020, 10:31 AM »
I was recently discussing this idea with sseebbyy and he suggested me to post it here.

What is it?
A toggleable option in the server.cfg file which when enabled, overrides the max vehicles, objects, pickups and checkpoints limit.

Why?
Yes, a normal server would almost never exceed the current default limits but as soon as you start adding huge maps, you start to exceed some of the limits. An example could be a map editor server when you have to work on a huge city, or on a huge map. Now I know that the current limits are set for a specific reason and the server's sync might start to break apart if the limits are exceeded, which is exactly why I call this the unsafe option.

Regarding the streamer workaround (deleting objects which are not in use and then recreating them when a player is near), this option is not efficient all the time. Especially when you have 10+ players moving in your server at a time, it's quite heavy.
6
Client Scripting / [Release] XAnimations - A basic approach with animations
« on June 12th, 2020, 04:58 PM »
XAnimations



I have been working with client side a lot lately and had some spare time so I decided to make a basic library for animations. This library serves more as a template to create your own animations than as an actual library due to it being really compact.


Code and Examples


All the examples as well as the code is available at the GitHub repository (note that GitHub messed up the indentation a bit, it should look fine after downloading/cloning it).


Credits


7
Tutorials / [Windows] Writing a C++ plugin
« on December 26th, 2019, 03:17 PM »
No this isn't the best guide you can get. I wrote this tutorial reaaaaaaaallllllllly long ago for someone in Discord.

Firstly, you need to choose a good IDE for writing C++, what I personally use is Visual Studio.
So here the second step becomes loading up and creating a project in Visual Studio

Click the Create a new project button to start
Then you choose Dynamic-Link Library as that's what we're gonna be needing

Next you'd want to select a name for your project, choose whatever name you want and name the solution to your desire aswell

Click on Create, this may take some time

We won't be needing dllmain.cpp and framework.h so you can delete them
Now firstly we need to include the VCMP header file, you can find the updated one here:
https://bitbucket.org/stormeus/0.4-squirrel/src/
Search for the VCMP.h file and click on it

Now copy all the file and come back to your Visual Studio project
Right click on Header Files
Go to Add -> New Item or simply press CTRL + SHIFT + A
Set the file type to Header File (.h)
Set the name to VCMP.h

Click on Add
Paste your clipboard (VCMP.h copied from BitBucket) into the new opened file
Now your file should look like this

Create a new file in the Source Files folder named Main.cpp
Now before we move on to code, we need to select the compiling platform
In my case I needed x64 builds as Release and not Debug (it doesn't really matter at this point but anyway) so I changed my configuration to Release x64

Now we create another file in Header Files named Main.h which will serve as a header file for our main file
In the Main.h file, we do:
Code: [Select]
#pragma once // Only load this file once (#include)
#ifndef __MAIN_H // Include guard; makes sure that this file is only included once and subsequent #includes are ignored
#define __MAIN_H // Include guard

#include "VCMP.h"
#include <cstdio>

#ifdef _WIN32 // If we're on windows
#include "Windows.h"

#define DLL_EXPORT __declspec( dllexport ) // This is required in windows so that other programs can access the function
#else // We're not on windows
#define DLL_EXPORT // Nothing like that is required in linux so we leave it blank
#define MAX_PATH 250
#endif

#ifdef __cplusplus // We don't need to (and can not) extern "C" if we're already in C. so we make sure that we are in C++
extern "C" { // We need to extern "C" the function because windows expects a C-style function
#endif
    DLL_EXPORT    unsigned int            VcmpPluginInit(PluginFuncs* pluginFuncs, PluginCallbacks* pluginCalls, PluginInfo* pluginInfo); // This is a blank function and it's exported (check the #define tags above). VCMP requires it
#ifdef __cplusplus // We opened a brace in C++, so we need to close it in C++ only as well
}
#endif

#endif // Include guard
Now we come back to the Main.cpp file and,
Code: [Select]
#include "pch.h" // Pre-compiled header
#include "VCMP.h" // We need to include the VCMP header file first so we can access it's functons
#include "Main.h" // Including the main header file we created

uint8_t serverInitialise() {
    printf("Plugin initialised.\n"); // Sending a message to make sure our plugin has loaded
    return 1;
}

// This event is called when the plugin is loaded
// We can also make a global variable to store the plugin functions, callbacks and info
unsigned int VcmpPluginInit(PluginFuncs* pluginFuncs, PluginCallbacks* pluginCalls, PluginInfo* pluginInfo)
{
    pluginInfo -> apiMinorVersion = PLUGIN_API_MINOR; // This step is very important, in this step
    pluginInfo -> apiMajorVersion = PLUGIN_API_MAJOR; // we set the version of the API, if you skip this step, your server will not load this plugin

    pluginCalls -> OnServerInitialise = serverInitialise; // uint8_t(*OnServerInitialise) (void) - Line 915 @ VCMP.h
    return 1;
}

Now right click on your project name, in my case, VCMP
Click on Build

Your output should show something similar to this

Now go to the compiled directory, in my case, C:\Users\Xmair\source\repos\VCMP\x64\Release

Copy the VCMP.dll to a VC:MP server
Paste it in the plugins folder

Now edit your server.cfg file to include your plugin

Now load up your server.

Credits: Xmair & Fleka (for the comments in VCMP.h file)
8
Skin Showroom / Adolf Hitler
« on November 20th, 2019, 10:47 AM »
Content Type: Skin
Original Author: Click.
Source Link: Click.
Modifications:: Converted to VC and created XML file.
Modified By: Xmair.
Authorized By Original Author?: No.
Screenshot: Click.
Download Link: Click.
Faults: It has a minor bug with the sleeves, not really a big issue. But yeah it is expected since this is my first conversion.
9
Bugs and Crashes / [Bug] Immunity flags sometimes do not work
« on August 12th, 2019, 02:13 PM »
I am not sure if this was reported earlier or not.

Description
The bullet_proof immunity flag (1) will stop working if you knock down a player and use a SMG/Pistol.

Reproducible
Always

What you were doing when the bug happened
Nothing.

What you think caused the bug
No idea.

Steps to reproduce
1. Set a player's to immunity to 1.
2. Get yourself a MP5.
3. Shoot the player. (No health decreases)
4. Knock the player down.
5. Shoot the player while they are knocked down. (Health decreases)
6. The health will stop decreasing once the player gets up.
10
Support / [Suggestion] Ability to increase server boundaries
« on August 12th, 2019, 02:11 PM »
Currently we can only set the world boundaries to a specific limit, can we somehow patch this limit so we can possibly add the SA map or possibly more maps that require the boundary limit to be touched and exceeded.
11
Bugs and Crashes / [Bug] Spectating breaks when you are drunk
« on July 26th, 2019, 12:00 PM »
Description
Spectating breaks when you are drunk.

Reproducible
Always

What you were doing when the bug happened
Playing VCCNR.

What you think caused the bug
Camera movement?

Steps to reproduce
1. Set your player to have drunk effects.
2. Spectate someone.
12
Bugs and Crashes / [Bug] XML cannot load some objects
« on July 25th, 2019, 06:38 PM »
Description
XML cannot create some specific objects, for example: weapons
This does work on CreateObject.

Reproducible
Always

What you were doing when the bug happened
Adding a map to my server's store folder.

What you think caused the bug
No idea.

Steps to reproduce
1. Create an XML file with this data:
Code: [Select]
<?xml version="1.0" encoding="ASCII" ?>
<itemlist>
<item model="269" name="chainsaw">
<position x="0" y="0" z="2" />
<rotation format="axisangle" x="0" y="0" z="0" angle="1" />
</item>
</itemlist>
2. Join the game.
3. You now have yourself a "[MAPS] Model index 269 is invalid." error.
13
Bugs and Crashes / [Bug] Can enter a vehicle as passenger while frozen
« on July 24th, 2019, 11:22 AM »
Description
You can enter in a vehicle as passenger while you're frozen.

Reproducible
Always

What you were doing when the bug happened
Eating M&M'S.

What you think caused the bug
Missed a check while coding?

Steps to reproduce
1. Go near a vehicle.
2. Freeze yourself.
3. Press V to enter the vehicle as a passenger.
14
Tutorials / [Linux-Ubuntu] Setting up a radio stream
« on June 27th, 2019, 09:17 AM »
I was asked by someone on how to set up a radio stream and instead of telling them, I figured I should make a guide so everyone can know how to do so. Please note that this guide is for Linux so please do not ask basic Linux questions here. This guide was tested on Ubuntu 18.10 (GNU/Linux 4.18.0-24-generic x86_64) (Ubuntu 18.10 x64) and works perfectly.

We will be needing 2 packages, icecast2 and ezstream.
So firstly start off by installing icecast2:
Code: [Select]
sudo apt-get install icecast2
Note: sudo isn't needed if you're on root.
You'll be prompted for configuring icecast2, choose yes and choose passwords which suit you well and write them down somewhere to remember them as they'll be used later.
After installing the icecast server, it should start itself (which it did for me). However if it does not, use the following command:
Code: [Select]
sudo /etc/init.d/icecast2 start
Note: sudo isn't needed if you're on root.
You should now be able to access the icecast2 server's administration page by opening your browser and visiting your domain with 8000 port, or your IP with the 8000 port. The 8000 port is currently the default one and it can be changed by opening and editing the config. [1]
Now to install ezstream:


Code: [Select]
sudo apt-get update
sudo apt-get install ezstream
Note: sudo isn't needed if you're on root.


Now I would suggest creating a different user for this, so:


Code: [Select]
sudo adduser radiostream
Note: sudo isn't needed if you're on root.


Now log into your newly created user either in a new session or by using the su command.
Make a directory named music, in this directory you'll be adding all your music files.
Make another directory named .ezstream, this is where we will keep the ezstream's configuration file(s). [2]


Code: [Select]
mkdir music
mkdir .ezstream


Now copy a template of ezstream's configuration file.


Code: [Select]
cp /usr/share/doc/ezstream/examples/ezstream_mp3.xml .ezstream
Note: You can take a look at /usr/share/doc/ezstream/examples/ for more of the examples.


This step is not mandatory, but this is for our own ease and should be done if you're going to host multiple streams.
In this step we change the name of the copied file:


Code: [Select]
cd .ezstream
mv ezstream_mp3.xml hollywood.xml
Note: This guide now assumes that you've changed the name to hollywood.xml and all the steps will now treat the file name as such.


Now edit the configuration file:


Code: [Select]
nano hollywood.xml


Change the <sourcepassword></sourcepassword> from hackme to whatever password you set before and the <filename></filename> to hollywood.txt. You can change other configurations as per required such as the <url></url> if you're going to host multiple streams. If you want your radio stream to be looped forever and not end once it has played all the songs in the playlist, set <stream_once></stream_once> to 0.
Press CTRL+X, press y and then press enter/return to save the file.

Now come back to the user directory:


Code: [Select]
cd -


We're now going to make a file that automatically puts all the mp3 files present in the music directory into the hollywood.txt file. [3]


Code: [Select]
nano hollywood.sh


Copy paste this into hollywood.sh:


Code: [Select]
#!/bin/bash
find music -name *mp3 -type f > .hollywood.txt
echo "Created the hollywood.txt playlist. Now starting the stream."
ezstream -c .ezstream/hollywood.xml


Press CTRL+X, press y and then press enter/return to save the file.
Now make the file executable:


Code: [Select]
chmod +0700 hollywood.sh


This is where you upload your music to the music folder. Please note that the format should be MP3.
After you're done uploading, create either a tmux session or use the screen command and execute the hollywood.sh file. However, tmux is recommended.


Code: [Select]
tmux
./hollywood.sh


OR


Code: [Select]
screen ./hollywood.sh


You're now basically done. Now head over to your icecast2 server's administration page. It should be yourdomain.com:8000 or yo.ur.i.p:8000 or localhost:8000 if you're browsing from the OS itself. Go to Administration > Mountpoint List and copy the link address of the M3U your stream. It should be something like ip:8000/stream.m3u or domain:8000/stream.m3u.





Now finally you can head over to your script and add this line:


Code: [Select]
CreateRadioStream( "Hollywood Songs Stream", "[paste copied url here]", true );


Adios y buena suerte!
 1. You can access the config file at /etc/icecast2/icecast.xml, in here you can change your passwords or the port and other configs.
 2. You can add more radio streams by repeating the same method.
 3. Source: https://www.maketecheasier.com/run-a-diy-internet-radio-station-with-icecast-linux/
15
I've noticed a lot of people using the standard flip command which always changes the vehicle's direction to North. I was playing with rotations today and was able to make a somewhat better command that actually flips your vehicle in the direction it was, without changing it's direction to North all the time.

The code has been moved to pastebin for indentation's sake.
Code: [Select]
https://pastebin.com/dKgSfEiC