That way didnt work?
If not i think you might have an error on the client
Nope still only printed the 1 print
Like i said, i done all i can, if you want more specific help, PM me with the resource
pming you now
20Characters
Solved
20Charactersss
And the solution was?
Events, TriggerClientEvent
on server and RegisterNetEvent
on client side
Yes.
I got it working by looking at examples.
It’s important how you pass these variables over.
If you for example:
– Server
RegisterCommand(“car”, (source, args)
TriggerClientEvent('‘spawn-car’, source, args[1] or ‘thrax’)
end, true)
You need to pass it to the client by doing this:
– Client
RegisterNetEvent(‘spawn-car’, function(vehName)
– logic
end)
In this case vehName takes over the variables passed over by the second variable in the TiggerClientEvent function.
So “args[1] or ‘thrax’” will get pushed onto “vehName”.
It will automatically be useable as a variable and doesn’t need to be defined again.
Just for people wondering in the future, because I hate topics that suddenly stop.
Ps.: This is syntax for a car spawner command taking either a model hash or if blank spawning a “thrax” by default.