Hello,
I have an issue, I created an only client sided script, and added it to my server.cfg. But when a player connects, everything seems correct, unless that he cannot use the script, it looks like the issue comes from the RegisterKeyMapping
native.
Once I restart the script (via txadmin console) it works for the player. (but if he disconnect/reconnect, it won’t work until I restart the script again).
I checked the server console, there are no errors on startup.
Would someone be able to find the solution ?
Environment questions
Latest version of GTAV, up to date, Legit, Steam
What have you tried already to fix the issue?
Clear server and client cache, change the position in the server.cfg, put the RegisterKeyMapping on top of the file, restart the server.
What server did you get this issue on? Be specific and name some, ‘all of them’ by itself isn’t useful!
My own localhost server.
Here you can read the beggining of my script :
--Auteur: Cabe Gallo---
print("Demarrage Stopstick")
local stopstick='w_me_gclub'
local stopstickHash=GetHashKey(stopstick)
local weapon_stopstick="weapon_golfclub"
RegisterKeyMapping('+stopstick', 'Manipulations stopstick', 'keyboard', 'k')
RequestModel(stopstickHash)
RegisterCommand('+stopstick',function()
--La touche k à été enclanchée
TriggerEvent('manip_stopstick')
end)
RegisterCommand('-stopstick',function()
end)--Simple commande pour permettre de masquer affichage chat
local playerPed=PlayerPedId()
--Thread crevaison de pneu(s)
Citizen.CreateThread(function()
while true do
if IsPedInAnyVehicle(playerPed,false) then
local playerPos=GetEntityCoords(playerPed)
...
Here is my fxmanifest.lua :
fx_version 'cerulean'
game 'gta5'
author 'Cabe Gallo'
description 'Crève les pneus du véhicule dans lequel est le joueur'
version '1.0.0'
client_script 'stopstick_client.lua'
Thanks a lot
Cabe Gallo