sphinx-dev-oss Posted June 7, 2022 Posted June 7, 2022 (edited) Hi i have a problem with my script. So i write the script "nice" but i dont get it clientevent is why didnt work for me. And i want to create weapon and attach to the server side created vehicle(raindance) Error: ERROR: Server triggered clientside event createMinigun, but event is not added clientside Server Side: function createMinigunWeapon() triggerClientEvent("createMinigun", resourceRoot) end addEventHandler("onResourceStart", resourceRoot, createMinigunWeapon) Client side: function createMinigunWeapon() -- Create the weapon 1 meter above the player local x, y, z = getElementPosition(localPlayer) local weapon = createWeapon("minigun", x, y, z + 1) -- Give it some ammo and fire it setWeaponClipAmmo(weapon, 99999) setWeaponState(weapon, "firing") setWeaponProperty(weapon, "fire_rotation", 0, 0, 0) end addEventHandler("createMinigun", localPlayer, createMinigunWeapon) addEvent("createMinigun", true) Edited June 7, 2022 by SphinxDev wrong information My Website: https://sphinx-dev-oss.nhely.hu My GitLab Profile: https://gitlab.com/sphinx-dev-oss My GitHub Profile: https://github.com/sphinx-dev-oss/ “It’s not a bug; it’s an undocumented feature.”
nikitafloy Posted June 7, 2022 Posted June 7, 2022 several reasons, use setTimer with triggerClientEvent then Нужен скриптер?Benuff Server - Russian Site MTA:SA - Updating, Client, Game, Problem Solving, Help for Russian Players and etc.
sphinx-dev-oss Posted June 7, 2022 Author Posted June 7, 2022 !!SOLVED!! but thanks for the help My Website: https://sphinx-dev-oss.nhely.hu My GitLab Profile: https://gitlab.com/sphinx-dev-oss My GitHub Profile: https://github.com/sphinx-dev-oss/ “It’s not a bug; it’s an undocumented feature.”
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now