14.09.2014, 13:45
(
Последний раз редактировалось blewert; 17.09.2014 в 11:11.
)
Quote:
Its work !!! @Madd92
But i want pawn Код:
|
Quote:
Originally Posted by https://sampwiki.blast.hk/wiki/SetPlayerName
- Changing the player's name to the same name but with different character cases (e.g. "John" to "JOHN") will not work.
|
pawn Код:
stock ChangePlayerName(playerid)
{
new name[MAX_PLAYER_NAME], i;
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
while (name[i] != EOS)
{
if (i == 0 || name[i - 1] == '_')
name[i] = toupper(name[i]);
else if (name[i] != '_')
name[i] = tolower(name[i]);
i++;
}
printf("%s", name);
new tempName[MAX_PLAYER_NAME];
format(tempName, sizeof tempName, "%s_", name);
SetPlayerName(playerid, tempName);
SetPlayerName(playerid, name);
return 1;
}
Also, take note of this from the wiki page:
Quote:
Originally Posted by https://sampwiki.blast.hk/wiki/SetPlayerName
- If used in OnPlayerConnect, the new name will not be shown for the connecting player.
|