15.03.2015, 12:19
Here's my code:
Whenever I go in-game, instead of my name which was "Denis_Test" at that time, it showed 68. Might I know what is the problem here?
Код:
stock GetPlayerNameEx(playerid) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strfind(pName, "_", true)) {
strreplace(pName, "_", " ");
}
return pName;
}
public OnPlayerText(playerid, text[]) {
new string[128];
format(string, sizeof(string), "%d says: %s", GetPlayerNameEx(playerid), text);
SendClientMessage(playerid, L_RED_COLOR, string);
}

