Xagul
deathzot.net
- Joined
- Jun 30, 2008
- Messages
- 1,294
- Solutions
- 3
- Reaction score
- 1,037
Hello, I was wondering if there would be a way to make a script to determine if a players name contains certain character strings for example:
Now that works if you want to sit and think of 1000 possibility's but what about using wildcards? Maybe sumthing like this:
I know this is not how you would have to do it however I have no idea how to go about using wildcards in this way, if anyone knows how it would be nice.
In the end really what matters is that if a player logs into a server with a name containing "GM, Admin, SGM" they should automatically be kicked (however I can handle that stuff I just need a script to determine if a name contains those words)
Code:
if getCreatureName(cid) == "Administrator" then
//code
end
Now that works if you want to sit and think of 1000 possibility's but what about using wildcards? Maybe sumthing like this:
Code:
prohibited = "Admin~"
if getCreatureName(cid) == prohibited then
//code
end
I know this is not how you would have to do it however I have no idea how to go about using wildcards in this way, if anyone knows how it would be nice.
In the end really what matters is that if a player logs into a server with a name containing "GM, Admin, SGM" they should automatically be kicked (however I can handle that stuff I just need a script to determine if a name contains those words)