im was trying to make an script but it can be really hard to find an working funktion for me maybe some can help me.
Im trying to make an script where the server puts something in chat for example "heres your code: '4265' type it in the chat as quick as possible" and then i want the script to extract the code and just put it back into the chat like
Console: heres your code: '4265' type it in the chat as quick as possible.
How would you do it im interested in your answers, thanks for trying to help me.
I seen this before in alot of tf2 servers, you might need to add a script to detect chat for this or something, im not the best in code cause I took only a few classes, but that's my question.
Can you explain a bit more? There seems to be some kind of language barrier here,
local string = "a12gh3"
for i = 1, #string do -- step through string one character at a time
local c = string:sub(i, i) -- get that character
if (tonumber(c)) then -- check if specific character can be converted to an integer
print("[NUMBER]: " .. c) -- print that integer
Hey thanks for helping, i thing i should give you information how this script should work. So imagine every 30 min there is an server wide announcment in chat that says "First to type the next number gets 200xp: '3458'"
Than the player wich types only the number first in chat get´s the 200xp, so i thougt there is a way to make an client-side script wich does that automaticly for me like recognize the number and then simply write´s it in the chat.
Hope someone can help me figur that out.
you want a client-side script to help you win a fun event?
not to be harsh, but everyone who plays that server and participates in that event will hate you.
either way the server would have to allow clientside lua, which 99% of servers disallow.
I was just wondering if this would be possible and really like to automize stuff to make it simpler and to lern how this could be done...
Sorry, you need to Log In to post a reply to this thread.