Find and remove specific tag
#5

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
what about

pawn Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new start = strfind(name, "[");
    if(strfind(name, "[LOL]"))
    {
        format(name, sizeof(name), "%s", strdel(name,start,start+4));
        SetPlayerName(playerid, name);
    }
    return 1;
}
untested though, not sure if it will work
That wont work lol

This might
pawn Код:
if(strfind(name, "[LOL]") != -1) // If it WAS found
    {
        strdel(name,0,4) // Deletes characters 0,1,2,3,4
                         //                    [ L O L ]
        SetPlayerName(playerid, name);
    }
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: 1 Guest(s)