Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Help with string.find/ :find() or strings in genaral?

Asked by
Vain_p 78
5 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

I am trying to have it so when the player has the has said >kill exampleuser I want the player to just say >kill exa I already ready have the commands set up but I don't really get the wiki so please don't link it I have looked it up and no one has really covered it so any help?

0
Can we have the code or an attempt please? TheeDeathCaster 2368 — 5y
0
I am just looking for the the players name by typing thr first 3 letters of that person's name so like >kill 5 or something Vain_p 78 — 5y
0
You could loop through the players, and check the first three letters of their name via `string.sub`. `if #str >= 3 and plrName:sub(1, #str) == str then` for example. TheeDeathCaster 2368 — 5y
0
I could but I heard there was a way to do it via find which I don't know much about and the wiki is ot helping Vain_p 78 — 5y

Answer this question