14.01.2015, 18:16
Hello,
I want to remove the underscores "_" from the player names.
How would I do that?
I have added this into my commands.pwn
How would I add that to my command?
greets
I want to remove the underscores "_" from the player names.
How would I do that?
I have added this into my commands.pwn
Код:
stock RemoveUnderScore(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}
Код:
if(!strcmp(cmdtext, "/me", true, 3))
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}

