Question?
#1

_ hidden in as chat?
Reply
#2

what's your question?
Reply
#3

You should rephrase your question because it doesn't make sense buddy.
Reply
#4

I made ​​my server but I want to be just firstname_lastname I write in chat does not appear to occur only _ no _ LastName Firstname
sorry for my bad english i ussing ****** translate
Reply
#5

Okay, so you need a function which removes the underscore from a role play name properly? That's easy...

pawn Код:
stock GetNameEx(playerid)
{
    new str[24], String[128];
    GetPlayerName(playerid, String, 24);
    strmid(str, String, 0, strlen(String), 24);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if (str[i] == '_') str[i] = ' ';
    }
    return str;
}
Reply
#6

I added this but will not erase _ in chat: (
Reply
#7

Quote:
Originally Posted by GeonMake
Посмотреть сообщение
I added this but will not erase _ in chat: (
Adding this does absolutely nothing. Adding it and using the function will remove the underscore (i.e. you can't use "SendPlayerMessage" because it doesn't know you want to remove the underscore).
Reply
#8

So that adds functionality to the end and after the gamemode should add?
Reply
#9

Put that at the end:

pawn Код:
stock GetNameEx(playerid)
{
    new str[24], String[128];
    GetPlayerName(playerid, String, 24);
    strmid(str, String, 0, strlen(String), 24);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if (str[i] == '_') str[i] = ' ';
    }
    return str;
}
and that under OnPlayerText

pawn Код:
new name[24];
name = GetNameEx(playerid);
new string[128];
format(string,sizeof(string),"%s: {FFFFFF}%s", name, text);
return SendClientMessageToAll(GetPlayerColor(playerid), string), 0;
Reply
#10

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
Put that at the end:

pawn Код:
stock GetNameEx(playerid)
{
    new str[24], String[128];
    GetPlayerName(playerid, String, 24);
    strmid(str, String, 0, strlen(String), 24);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if (str[i] == '_') str[i] = ' ';
    }
    return str;
}
and that under OnPlayerText

pawn Код:
new name[24];
name = GetNameEx(playerid);
new string[128];
format(string,sizeof(string),"%s: {FFFFFF}%s", name, text);
return SendClientMessageToAll(GetPlayerColor(playerid), string), 0;
Thanks goes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)