Any question´s about the Server/Script


#1

Hey, im really new and i have no experience with lua, and sry for my bad english.
So, i downloadet the script from @kanersps (http://forum.fivereborn.com/topic/847/freeroam-gamemode-by-kanersps)
I would paste a simple /me Chat function in the Ressource folder and connected it with the __resource.lua but it doesnt work, i get no errors. If i write /me test in the chat it comes invalid command, i think that the file doesent connected to the server.

Code of /me function:
AddEventHandler(‘chatCommandEntered’, function(fullcommand)
RegisterServerEvent(‘chatMessage’)

if (command[1] == ‘/me’) then
TriggerClientEvent(‘chatMessage’, -1, GetPlayerName(source), { r, g, b }, command[2])
end
end)

I will learn to script with lua, but i cant find some good tutorial´s for fivereborn, i would learn with MTA Tutorial´s, but i heard lua isn´t lua.

/edit the name of the file is “me.lua” and in __resource.lua i wrote server_script ‘server/me.lua’


#2

Whats command[…]?
Split “fullcommand” first.

Then u must take a other method to see what u have write in ur “/me” command, because “command[2]” takes only the first word before " ".