Find and remove specific tag
#4

what about

pawn Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME]; //create the string we store the name in
    GetPlayerName(playerid, name, sizeof(name)); //store the players name
    new start = strfind(name, "["); //check if it has an opening bracket, if it does it will store the starting position in here, if not it will return -1 which is fine
    if(strfind(name, "[LOL]")) //check if it's [LOL]
    {
        format(name, sizeof(name), "%s", strdel(name,start,start+4)); //store our new name in here delete [ + 4 (hopefully [LOL])
        SetPlayerName(playerid, name); //set their name to our new name string
    }
    return 1;
}
untested though, not sure if it will work
Reply


Messages In This Thread
Find and remove specific tag - by iTorran - 19.02.2012, 12:32
Re: Find and remove specific tag - by Jefff - 19.02.2012, 12:54
Re: Find and remove specific tag - by iTorran - 17.03.2012, 12:11
Re: Find and remove specific tag - by [ABK]Antonio - 17.03.2012, 12:26
Re: Find and remove specific tag - by ReneG - 17.03.2012, 12:44
Re: Find and remove specific tag - by MP2 - 17.03.2012, 12:46
Re: Find and remove specific tag - by [ABK]Antonio - 17.03.2012, 12:48
Re: Find and remove specific tag - by iTorran - 17.03.2012, 13:51
Re: Find and remove specific tag - by ReneG - 17.03.2012, 15:30

Forum Jump:


Users browsing this thread: 2 Guest(s)