Recent Posts
1
Off-Topic General / The programming loop and brain
« Today at 09:46 AM by habi »
Step 1: I run cmake --build. --config Release

Step 2: I go to Release folder and double click my program

Step 3: I inspect my program. Go to notepad++ make some changes and save. Then i go to Step 1 again.

Guys, i was repeating this for 6 hours last yesterday. And when i went outside into the streets, i realised how mechanical my mind has become.

Our brains are caught in this. Seeing a desire ( Aah how nice will my program become if I add this. Add that too. then that thing and then.. Is it better if... )

I wish i could throw this computer into some big garbage.

Did you guys ever feel like this?
2
Quote from habi Yesterday at 06:42 PM
I hope this will be useful to someone who needs to know.

sad that the official wiki is down.
With some luck, it will be back soon!
3
I hope this will be useful to someone who needs to know.

sad that the official wiki is down.
4
General Discussion / Re: vcmp client
« Yesterday at 05:39 PM by EazyVU »
does someone know how to open those files on my win10 and if someone can share original nonmoded cheetah and stinger cars
5
If you have never put hands or worked with client-side code, then try to read this, it will help a bit.
Original discord conversation:
Link here



For using client-side, you need a main.nut no matter what, inside store/script/...here
(you can also load compiled .nut files (aka .cnut), but that's another story)
((also, if you need a main.nut doesn't mean you must stick to one file only; you can include( "otherfile.nut" ) / dofile( "otherfile.nut" ) ))

So, inside that main.nut, you have a list of events/functions that you can use here:
http://wiki.thijn.ovh/index.php?title=Client-side_Scripting_Resources

In order to send data from SERVER to CLIENT, OR VICEVERSA, you must write/call Streams
Those streams will be received in
Code: [Select]
function Server::ServerData( stream )
if it's sent by server, and

and
Code: [Select]
function onClientScriptData( player )
if sent by client



Here is a stream example, from server to client:
Code: [Select]
Stream.StartWrite();
Stream.WriteInt(0); // key / id
Stream.WriteInt(51); // needed value
Stream.SendStream(player);
and here is a stream e.g. from CLIENT -> SERVER
Code: [Select]
local Data = Stream();
Data.WriteInt(0); // key / id
Data.WriteString("Explosion"); // needed value
Server.SendData(Data);
those keys I've been put into examples must be considered as cases

Sometimes, you send a stream because you want some data related death messages, but sometimes you send a stream because you want position
well, these 2 cases should have an id like. Why ID ? because they are not so heavy
so, when you send data client->server, in function onClientScriptData( player ) you will be able to do something like this:
Code: [Select]
function onClientScriptData( player )
{
    local id = Stream.ReadInt();
    switch( id ) {
        case 0: {
            // death message related
            local msg = Stream.ReadString();
            MessagePlayer( "Client data received - death message: " + msg, player );
        } break;

        case 1: {
            // position related
        } break;

        default: {
            // even was called, but with an ID not existing in this switch
        } break;
    }
}

Same goes for client-side, when receives data from server:
Code: [Select]
function Server::ServerData( stream )
{
    local id = stream.ReadInt();
    switch( id ) {
        case 0: {
            // death message related
            local reasonID = stream.ReadInt();
            Console.Print( "Death Reason ID received from Server: " + reasonID );
        } break;

        case 1: {
            // position related
        } break;

        default: {
            // even was called, but with an ID not existing in this switch
        } break;
    }
}

(click to show/hide)
be sure you don't get confused when using stream with big S or small s

if server-side, you need to use Stream with big S.
if client-side, you initiate a custom named/created variable with that
Code: [Select]
Stream()
function, like you have seen in the examples above

but if in client-side, using the event
Code: [Select]
Server::ServerData( stream )
, then you can see that the parameter is named stream with small s.

Anyway, the main idea when sending streams is to go as fast as posible
if you gonna use a string as a key, like you did, then tons of data will be used everytime you send that string key
while you could identify the cases by Integers, or even better: Bytes (as there is also Stream().WriteByte)
and that ^ uses a lot less data, and that's for identification only
6
General Discussion / Re: VC-MP Store Downloader
« on May 23rd, 10:24 AM by habi »
Completed and first post updated for download links.

Last two days, i was trying to create a "Check for updates" for the app itself, so that app.exe need not be downloaded again and again.

And two more servers added.
7
Tutorials / [Tutorial] Building a program from CMakelists.txt
« on May 22nd, 05:41 AM by habi »
I am creating this tutorial for those who are stuck at wondering what is this "CMake stuff" is.

You might have seen "CMakeLists.txt" and other lot of files ("build", "out", "ALL_BUILD", "ZERO_CHECK", "Release", "CMakeCache" )

Actually, all these files are automatically creating by running "cmake" from command line

I will show you how.


https://youtu.be/RhgMQ39KWaA

However there are two problems
1. You need to download and install cmake(here Under Binary Distribution )
2. You need to install Visual Studio( It is called "Visual Studio Community". here )

I had installed the second thing more than 2 years ago. But now i code in notepad++ and for compiling cmake uses visual studio compiler which comes with "Visual Studio Community"
8
General Discussion / Re: VC-MP Store Downloader
« on May 22nd, 01:17 AM by habi »
Yes.  I have been uploading the stores of the server myself.  Visiting servers and zipping the contents of 'server store' folder.
9
General Discussion / Re: VC-MP Store Downloader
« on May 21st, 08:32 PM by Sebastian »
Looks helpful indeed, especially for when servers have high ping (slow downloading speed).
Are you uploading the `store` directories yourself for the example you just posted (latest post), or it's some trick done so you download the files like you were in server
10
General Discussion / Re: VC-MP Store Downloader
« on May 21st, 05:34 PM by habi »
Look what i am making.



If it is going well, then you just have to double click server and the store of the server will be installed.

Signed up in bitly.com which shortens some of my urls.

Now, some finishing touches remaining.