How do I get the first three letters of a name?
#1

How do I get the first three letters of a name exluding clantag? Thanks.

[FOX]Gonad > Gon
Finlay > Fin
linuxthefish > lin
[FOX]FriedEGG > Fri
Reply
#2

https://sampwiki.blast.hk/wiki/Strmid

Excluding clantags will be a little bit tricky, because you don't know what their excact length will be. You could use strfind to find the first occurance of ']' and use that as the start index for strmid (and index + 3 for the end). However, if someone with a name like ]]someone[[ joines, this won't work.
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)