How to remove the "_" from all the server messages
#4

pawn Код:
stock GetName(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;
}


// EXAMPLE

COMMAND:name(playerid, params[])
{
    new
        player, pMessage[100];
   
    if(sscanf(params, "u", player)) return SendClientMessage(playerid, -1, "Parameters: /name (playerid)");
   
    format(pMessage, sizeof(pMessage), "playername: %s", GetName(player));
    SendClientMessage(playerid, -1, pMessage);
   
    format(pMessage, sizeof(pMessage), "%s just checked your name.", GetName(playerid));
    SendClientMessage(player, -1, pMessage);
   
    return true;
}
Reply


Messages In This Thread
How to remove the "_" from all the server messages - by alanhutch - 24.07.2013, 21:19
Re : How to remove the "_" from all the server messages - by Matnix - 24.07.2013, 21:26
Re: Re : How to remove the "_" from all the server messages - by alanhutch - 24.07.2013, 21:28
Re: How to remove the "_" from all the server messages - by Boolean - 24.07.2013, 21:45
Re: How to remove the "_" from all the server messages - by alanhutch - 24.07.2013, 21:57
Re: How to remove the "_" from all the server messages - by alanhutch - 24.07.2013, 22:00

Forum Jump:


Users browsing this thread: 4 Guest(s)