Replace ' ' with '_'
#3

pawn Код:
stock AddUnderscore(string[])
{
    for(new i = 0, l = strlen(string); i < l; i++)
    {
        if(string[i] == ' ')
        {
            string[i] = '_';
        }
    }
    return string;
}

format(string, sizeof(string), "%s", AddUnderscore(PlayerData[playerid][Fullname]));
printf("%s", string);
SetPlayerName(playerid, string);
Print:
Код:
[00:42:41] T
Hint: PlayerData[playerid][Fullname] = Jack Leslie
Needs to return Jack_Leslie
Reply


Messages In This Thread
Replace ' ' with '_' - by Jack_Leslie - 04.07.2014, 14:10
AW: Replace ' ' with '_' - by Mellnik - 04.07.2014, 14:12
Re: Replace ' ' with '_' - by Jack_Leslie - 04.07.2014, 14:18
AW: Replace ' ' with '_' - by Mellnik - 04.07.2014, 14:32
Re: Replace ' ' with '_' - by Rittik - 04.07.2014, 14:49
Re: AW: Replace ' ' with '_' - by Jack_Leslie - 05.07.2014, 00:00

Forum Jump:


Users browsing this thread: 1 Guest(s)