25.11.2012, 18:30
Never mind, I managed to do it:
Thanks for all your help =]
Код:
stock returnFirstName(playerid) { new name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); // new namestring = strfind(name, "_", true); if(namestring == -1) { return name; } // new pos = strfind(name, "_"); if(pos != -1) { strdel(name, pos, strlen(name)); return name; } else { name = "NULL"; } return name; }