auto capitalize function
#1

anyway has auto capitalize fuction of player name. so.. when he joins james_bond he gets changed to James_Bond
Reply
#2

BUMP.
Reply
#3

This post is on this page:
http://forum.sa-mp.com/index.php?top...4653#msg794653
Reply
#4

Код:
new gname[MAX_PLAYER_NAME];
GetPlayerName(playerid,gname,sizeof gname);
toupper(gname[0]);
SetPlayerName(playerid,gname);
Reply
#5

This will not work. Functions tolower and toupper only return the character...
You can try this. Is it what you want?

pawn Код:
public OnPlayerConnect(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
Name[0] = toupper(Name[0]);
Name[strfind(Name, "_", true) + 1] = toupper(Name[strfind(Name, "_", true) + 1]);
SetPlayerName(playerid, Name);
return true;
}
Reply
#6

Sorry i forget that toupper returns it, before i thought that it Change the Char ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)