17.03.2012, 12:26
what about
untested though, not sure if it will work
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;
}