[Ajuda] Ajuda com o format
#2

PHP Code:
#define COLOR_ACTION 0xDA70D6FF
SendClientActionMessage(playeridFloat:radiusaction[])
{
    new 
Float:fDist[3], message[145];
    
GetPlayerPos(playeridfDist[0], fDist[1], fDist[2]);
    
format(messagesizeof(message), "* %s %s"GetUserName(playerid), action);
    foreach(new 
iPlayer)
    {
        if(
GetPlayerDistanceFromPoint(ifDist[0], fDist[1], fDist[2]) <= radius && GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
        {
            
SendClientMessage(iCOLOR_ACTIONmessage);
        }
    }
}
stock GetUserName(playerid)
{
    new 
pnome[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpnomesizeof(pnome));
    return 
pnome;

Exemplo:

PHP Code:
SendClientActionMessage(playerid15.0"equipou o seu kit-socio nivel 1."); 
Reply


Messages In This Thread
Ajuda com o format - by BrunoSayden177 - 07.12.2018, 20:35
Re: Ajuda com o format - by NelsonC - 07.12.2018, 20:45
Re: Ajuda com o format - by BrunoSayden177 - 07.12.2018, 20:50

Forum Jump:


Users browsing this thread: 1 Guest(s)