27.08.2009, 07:24
Does any1 have a function that Clean a players name of _ Like GetPlayerName then Like set the "_" to ""
stock GetPlayerNameEx(playerid)
{
new string[24];
GetPlayerName(playerid,string,24);
new str[24];
strmid(str,string,0,strlen(string),24);
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if (str[i] == '_') str[i] = ' ';
}
return str;
}
stock GetPlayerNameEx(playerid) { new string[24]; GetPlayerName(playerid,string,24); new str[24]; strmid(str,string,0,strlen(string),24); for(new i = 0; i < MAX_PLAYER_NAME; i++) { if (str[i] == '_') str[i] = ' '; } return str; } |
stock GetPlayerNameEx(playerid)
{
new n[MAX_PLAYER_NAME];
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
for(new i=0;i<strlen(n);i++)
if(n[i]=='_')
n[i]=' ';
return n;
}
Originally Posted by XCultz
Quote:
|
stock GetPlayerNameEx(playerid)
{
new string[24];
GetPlayerName(playerid,string,24);
new str[24];
strmid(str,string,0,strlen(string),24);
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if (str == '_') strdel ( str , i , i );
}
return str;
}