14.11.2012, 17:43
This will help you out buddy:
pawn Код:
stock getFirstName(szPlayerName[]) {
new
_tmpSzPlayerName[MAX_PLAYER_NAME],
iCh = strfind(szPlayerName, "_", true);
if(iCh != -1) {
strcat(_tmpSzPlayerName, szPlayerName, MAX_PLAYER_NAME);
strdel(_tmpSzPlayerName, iCh, strlen(szPlayerName));
} else {
format(_tmpSzPlayerName, sizeof(_tmpSzPlayerName), "Nameless");
}
return _tmpSzPlayerName;
}