09.02.2011, 20:45
I don't know actually.. I was just trying something out..
correction though:
Do you know how to replace the "_" ?
Isn't there a string replace function ?
Nevermind, I figured this out:
correction though:
pawn Код:
strdel(cname, charpos, charpos+1);
Isn't there a string replace function ?
Nevermind, I figured this out:
pawn Код:
stock rpname(playerid)
{
new cname[MAX_PLAYER_NAME], underscore;
GetPlayerName(playerid, cname, sizeof(cname));
underscore = strfind(cname, "_");
if(underscore != -1)
{
strdel(cname, underscore, underscore+1);
strins(cname, " ", underscore, MAX_PLAYER_NAME);
}
return cname;
}