Remove "_" from playernames.
#1

Hello,
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;
}
How would I add that to my command?
Код:
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;
	}
greets
Reply
#2

Read this: https://sampforum.blast.hk/showthread.php?tid=336052
Removing "_" from names and /me cmd included in the link above.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)