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!
// Add vicky as admin if not exists
local q = QuerySQL(db, "SELECT * FROM Admins WHERE Name='vicky'");
if (!q) {
QuerySQL(db, "INSERT INTO Admins (Name) VALUES ('vicky')");
}
if (q) FreeSQLQuery(q);
