DeleteClanTag
#1

Hey guys, can someone make a me a DeleteClanTag, i tried many many times.. Im stuck on a part where inside of the 2 brackets detected, not sure how to remove the text inside the brackets, Thanks.



-Lorenc_
Reply
#2

Try lookup strfind and strdel on the wiki.
Reply
#3

I used those methods. Im getting stuck on how to delete characters inside the name...
Reply
#4

Well.. Can you give me an example of your code?
Reply
#5

pawn Код:
stock RemovePlayerClan(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
   
    if ( strfind( name , "[" , true ) == -1 )
    {
        strreplacechar(playername,'[',' ');
    }
    if ( strfind( name , "]" , true ) == -1 )
    {
        strreplacechar(playername,']',' ');
    }

}
Reply
#6

here's for deleting people's tags that appear before the name
pawn Код:
stock NameWithoutTag(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    strdel(name,0,(strfind(name,"]",true,0) + 1));
    return name;
}
Reply
#7

Doesn't that only delete that one bracket^
Reply
#8

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Doesn't that only delete that one bracket^
Next time this mac is going into the wall.

-- Delete post --
Reply
#9

that deletes everything before ] and ] itself

but what if ppl have

Gangsta[mw]? and not

[Mw]Gangsta
Reply
#10

oic ill try it out

btw, the_gangstas, in my server thats forbidded lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)