Command give out Numbers from Name

Hey dear Lua coders.
Im new to this board and want to code something for my SWRP Server.

I just can give out the Name if a user runs the console command givemyname
But now i want to give out just the numbers in the name.

On StarWars RP ure using ID codes like a name is: WP CC 1337 Sodak

and i want to give out the Number if i type in givemyname.

it has to do this:

If player type givemyname then
say /me (yeah im using darkrp and need the /me command) Player shows his ID: ID From the Name

Maybe someone can help me coding this.

Do you know the function to get these numbers? If not, look at the /me command source.

No i mean i need the function to give out the players name but only the numbers that the playersname containts.

Its clearer i guess

That’s what I’m asking: those numbers aren’t inherently part of a player’s name. Do you know how to get these numbers?

These Numbers u can give urself like a rpname on my server my name is WP CC 1337 Sodak and the name is given bymyself over the cmd /rpname (rpname changes the ingame players name to every u want) but on my server its a rule to have 4 numbers in the name (that u can choose by yourself)

So i have to take a look into the darkrp functions:

the command is used /rpname and it saves the names as i stands in the sv.db

the function from darkrp i guess its:

line 185-212

Doesnt mind… i just have to use: Player:GetName() but only show letters in the name… this must be the function that i need

So did you ever find what you needed? What if any code have you done? People aren’t going to spoon feed you here bud. If you need code work done consider scriptfodder jobs.

I asked on scriptfodder^^ they’re just open for that kind of jobs. the guy gave me my mini addon today :slight_smile:

Considering the format is always the same, you could have use a regex pattern and call it for the day in 5 minutes, but ok…

yeah i know… just make a command /id that makes this happen: command: /id does "say /me my ID is: (regex Pattern out of Numbers from the Name) like this:

RPName: 1337 Sodak

Your ID is: 1337