Skip to content

CustomVehicle v1.1.0

Latest

Choose a tag to compare

@derrick0930 derrick0930 released this 01 Dec 13:11
· 2 commits to main since this release

What's new

  • Custom animations (IFP). A model can now ship its own .ifp file (GTA: San Andreas ANP3 format). The custom animations replace the rider animations of custom motorbikes and are restored to default afterwards.
  • Model folders. Put each model in models/<id>/ with a model.ini, then register them all with one CVS_LoadModels() call.
  • Per-model tuning. model.ini supports headlight, taillight, and wheel and mudguard position offsets.
  • New download overlay. Clients show a dark, rounded in-game download card (Direct3D9 + GDI+) with TYPE, FILE, PROGRESS (0%–100%), speed in KB/s and an overall progress bar. It replaces the old server-side progress dialog.
  • Login gating. The overlay only appears after OnPlayerConnect, not during the SA-MP loading screen. Your login or account system can wait for OnPlayerCVSDownloadFinish(playerid).
  • Faster returning players. The client verifies its cache through .meta files, so players who already have every model skip the download screen and go straight to login.
  • Custom Models panel (F3). Handled directly by vehskin.asi, no Pawn code needed. It lists every registered model with its ID, file name, base ID, size and READY/MISSING status. While open you get a free cursor, mouse wheel or Up/Down scrolling, and a close button (X or F3 again).
  • New Pawn helpers in cvs.inc: CVS_StartPlayerDownload, CVS_ClearPlayerDownload, CVS_ShowModelsPanel.
  • New natives: CVS_SetModelAnim, CVS_LoadModels, plus low-level natives used by cvs.inc: CVS_BeginDownload, CVS_EndDownload, CVS_ToggleModelsPanel.
  • Server HTTP fixes. New /connect endpoint, per-player /vehicles, and the request parser now handles Content-Length and the phase parameter.
  • The client now caches and re-downloads .ifp files together with .dff and .txd.
  • Separate build scripts. build.sh is replaced by build-windows.sh (clang, builds cvs.dll and vehskin.asi) and build-linux.sh (Zig, builds cvs.so).
  • README updated, with a new preview screenshot and separate Windows and Linux build instructions.

Downloads

File Goes to
cvs.dll plugins/ folder of the SA-MP server (Windows)
cvs.so plugins/ folder of the SA-MP server (Linux, beta)
vehskin.asi GTA: San Andreas folder of each player (next to gta_sa.exe)
cvs.inc pawno/include/

On a Linux server, use cvs.so instead of cvs.dll and add plugins cvs.so to server.cfg. Players still use vehskin.asi on Windows.

Upgrade notes

  • Update both the server plugin (cvs.dll or cvs.so) and vehskin.asi, and copy the new cvs.inc. The manifest format and connection flow changed, so a new server with an old client (or the other way around) is not supported.

  • Gamemode change required. CVS_AddModel is unchanged, but without these calls the client never starts downloading:

    public OnPlayerConnect(playerid)
    {
        if (IsPlayerNPC(playerid)) return 1;
        CVS_StartPlayerDownload(playerid);   // at the very top, before login
        return 1;
    }
    
    public OnPlayerDisconnect(playerid, reason)
    {
        CVS_ClearPlayerDownload(playerid);
        return 1;
    }
    
    forward OnPlayerCVSDownloadFinish(playerid);
    public OnPlayerCVSDownloadFinish(playerid)
    {
        // start your account check / login dialog here
        return 1;
    }
  • The server-side progress dialog is gone. cvs.inc no longer calls CVS_GetDownloadDialog, because the overlay replaces it.

  • File names (.dff, .txd, .ifp) must be unique across all models.

  • If you build from source, build.sh no longer exists. Use ./build-windows.sh on Windows or ./build-linux.sh on Linux (needs Zig). The client