23.02.2019, 14:53
Is it about specific tags only (like only [KING] is going to be removed), or all clan tags?
You can use strfind (it returns the index where it was found, eg. 0 if it's at the start, or in your example 5, -1 if it wasn't found).
Then you know where the tag begins in the name, from there you can use strdel to remove it:
You can use strfind (it returns the index where it was found, eg. 0 if it's at the start, or in your example 5, -1 if it wasn't found).
Then you know where the tag begins in the name, from there you can use strdel to remove it:
Код:
new idx = strfind(name, "[KING]", true); if(idx != -1) { strdel(name, idx, idx + 6); // Deletes characters from (idx) to (idx+6), since 6 is the length of the tag SetPlayerName(playerid, name); }