2019-04-15, 09:20 PM
PHP Code:
? ? ?new name[MAX_PLAYER_NAME 1];
? ? ?GetPlayerName(playerid, name, MAX_PLAYER_NAME);
? ? ?name[strfind(name, "_", true)] = " ";
? ? ?SetPlayerName(playerid, name);
I suppose this'll work. Only issue is that if a _ isn't found then it's gonna set a string in position -1 to nothing, which doesn't really exist. A more ideal solution would probably be...
PHP Code:
? ??new name[MAX_PLAYER_NAME 1];
? ? GetPlayerName(playerid, name, MAX_PLAYER_NAME);
? ? if (strfind(name, "_", true) != -1) {
? ? ? ??name[strfind(name, "_", true)] = " ";
? ? ? ? SetPlayerName(playerid, name);
? ? }
Correct me if I'm wrong please. Sorry :)