3446af804d
+ Re-wrote the commands script to actually register the commands. + Changed both the Hands-Up and Point-Finger script to use commands. Mostly had to re-write Hands-Up entirely and change up the point script alittle. + Fixed a car which had a ridiculous handling data file.
20 lines
481 B
Lua
20 lines
481 B
Lua
AddEventHandler('chatMessage', function(source, name, msg)
|
|
sm = stringsplit(msg, " ");
|
|
if sm[1] == "/dispatch" then
|
|
CancelEvent()
|
|
TriggerClientEvent('chatMessage', -1, "📲 Dispatch | " .. name, { 30, 144, 255 }, string.sub(msg,10))
|
|
end
|
|
end)
|
|
|
|
function stringsplit(inputstr, sep)
|
|
if sep == nil then
|
|
sep = "%s"
|
|
end
|
|
local t={} ; i=1
|
|
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
|
t[i] = str
|
|
i = i + 1
|
|
end
|
|
return t
|
|
end
|