Recent posts

#1
Servers / Re: Welcome To Vice City
Last post by NASCAR 2025 - Feb 05, 2026, 03:13 PM
this weeks update  :-*
#2
Servers / Re: Welcome To Vice City
Last post by NASCAR 2025 - Feb 03, 2026, 07:34 PM



right next to spawn, many tweaks, taxi insta spawn removed, all races removed, boost tweaked
#3
General Discussion / diepos problem
Last post by byendofday - Feb 03, 2026, 06:01 AM
hi i spell a diepos have a error code
is wrong number parametre 。how to solve   :'(
#4
General Discussion / Re: vehicle slip problem
Last post by byendofday - Feb 02, 2026, 05:29 AM
Quote from: lamkotien on Jan 31, 2026, 06:53 AM
Quote from: byendofday on Jan 30, 2026, 02:48 PMi want a script  it can creat a temporary car. when car bomb it will not spawned. And pre player have create car restrict  how can i modify my scrip and suggustion 
Please refer to my code; the logic works as follows:
When summoning a vehicle, if it explodes or falls into the water, the remains of it will be hidden in another world. After one second, the vehicle that exploded or fell into the river will be permanently deleted.
// --- SAMPLE COMMAND: /getcar [ModelID OR Vehicle Name] ---
// Example: /getcar 141 OR /getcar infernus
function onPlayerCommand(player, command, arguments) {
    local cmd = command.tolower();
    if (cmd == "getcar" || cmd == "gc") {
        if (!arguments) return MessagePlayer(">> Usage: /getcar [ID/Vehicle Name]", player);

        local input = arguments;
        local modelID = -1;

        // 1. Try to convert input to integer (Model ID)
        try {
            // If arguments is a raw string, we might need to split it
            local spaceIdx = input.find(" ");
            if (spaceIdx != null) input = input.slice(0, spaceIdx);

            modelID = input.tointeger();
        } catch (e) {
            modelID = -1;
        }

        // 2. If not a number, search by Name (Vehicle Names)
        if (modelID == -1) {
            local inputLower = input.tolower();
            foreach(id, name in VehicleNames) {
                if (name.tolower().find(inputLower) != null) {
                    modelID = id;
                    break; // Get the first match
                }
            }
        }

        // 3. Create vehicle if ID is valid
        if (modelID > 0) {
            // Create vehicle 3m in front of the player
            local pos = player.Pos;
            local angle = player.Angle;
            pos.X += 3.0 * sin(-angle);
            pos.Y += 3.0 * cos(-angle);
            pos.Z += 0.5;

            local v = CreateVehicle(modelID, pos, angle, -1, -1);
            if (v) {
                VehiclesToDelete.push(v.ID); // IMPORTANT: Add ID to the deletion list
                MessagePlayer(">> Created temporary vehicle: " + GetVehicleName(modelID) + " (ID: " + v.ID + ")", player);
            } else {
                MessagePlayer(">> Error: Could not create vehicle (Invalid Model).", player);
            }
        } else {
            MessagePlayer(">> No vehicle found with name/id: " + arguments, player);
        }
        return 1;
    }
    return 0;
}

// Helper: Get vehicle name from ID
function GetVehicleName(modelId) {
    if (modelId in VehicleNames) return VehicleNames[modelId];
    return "Unknown";
}

// DATA: Vehicle Names List
VehicleNames <- {
    [130] = "Landstalker",
    [131] = "Idaho",
    [132] = "Stinger",
    [133] = "Linerunner",
    [134] = "Perennial",
    [135] = "Sentinel",
    [136] = "Rio",
    [137] = "Firetruck",
    [138] = "Trashmaster",
    [139] = "Stretch",
    [140] = "Manana",
    [141] = "Infernus",
    [142] = "Voodoo",
    [143] = "Pony",
    [144] = "Mule",
    [145] = "Cheetah",
    [146] = "Ambulance",
    [147] = "FBI Washington",
    [148] = "Moonbeam",
    [149] = "Esperanto",
    [150] = "Taxi",
    [151] = "Washington",
    [152] = "Bobcat",
    [153] = "Mr. Whoopee",
    [154] = "BF Injection",
    [155] = "Hunter",
    [156] = "Police",
    [157] = "Enforcer",
    [158] = "Securicar",
    [159] = "Banshee",
    [160] = "Predator",
    [161] = "Bus",
    [162] = "Rhino",
    [163] = "Barracks OL",
    [164] = "Cuban Hermes",
    [165] = "Helicopter",
    [166] = "Angel",
    [167] = "Coach",
    [168] = "Cabbie",
    [169] = "Stallion",
    [170] = "Rumpo",
    [171] = "RC Bandit",
    [172] = "Romero's Hearse",
    [173] = "Packer",
    [174] = "Sentinel XS",
    [175] = "Admiral",
    [176] = "Squalo",
    [177] = "Sea Sparrow",
    [178] = "Pizzaboy",
    [179] = "Gang Burrito",
    [180] = "Airtrain",
    [181] = "Deadeye",
    [182] = "Speeder",
    [183] = "Reefer",
    [184] = "Tropic",
    [185] = "Flatbed",
    [186] = "Yankee",
    [187] = "Caddy",
    [188] = "Zebra Cab",
    [189] = "Top Fun",
    [190] = "Skimmer",
    [191] = "PCJ-600",
    [192] = "Faggio",
    [193] = "Freeway",
    [194] = "RC Baron",
    [195] = "RC Raider",
    [196] = "Glendale",
    [197] = "Oceanic",
    [198] = "Sanchez",
    [199] = "Sparrow",
    [200] = "Patriot",
    [201] = "Love Fist",
    [202] = "Coast Guard",
    [203] = "Dinghy",
    [204] = "Hermes",
    [205] = "Sabre",
    [206] = "Sabre Turbo",
    [207] = "Phoenix",
    [208] = "Walton",
    [209] = "Regina",
    [210] = "Comet",
    [211] = "Deluxo",
    [212] = "Burrito",
    [213] = "Spand Express",
    [214] = "Marquis",
    [215] = "Baggage Handler",
    [216] = "Kaufman Cab",
    [217] = "Maverick",
    [218] = "VCN Maverick",
    [219] = "Rancher",
    [220] = "FBI Rancher",
    [221] = "Virgo",
    [222] = "Greenwood",
    [223] = "Jetmax",
    [224] = "Hotring Racer",
    [225] = "Sandking",
    [226] = "Blista Compact",
    [227] = "Police Maverick",
    [228] = "Boxville",
    [229] = "Benson",
    [230] = "Mesa Grande",
    [231] = "RC Goblin",
    [232] = "Hotring Racer A",
    [233] = "Hotring Racer B",
    [234] = "Bloodring Banger A",
    [235] = "Bloodring Banger B",
    [236] = "Vice C. Cheeta"
};

// List of vehicles to delete on explode/respawn
VehiclesToDelete <- [];
VehiclesToHide <- {}; // ID -> timestamp (Time to hide vehicle after explosion - Optional)

// --- EVENT: VEHICLE EXPLODE ---
function onVehicleExplode(vehicle) {
    if (!vehicle) return;
    local id = vehicle.ID;

    // Check if vehicle is in the deletion list
    // (Or you can check by World ID, e.g., mission vehicles always have World > 1000)
    local isTemporaryVehicle = false;

    // Method 1: Check in array
    foreach(vID in VehiclesToDelete) {
        if (vID == id) {
            isTemporaryVehicle = true;
            break;
        }
    }

    // Method 2: Check World ID (If you define temporary vehicles having World > 1000)
    if (vehicle.World > 1000) isTemporaryVehicle = true;

    if (isTemporaryVehicle) {
        // Remove vehicle immediately
        vehicle.Remove();

        // Remove from management list
        for (local i = 0; i < VehiclesToDelete.len(); i++) {
            if (VehiclesToDelete[i] == id) {
                VehiclesToDelete.remove(i);
                break;
            }
        }

        print("[Vehicle Logic] Temporary vehicle (ID: " + id + ") removed due to explosion.");
    }
}

// --- EVENT: VEHICLE RESPAWN ---
// This event triggers when a vehicle falls into water or Idles for too long
function onVehicleRespawn(vehicle) {
    if (!vehicle) return;
    local id = vehicle.ID;

    // Similar logic to explode
    local isTemporaryVehicle = false;

    foreach(vID in VehiclesToDelete) {
        if (vID == id) {
            isTemporaryVehicle = true;
            break;
        }
    }
    if (vehicle.World > 1000) isTemporaryVehicle = true;

    if (isTemporaryVehicle) {
        // For Respawn, the vehicle might not be removed immediately if using Remove() directly in Event
        // So we use the "Hide -> Delete Later" process

        // 1. Hide the vehicle (Move to a far away virtual World)
        vehicle.World = id + 5000;

        // 2. Remove from VehiclesToDelete list to avoid re-processing
        for (local i = 0; i < VehiclesToDelete.len(); i++) {
            if (VehiclesToDelete[i] == id) {
                VehiclesToDelete.remove(i);
                break;
            }
        }

        // 3. Schedule delete after 1 second (via Timer or onFrame)
        // Here we use a simple Timer (simulated)
        NewTimer("ForceRemoveVehicle", 1000, 1, id);

        print("[Vehicle Logic] Temporary vehicle (ID: " + id + ") removed due to Respawn (Water/Idle).");
    }
}

// Function to force remove vehicle (Called by Timer)
function ForceRemoveVehicle(vID) {
    local v = FindVehicle(vID);
    if (v) v.Remove();
}


thank you excerpt  oh im add you script in  good
#5
Clans and Families / Re: RK - Rampage Killers
Last post by GOD1 - Feb 01, 2026, 03:50 PM
In case if anyone needs one of the most important VCMP discord servers - discord.gg/h3vCQKrwQH
Join and talk with VCMP legends from the past and current times
#6
General Discussion / Girls In Your Town - Anonymous...
Last post by Milko - Jan 31, 2026, 02:49 PM
Girls In Your Town - No Verify - Anonymous Sex Dating
https://secrelocal.com
 
Girls In Your City - Anonymous Adult Dating - No Verify
#7
General Discussion / Re: vehicle slip problem
Last post by lamkotien - Jan 31, 2026, 06:53 AM
Quote from: byendofday on Jan 30, 2026, 02:48 PMi want a script  it can creat a temporary car. when car bomb it will not spawned. And pre player have create car restrict  how can i modify my scrip and suggustion 
Please refer to my code; the logic works as follows:
When summoning a vehicle, if it explodes or falls into the water, the remains of it will be hidden in another world. After one second, the vehicle that exploded or fell into the river will be permanently deleted.
// --- SAMPLE COMMAND: /getcar [ModelID OR Vehicle Name] ---
// Example: /getcar 141 OR /getcar infernus
function onPlayerCommand(player, command, arguments) {
    local cmd = command.tolower();
    if (cmd == "getcar" || cmd == "gc") {
        if (!arguments) return MessagePlayer(">> Usage: /getcar [ID/Vehicle Name]", player);

        local input = arguments;
        local modelID = -1;

        // 1. Try to convert input to integer (Model ID)
        try {
            // If arguments is a raw string, we might need to split it
            local spaceIdx = input.find(" ");
            if (spaceIdx != null) input = input.slice(0, spaceIdx);

            modelID = input.tointeger();
        } catch (e) {
            modelID = -1;
        }

        // 2. If not a number, search by Name (Vehicle Names)
        if (modelID == -1) {
            local inputLower = input.tolower();
            foreach(id, name in VehicleNames) {
                if (name.tolower().find(inputLower) != null) {
                    modelID = id;
                    break; // Get the first match
                }
            }
        }

        // 3. Create vehicle if ID is valid
        if (modelID > 0) {
            // Create vehicle 3m in front of the player
            local pos = player.Pos;
            local angle = player.Angle;
            pos.X += 3.0 * sin(-angle);
            pos.Y += 3.0 * cos(-angle);
            pos.Z += 0.5;

            local v = CreateVehicle(modelID, pos, angle, -1, -1);
            if (v) {
                VehiclesToDelete.push(v.ID); // IMPORTANT: Add ID to the deletion list
                MessagePlayer(">> Created temporary vehicle: " + GetVehicleName(modelID) + " (ID: " + v.ID + ")", player);
            } else {
                MessagePlayer(">> Error: Could not create vehicle (Invalid Model).", player);
            }
        } else {
            MessagePlayer(">> No vehicle found with name/id: " + arguments, player);
        }
        return 1;
    }
    return 0;
}

// Helper: Get vehicle name from ID
function GetVehicleName(modelId) {
    if (modelId in VehicleNames) return VehicleNames[modelId];
    return "Unknown";
}

// DATA: Vehicle Names List
VehicleNames <- {
    [130] = "Landstalker",
    [131] = "Idaho",
    [132] = "Stinger",
    [133] = "Linerunner",
    [134] = "Perennial",
    [135] = "Sentinel",
    [136] = "Rio",
    [137] = "Firetruck",
    [138] = "Trashmaster",
    [139] = "Stretch",
    [140] = "Manana",
    [141] = "Infernus",
    [142] = "Voodoo",
    [143] = "Pony",
    [144] = "Mule",
    [145] = "Cheetah",
    [146] = "Ambulance",
    [147] = "FBI Washington",
    [148] = "Moonbeam",
    [149] = "Esperanto",
    [150] = "Taxi",
    [151] = "Washington",
    [152] = "Bobcat",
    [153] = "Mr. Whoopee",
    [154] = "BF Injection",
    [155] = "Hunter",
    [156] = "Police",
    [157] = "Enforcer",
    [158] = "Securicar",
    [159] = "Banshee",
    [160] = "Predator",
    [161] = "Bus",
    [162] = "Rhino",
    [163] = "Barracks OL",
    [164] = "Cuban Hermes",
    [165] = "Helicopter",
    [166] = "Angel",
    [167] = "Coach",
    [168] = "Cabbie",
    [169] = "Stallion",
    [170] = "Rumpo",
    [171] = "RC Bandit",
    [172] = "Romero's Hearse",
    [173] = "Packer",
    [174] = "Sentinel XS",
    [175] = "Admiral",
    [176] = "Squalo",
    [177] = "Sea Sparrow",
    [178] = "Pizzaboy",
    [179] = "Gang Burrito",
    [180] = "Airtrain",
    [181] = "Deadeye",
    [182] = "Speeder",
    [183] = "Reefer",
    [184] = "Tropic",
    [185] = "Flatbed",
    [186] = "Yankee",
    [187] = "Caddy",
    [188] = "Zebra Cab",
    [189] = "Top Fun",
    [190] = "Skimmer",
    [191] = "PCJ-600",
    [192] = "Faggio",
    [193] = "Freeway",
    [194] = "RC Baron",
    [195] = "RC Raider",
    [196] = "Glendale",
    [197] = "Oceanic",
    [198] = "Sanchez",
    [199] = "Sparrow",
    [200] = "Patriot",
    [201] = "Love Fist",
    [202] = "Coast Guard",
    [203] = "Dinghy",
    [204] = "Hermes",
    [205] = "Sabre",
    [206] = "Sabre Turbo",
    [207] = "Phoenix",
    [208] = "Walton",
    [209] = "Regina",
    [210] = "Comet",
    [211] = "Deluxo",
    [212] = "Burrito",
    [213] = "Spand Express",
    [214] = "Marquis",
    [215] = "Baggage Handler",
    [216] = "Kaufman Cab",
    [217] = "Maverick",
    [218] = "VCN Maverick",
    [219] = "Rancher",
    [220] = "FBI Rancher",
    [221] = "Virgo",
    [222] = "Greenwood",
    [223] = "Jetmax",
    [224] = "Hotring Racer",
    [225] = "Sandking",
    [226] = "Blista Compact",
    [227] = "Police Maverick",
    [228] = "Boxville",
    [229] = "Benson",
    [230] = "Mesa Grande",
    [231] = "RC Goblin",
    [232] = "Hotring Racer A",
    [233] = "Hotring Racer B",
    [234] = "Bloodring Banger A",
    [235] = "Bloodring Banger B",
    [236] = "Vice C. Cheeta"
};

// List of vehicles to delete on explode/respawn
VehiclesToDelete <- [];
VehiclesToHide <- {}; // ID -> timestamp (Time to hide vehicle after explosion - Optional)

// --- EVENT: VEHICLE EXPLODE ---
function onVehicleExplode(vehicle) {
    if (!vehicle) return;
    local id = vehicle.ID;

    // Check if vehicle is in the deletion list
    // (Or you can check by World ID, e.g., mission vehicles always have World > 1000)
    local isTemporaryVehicle = false;

    // Method 1: Check in array
    foreach(vID in VehiclesToDelete) {
        if (vID == id) {
            isTemporaryVehicle = true;
            break;
        }
    }

    // Method 2: Check World ID (If you define temporary vehicles having World > 1000)
    if (vehicle.World > 1000) isTemporaryVehicle = true;

    if (isTemporaryVehicle) {
        // Remove vehicle immediately
        vehicle.Remove();

        // Remove from management list
        for (local i = 0; i < VehiclesToDelete.len(); i++) {
            if (VehiclesToDelete[i] == id) {
                VehiclesToDelete.remove(i);
                break;
            }
        }

        print("[Vehicle Logic] Temporary vehicle (ID: " + id + ") removed due to explosion.");
    }
}

// --- EVENT: VEHICLE RESPAWN ---
// This event triggers when a vehicle falls into water or Idles for too long
function onVehicleRespawn(vehicle) {
    if (!vehicle) return;
    local id = vehicle.ID;

    // Similar logic to explode
    local isTemporaryVehicle = false;

    foreach(vID in VehiclesToDelete) {
        if (vID == id) {
            isTemporaryVehicle = true;
            break;
        }
    }
    if (vehicle.World > 1000) isTemporaryVehicle = true;

    if (isTemporaryVehicle) {
        // For Respawn, the vehicle might not be removed immediately if using Remove() directly in Event
        // So we use the "Hide -> Delete Later" process

        // 1. Hide the vehicle (Move to a far away virtual World)
        vehicle.World = id + 5000;

        // 2. Remove from VehiclesToDelete list to avoid re-processing
        for (local i = 0; i < VehiclesToDelete.len(); i++) {
            if (VehiclesToDelete[i] == id) {
                VehiclesToDelete.remove(i);
                break;
            }
        }

        // 3. Schedule delete after 1 second (via Timer or onFrame)
        // Here we use a simple Timer (simulated)
        NewTimer("ForceRemoveVehicle", 1000, 1, id);

        print("[Vehicle Logic] Temporary vehicle (ID: " + id + ") removed due to Respawn (Water/Idle).");
    }
}

// Function to force remove vehicle (Called by Timer)
function ForceRemoveVehicle(vID) {
    local v = FindVehicle(vID);
    if (v) v.Remove();
}
#8
General Discussion / Re: Request for an option to e...
Last post by lamkotien - Jan 31, 2026, 01:20 AM
Quote from: Vicky on Jan 30, 2026, 01:05 PM
Quote from: lamkotien on Jan 30, 2026, 09:00 AMThank you, my dear friend.

I am trying to implement a client-side Laser Sniper feature on my VC:MP 0.4 server but I'm struggling to get the client script to load.

**My Setup:**
- **Server Version:** VC:MP 0.4 (Windows)
- **Plugins:** `squirrel04rel32.dll` (Stormeus build), `xmlconf04rel32.dll`
- **Server Script:** [store/script/main.nut] /vcmp/store/script/main.nut) (This works perfectly for server-side logic).
- **Client Script:** [store/laser_client.nut] /vcmp/store/laser_client.nut) (This contains the `onClientRender` code for drawing lasers).

**The Problem:**
I want the server to send [store/laser_client.nut] /vcmp/store/laser_client.nut) to players when they connect.
However, when I try to load this script inside [main.nut] /vcmp/store/main.nut) using functions like `RegisterClientScript("store/laser_client.nut")` or `Script.LoadClientScript("store/laser_client.nut")`, the server console throws errors:

`[SCRIPT] !! Error: the index 'Script' does not exist`
or
`[SCRIPT] !! Error: RegisterClientScript function not found!`

It seems my current Squirrel plugin lacks the functions to register/load client-side scripts.

**Question:**
Is there a specific way to load a separate client script file ([laser_client.nut] /vcmp/store/laser_client.nut) from the main server script ([main.nut] /vcmp/store/main.nut) in this version? Or do I need an updated Squirrel plugin that supports `RegisterClientScript`?

If an update is needed, could someone please point me to the correct plugin version for VC:MP 0.4?

Any help would be greatly appreciated!

Thank you!

As far as I know, server-side scripts should be placed in vcmp/scripts folder and client side scripts belong in vcmp/store/script folder.

And talking about that error. Use this if you want to include other scripts along with main.
https://wiki.vc-mp.org/wiki/Scripting/Squirrel/Client_Functions/dofile

RegisterClientScript isn't a valid VC:MP function.
Check out VC:MP Wiki for all the information about server functions and events.


Thank you, I placed it in the \store folder and it downloaded successfully to the client.
#9
General Discussion / vehicle slip problem
Last post by byendofday - Jan 30, 2026, 02:48 PM
i want a script  it can creat a temporary car. when car bomb it will not spawned. And pre player have create car restrict   how can i modify my scrip and suggustion   
#10
General Discussion / Re: Request for an option to e...
Last post by Vicky - Jan 30, 2026, 01:05 PM
Quote from: lamkotien on Jan 30, 2026, 09:00 AMThank you, my dear friend.

I am trying to implement a client-side Laser Sniper feature on my VC:MP 0.4 server but I'm struggling to get the client script to load.

**My Setup:**
- **Server Version:** VC:MP 0.4 (Windows)
- **Plugins:** `squirrel04rel32.dll` (Stormeus build), `xmlconf04rel32.dll`
- **Server Script:** [store/script/main.nut] /vcmp/store/script/main.nut) (This works perfectly for server-side logic).
- **Client Script:** [store/laser_client.nut] /vcmp/store/laser_client.nut) (This contains the `onClientRender` code for drawing lasers).

**The Problem:**
I want the server to send [store/laser_client.nut] /vcmp/store/laser_client.nut) to players when they connect.
However, when I try to load this script inside [main.nut] /vcmp/store/main.nut) using functions like `RegisterClientScript("store/laser_client.nut")` or `Script.LoadClientScript("store/laser_client.nut")`, the server console throws errors:

`[SCRIPT] !! Error: the index 'Script' does not exist`
or
`[SCRIPT] !! Error: RegisterClientScript function not found!`

It seems my current Squirrel plugin lacks the functions to register/load client-side scripts.

**Question:**
Is there a specific way to load a separate client script file ([laser_client.nut] /vcmp/store/laser_client.nut) from the main server script ([main.nut] /vcmp/store/main.nut) in this version? Or do I need an updated Squirrel plugin that supports `RegisterClientScript`?

If an update is needed, could someone please point me to the correct plugin version for VC:MP 0.4?

Any help would be greatly appreciated!

Thank you!

As far as I know, server-side scripts should be placed in vcmp/scripts folder and client side scripts belong in vcmp/store/script folder.

And talking about that error. Use this if you want to include other scripts along with main.
https://wiki.vc-mp.org/wiki/Scripting/Squirrel/Client_Functions/dofile

RegisterClientScript isn't a valid VC:MP function.
Check out VC:MP Wiki for all the information about server functions and events.