- chat command /spawn [carname]
problem :
The general user can pull out all vehicles.
I want to stop the general public from using the command.
This problem causes a severe leg on the server.
Do you have a script that can block the command?
I need help.
Find the script that makes this command and change the command in the server.lua
i had this problem about 2 weeks ago , and making own script for blocking it, im gonna paste it here
client.lua
RegisterNetEvent("spawnCommand")
AddEventHandler('spawnCommand', function(args)
TriggerEvent('chatMessage', "^1SYSTEM : ", {255, 0, 0}, "^1BLOCKED COMMAND")
end)
server.lua
RegisterCommand('spawn', function(source, args, user)
TriggerClientEvent('spawnCommand', source,args)
end)
start the resource above all your script