• I need help!
    15 replies, posted
Hello i need help with lua script, i very novice in this. i seek to create a say command (! models) and after sending message it runs a console command (playermodel_selector) please i need help!
lua/autorun/client/cl_whatever.lua https://pastebin.com/sT3NB1CW
Not works :/
Does the hook run (you can verify this with prints)?
does not run
There is literally a RULE, saying you should not name your Threads "I need help"....
How to edit title?
after you posted it idk if you can change the title, but next time bame the title actually the topic that you need help on. So people can quickly see it and see if they maybe know the answer. Because "i need help", does not tell us anything
Make sure your script is under lua/autorun/client and it is a .lua file. You can use this code (add a print and debug it to see if the hook runs): hook.Add( "PlayerSay", "PlayermodelSelectorCommand", function( ply, text, public ) if ( string.lower( text ) == "!kill" ) then ply:Kill() return "" end end )
GM/PlayerSay is a serverside hook
hook.Add("PlayerSay", "checkdatdamncommand", function(ply, text, teamchat) if(string.lower(text) == "!model") then ply:RunConsoleCommand("playermodel_selector") end end) Run it SERVERSIDE and tada! You say that...
Aight, everyone makes mistakes. But why are you telling me this when you made the exact same mistake?
Nice *dumb*, nice reading. I used GM/OnPlayerChat and my code is error-free, so its his mistake with paths or something. https://www.gmodstore.com/jobs/view/25223 this is for you
Yeah, sorry, realized immediately after I rated dumb lmao
It was 19 minutes ago and you didn't tried to fix it in your post. :v
I was too lazy its like 12am on a Monday night and I've only been sleeping through the days for the past 3 nights
Sorry, you need to Log In to post a reply to this thread.