09.02.2011, 20:02
Why are you trying to force an if test inside strdel?
pawn Код:
stock rpname(playerid)
{
new cname[MAX_PLAYER_NAME], charpos;
GetPlayerName(playerid, cname, sizeof(cname));
charpos = strfind(cname, "_"); //get the position of the '_' if it exists inside the name.
if(charpos != -1) //if charpos is -1, that means that '_' was not found, else it's the position of '_'
strdel(cname, charpos, charpos); //delete the '_'
return cname; //return the final result
}