Menu

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.

Show posts Menu

Messages - hotdogcat

#76
General Discussion / wiki spambots
Oct 30, 2014, 12:42 PM
Any developer or betatester can clear the wiki from spambots? they edited the main page

http://wiki.vc-mp.org/index.php?title=Main_Page
#77
General Discussion / Re: VCMP 0.3Z server
Oct 17, 2014, 07:37 PM
vcmp 0.3 isn't anymore supported, just convert your script to 0.4, isn't hard if you have any problem during the convertion just ask to us :)
#78
Note: i just imported this documentation from old forum, so credits goes to stormeus


One of the major new features available in the 0.4 server is the plugin SDK. Any user can now use an official SDK header to create plugins that can be used to interact with the server, clients, game world and other plugins.

The current plugin SDK can be found here:
https://bitbucket.org/stormeus/0.4-squirrel/src/3a1c0e0bf0ed6760455c14ccf684e38346443cd1/VCMP.h?at=master



Creating a Loadable Plugin
The VC:MP server expects the existence of a special exported function, VcmpPluginInit, to exist in a plugin in order to be able to load one. As part of this function, the server will pass a set of callable functions, a structure for the plugin to set the callbacks it accepts, and a structure for the plugin to set information about itself.

The structure of VcmpPluginInit is as follows:
#ifdef WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif

extern "C" EXPORT unsigned int VcmpPluginInit( PluginFuncs* pluginFuncs, PluginCallbacks* pluginCalls, PluginInfo* pluginInfo )
{
    return 1;
}

  • pluginFuncs is the PluginFuncs struct from the server header, which can be used to call any function available through the plugin SDK.
  • pluginCalls is a struct of PluginCallbacks. pluginCalls essentially starts off empty; your plugin must provide its own callbacks and set them in the struct in order for them to be called, and you must use the same pointer to the struct provided.
  • pluginInfo is a struct of PluginInfo (from the SDK) that, again, is empty at first. You can set your plugin's version and name (max 32 characters) through it, but you must use the same pointer to the struct.



Setting a Callback
To receive callbacks from the server, you need to create a function in the same format as the defined type of the callback:

typedef int (*SDK_OnInitServer) (void);
typedef void (*SDK_OnShutdownServer) (void);
typedef void (*SDK_OnFrame) (float fElapsedTime);
typedef void (*SDK_OnPlayerConnect) (int nPlayerId);
typedef void (*SDK_OnPlayerDisconnect) (int nPlayerId, int nReason);
typedef void (*SDK_OnPlayerBeginTyping) (int nPlayerId);
typedef void (*SDK_OnPlayerEndTyping) (int nPlayerId);
typedef int (*SDK_OnPlayerRequestClass) (int nPlayerId, int nOffset);
typedef int (*SDK_OnPlayerRequestSpawn) (int nPlayerId);
typedef void (*SDK_OnPlayerSpawn) (int nPlayerId);
typedef void (*SDK_OnPlayerDeath) (int nPlayerId, int nKillerId, int nReason, int nBodyPart);
typedef void (*SDK_OnPlayerUpdate) (int nPlayerId, int nUpdateType);
typedef int (*SDK_OnPlayerRequestEnter) (int nPlayerId, int nVehicleId, int nSlotId);
typedef void (*SDK_OnPlayerEnterVehicle) (int nPlayerId, int nVehicleId, int nSlotId);
typedef void (*SDK_OnPlayerExitVehicle) (int nPlayerId, int nVehicleId);
typedef int (*SDK_OnPickupClaimPicked) (int nPickupId, int nPlayerId);
typedef void (*SDK_OnPickupPickedUp) (int nPickupId, int nPlayerId);
typedef void (*SDK_OnPickupRespawn) (int nPickupId);
typedef void (*SDK_OnVehicleUpdate) (int nVehicleId, int nUpdateType);
typedef void (*SDK_OnVehicleExplode) (int nVehicleId);
typedef void (*SDK_OnVehicleRespawn) (int nVehicleId);
typedef void (*SDK_OnObjectShot) (int nObjectId, int nPlayerId, int nWeapon);
typedef void (*SDK_OnObjectBump) (int nObjectId, int nPlayerId);
typedef int (*SDK_OnPublicMessage) (int nPlayerId, const char* pszText);
typedef int (*SDK_OnCommandMessage) (int nPlayerId, const char* pszText);
typedef int (*SDK_OnPrivateMessage) (int nPlayerId, int nTargetId, const char* pszText);
typedef int (*SDK_OnInternalCommand) (unsigned int uCmdType, const char* pszText);
typedef int (*SDK_OnLoginAttempt) (char* pszPlayerName, const char* pszUserPassword, const char* pszIpAddress);
typedef void (*SDK_OnEntityPoolChange) (int nEntityType, int nEntityId, unsigned int bDeleted);
typedef void (*SDK_OnKeyBindDown) (int nPlayerId, int nBindId);
typedef void (*SDK_OnKeyBindUp) (int nPlayerId, int nBindId);
typedef void (*SDK_OnPlayerAwayChange) (int nPlayerId, unsigned int bNewStatus);
typedef void (*SDK_OnPlayerSpectate) (int nPlayerId, int nTargetId);
typedef void (*SDK_OnPlayerCrashReport) (int nPlayerId, const char* pszReport);
typedef void (*SDK_OnServerPerformanceReport) (int nNumStats, const char** ppszDescription, unsigned long long* pnMillisecsSpent);

For example, to create a callback for OnPublicMessage:
typedef int (*SDK_OnPublicMessage) (int nPlayerId, const char* pszText);

You would need to create a function like so:
int MyOnPublicMessage (int nPlayerId, const char* pszText)
{
    return 1;
}

void functions need not return anything (and should not), whereas callbacks with a return type expect a value to be returned, and will react differently according to their return values. For example, returning 0 in OnPublicMessage will reject a given chat message and essentially mute it. Returning 1 will send it to other players if no other plugins suppress it.

To have the server recognize the callback and make use of it, set it in VcmpPluginInit:
extern "C" EXPORT unsigned int VcmpPluginInit( PluginFuncs* pluginFuncs, PluginCallbacks* pluginCalls, PluginInfo* pluginInfo )
{
    pluginCalls->OnPublicMessage = MyOnPublicMessage;
    return 1;
}



Using Plugin Functions
Using plugin functions is easier still than dealing with callbacks. To use a function, you can simply make a direct call to a function in the pluginFuncs struct:

extern "C" EXPORT unsigned int VcmpPluginInit( PluginFuncs* pluginFuncs, PluginCallbacks* pluginCalls, PluginInfo* pluginInfo )
{
    pluginFuncs->SetServerName("My VC:MP Server");
    return 1;
}
#79
Support / List of values for vcmp_config.txt
Oct 16, 2014, 11:21 PM
Note: i just imported this documentation from old forum, so credits goes to stormeus

Documentation may be incorrect. Please modify as needed.



VC:MP 0.4 Documentation
Values for vcmp_config.txt

Note
This file can be found in the folder you installed VC:MP to (C:\Program Files\Vice City Multiplayer\04beta_b1t1 by default)



game_antialias

Description
Defines the behavior that VC:MP uses to antialias the game.

Allowed Values
0: Disables antialiasing
1: Enables antialiasing

Note
Antialiasing uses a significant amount of processing power, but makes the game look smoother. The VC:MP team only recommends enabling antialiasing if you can already run the game at 25fps on average, at minimum.



game_allowedmods

Description
A list of mods (ASI files) allowed to be used.

Allowed Values
Text, with each mod separated by one space, like so:
game_allowedmods mymod1.asi mymod2.asi mymod.flt



game_framereserve

Description
Decreases the amount of time the game waits before serving the next frame. If your framerate is lower than it should be, increasing the value of this decreases the amount of time waited by the number of milliseconds specified.

Allowed Values
Any integer (whole number) that is at least zero.



game_windowed

Description
Determines whether or not to run in windowed or fullscreen mode.

Allowed Values
0: Game will launch in fullscreen mode
1: Game will launch in windowed mode



game_menuonrestore

Description
Determines whether to return to the menu after returning from being Alt+Tabbed.

Allowed Values
0: Does not return to menu.
1: Returns to menu.



splash_loadbarbgcol

Description
Sets the background color of the loading bar on the splash screen.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



splash_loadbarfgcol

Description
Sets the foreground color of the loading bar on the splash screen.

]Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



con_fontname

Description
The name of the font used in the chat console.

Allowed Values
Text: the name of any font installed on your Windows machine.



con_typeloc

Description
Determines the location of the typing area in the console.

Allowed Values
0: Places the typing area on the bottom of the console, the style used in 0.3z R2 and earlier.
1: Places the typing area on top of the screen, the style used in the first public beta.



con_fontgap

Description
Alters the size of the gap between letters in the chat console. Larger values increase the size of the font gap. Setting this to zero uses normal font gap size.

Allowed Values
Any number that is at least 0.



con_fontscale

Description
The relative size of the font as a multiplier. Larger values increase the size of the font. Setting this value to 1 uses the normal font size.

Allowed Values
Decimal values that are at least 0:

Acceptable: 0.005
Acceptable: 1.500
Not Acceptable: -5.000
Not Acceptable: 12pt



con_numoflines

Description
The maximum number of lines that appear when the console is expanded. The larger this value is, the more space the console takes up when expanded.

Allowed Values
Any whole number (at least 0)

Note
Setting this value to 0 hides the console entirely.



con_disappear

Description
The amount of time, in seconds, it takes for each message in the console to disappear.

Allowed Values
Any whole number (at least 0)

Note
Hidden messages can be seen by expanding the console (see: con_openkey). Setting this to 0 disables disappearing messages.



con_logging

Description
Determines what method VC:MP uses to log console messages.

Allowed Values
0 - No logging
1 - Plaintext logging
2 - HTML logging



con_fillcolour

Description
The background color of the console when it is expanded, expressed as an ARGB hexadecimal.

Allowed Values
ARGB hex colors (AARRGGB format)

Example
con_fillcolour FFFF00BB

FF: Alpha hex value (opacity)
FF: Red hex value
00: Green hex value
BB: Blue hex value



con_openkey

Description
The keycode of the key that expands the console.

Allowed Values
Integers (whole numbers) -- see this list:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

And convert to decimal here:
http://easycalculation.com/hex-converter.php



scb_scale

Description
The relative size of the scoreboard, as a multiplier.

Allowed Values
Decimal values that are at least 0 (see: con_fontscale)



scb_edgescale

Description
The size of the edges (border) of the scoreboard, as a multiplier.

Allowed Values
Decimal values that are at least 0 (see: scb_edgescale)



scb_edgecolour

Description
The color of the edges (border) of the scoreboarrd.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_fillcolour

Description
The color of the background of the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_captioncolour

Description
The color of the column titles ("Name," "Ping," etc.) of the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_scorepingidcol

Description
The color of the values of names, pings, and scores in the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_underlinecolour

Description
The color of the line underneath the column titles in the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_highlightcolour

Description
The color of the highlight box behind your name, score, etc. in the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_serverinfocolour

Description
The color of the server name in the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_countcolour

Description
The color of the number of players on the server, which appears in the top right corner of the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_versioncolour

Description
The color of the VC:MP version, which appears in the bottom right corner of the scoreboard.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour



scb_openkey

Description
The keycode of the key that, when held down, displays the scoreboard.

Allowed Values
Integers (whole numbers) -- see this list:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

And convert to decimal here:
http://easycalculation.com/hex-converter.php



tag_scale

Description
The relative size of nametags of players. Larger values increase the size of the font.

Allowed Values
Decimal values that are at least 0 (see: con_fontscale)



tag_quality

Description
Determines how well to render nametags of players. A lower value will make nametags more jagged and aliased, but may also increase game performance.

Allowed Values
Decimal values that are at least 0.

Note
The following is an example of tag quality, left being the lowest value:
http://i.imgur.com/5IK95EY.jpg



tag_maxdist

Description
The maximum distance, in world units, away from a player at which their nametags will appear.

Allowed Values
Decimal values that are at least 0.



tag_zoffset

Description
How far above a player's head their nametags are drawn, in world units

Allowed Values
Any decimal value



bar_bgenabled

Description
Determines whether or not to draw the white, rounded background of the health and armour bars.

Allowed Values
0 to hide, 1 to show



bar_bgcolour

Description
The color of the background of health and armor bars.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour

Note
Alpha (AA) has no effect; bars are always 100% opaque.



bar_armourcol

Description
The color used to represent armor in the armor bar above the name tag.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour

Note
Alpha (AA) has no effect; bars are always 100% opaque.



bar_armourxcol

Description
The color used to represent overhealed armor (>100 armor) in the armor bar that appears above players' heads.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour

Note
Alpha (AA) has no effect; bars are always 100% opaque.



bar_healthcolmin

Description
The color that represents 0 health for nametag health bars, which is blended between bar_healthcolmin and bar_healthcolmax.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour

Note
Alpha (AA) has no effect; bars are always 100% opaque.



bar_healthcolmax

Description
The color that represents 100 health for nametag health bars, which is blended between bar_healthcolmin and bar_healthcolmax.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour

Note
Alpha (AA) has no effect; bars are always 100% opaque.



bar_healthxcol

Description
The color used to represent overhealed health (>100) in the health bar above name tags.

Allowed Values
ARGB hex colors (AARRGGBB format)

See: con_fillcolour

Note
Alpha (AA) has no effect; bars are always 100% opaque.



scr_capturekey

Description
The key used to capture screenshots.

Allowed Values
Integers (whole numbers) -- see this list:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

And convert to decimal here:
http://easycalculation.com/hex-converter.php



scr_directory

Description
The path to the place where all screenshots are saved.

Allowed Values
Path to a directory you want VC:MP to save your screenshots.

Note
Length of path can go up to 63 characters only.
Funny enough, as the default one can go longer than that; once you change it, you can never set it back from in-game.
Still, can be fixed outside of the game, by editing the path in vcmp_config.txt



scr_shortmsg

Description
Changes the message received when taking screenshots.

Allowed Values
0 / 1 for Long MSG / Short MSG



scr_compression

Description
Sets the compression level of the screenshot file.
With allowed values from 0-9, the screenshot processing time goes from fast to slow

Allowed Values
integer from 0 to 9 (where 0 represents the lowest compression level?)