30.08.2010, 14:26
Use the first one if you use ReturnUser, second if not
pawn Код:
stock RemoveUnderScore(playerid, target)
{
new targetid = ReturnUser(target);
new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME];
GetPlayerName(targetid, targetname, sizeof targetname);
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
if(targetname[i] == '_') targetname[i] = ' ';
}
return name, targetname;
}
pawn Код:
stock RemoveUnderScore(playerid, target)
{
new targetid = strval(target);
new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME];
GetPlayerName(targetid, targetname, sizeof targetname);
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
if(targetname[i] == '_') targetname[i] = ' ';
}
return name, targetname;
}