Get only numbers of send message on chat

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

LucXas

Member
Feb 5, 2017
14
0
1
25
someone could help me?
i try get the only numbers of message sended on the chat for set in a variable help me pls
i try put if only message is a integer but not works i tip a integer and he tells me that put a integer number but i put a integer number



on chat:
if {mermargui.%player%} is true:
if message conatins numbers:
remove numbers from message
add removed objects to {messagechat.%player%}
set {messagechat.%player%} to message
cancel event
else:
message "&cDebes poner un numero&7!"
cancel event
 
someone could help me?
i try get the only numbers of message sended on the chat for set in a variable help me pls
i try put if only message is a integer but not works i tip a integer and he tells me that put a integer number but i put a integer number



on chat:
if {mermargui.%player%} is true:
if message conatins numbers:
remove numbers from message
add removed objects to {messagechat.%player%}
set {messagechat.%player%} to message
cancel event
else:
message "&cDebes poner un numero&7!"
cancel event
im not quite sure what youre trying to do but this might help (needs tuske)
code_language.skript:
on chat:
    set {_numbersInMessage::*} to regex replace all "[^0-9]" with "" in message
    broadcast "%{_numbersInMessage::*}%"

    set {_nonNumbers::*} to regex replace all "[0-9]" with "" in message
    broadcast "%{_nonNumbers::*}%"
 
Status
Not open for further replies.