[Ajuda] me ajuda ai
#8

Vocк quer que o nick dele fique com o ip a frente durante toda a sessгo do jogador ou somente no chat?

Bem, caso seja a primeira opзгo, desenvolvi um cуdigo similar ao do Garfield, porйm otimizei com static e parenteses de retorno.

pawn Код:
public OnPlayerConnect(playerid)
{
    static
        pName[MAX_PLAYER_NAME],
        pIP[16],
        pString[50]
    ;
   
    format(pString, sizeof(pString), "[%s]-%s", (GetPlayerIp(playerid, pIP, 16), pIP), (GetPlayerName(playerid, pName, MAX_PLAYER_NAME), pName));
    SetPlayerName(playerid, pString);
    return 1;
}

Caso seja a segunda opзгo, desenvolvi um outro cуdigo, bem similar por sinal

pawn Код:
public OnPlayerText(playerid, text[])
{
    static
        pName[MAX_PLAYER_NAME],
        pIP[16],
        pString[128]
    ;

    format(pString, sizeof(pString), "[%s]-%s: %s", (GetPlayerIp(playerid, pIP, 16), pIP), (GetPlayerName(playerid, pName, MAX_PLAYER_NAME), pName), text);
    SendClientMessageToAll(0xFFFFFFFF, pString);
    return 0;
}
Reply


Messages In This Thread
me ajuda ai - by Natan_silva - 14.09.2012, 04:49
Re: me ajuda ai - by Nill.Oliveira - 14.09.2012, 05:08
Re: me ajuda ai - by Natan_silva - 14.09.2012, 05:27
Re: me ajuda ai - by zSuYaNw - 14.09.2012, 05:44
Re: me ajuda ai - by focaximubh - 14.09.2012, 05:50
Re: me ajuda ai - by zSuYaNw - 14.09.2012, 05:55
Re: me ajuda ai - by focaximubh - 14.09.2012, 06:01
Re: me ajuda ai - by Jason` - 14.09.2012, 06:14
Re: me ajuda ai - by zSuYaNw - 14.09.2012, 06:20
Re: me ajuda ai - by Jason` - 14.09.2012, 06:22

Forum Jump:


Users browsing this thread: 2 Guest(s)