Get old PlayerName after changed by SetPlayerName ??
#10

pawn Code:
RemoveGangTag(name[])
{
  new first,last;
    for(new i; i<strlen(name);i++)
    {
       
        if(strfind(name,"[",true,i)>-1)first = strfind(name,"[",true,i);
        else continue;
    }
    last = strfind(name,"]",true,first);
    printf("%d,%d",first,last);
    if(first>-1)
    {
        if(last>first)
        {
            strdel(name,first,last+1);
        }
    }
    if(strfind(name,"[",true)>-1)RemoveGangTag(name);
}
Use

pawn Code:
OnPlayerConnect(playerid,ip[])
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid,name,sizeof(name));
  RemoveGangTag(name);
  SetPlayerName(playerid,name);
}
=)


EDIT* Fixed it a couple times through lol
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)