08.08.2010, 15:51
pawn Код:
stock RemUnderLine(name[MAX_PLAYER_NAME])
{
new UL = strfind(name, "_", true);
while(UL != -1)
{
name[UL] = ' ';
UL = strfind(name, "_", true);
}
return name;
}
Works as:
Assign the name to the result of the function:
pawn Код:
new name[MAX_PLAYER_NAME]; format(name, sizeof name, "Sir_John_Davy"); //There's probably another function available then format, don't know :P.
print(name); // Will print "Sir_John_Davy"
name = RemUnderLine(name);
print(name); //Will print "Sir John Davy"
Once again, I don't know if it works.
Edit: tried it, doesn't work. Lemme fix it.
Edit: Works now.