06.04.2011, 16:50
Search for the sign "_" in the string, then replace it with " ".
I found a code for you.
(PR-RP)
Usage:
For the name:
p/s What? We have to wait 2 minutes, again, to post?
I found a code for you.
pawn Код:
GiveNameSpace(str[])
{
new strl;
strl=strlen(str);
while(strl--) {
if(str[strl]=='_') str[strl]=' ';
}
return 0;
}
Usage:
pawn Код:
new string[4];
string = "R_L";
GiveNameSpace(string);
return string; // will return "R L"
pawn Код:
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
GiveNameSpace(playername);
return playername; // If your name was "Haha_Lol", it will return "Haha Lol".