[Duda] їPara que sirve esto?
#1

Hola, estaba viendo y me vino esta duda, para que sirve agregarle '22 + [MAX_PLAYER_NAME]', para que sirve el '22 +'

pawn Код:
public OnPlayerConnect(playerid)
{
    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s has joined the server", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
    return 1;
}
Gracias de antemano.
Reply
#2

22 + MAX_PLAYER_NAME = 22 + 24, MAX_PLAYER_NAME es por defecto 24 por lo que lo definiу asн para usar 22 caracteres para lo que pondrнa como " has joined the server", y los otro 24 para el nombre (%s)
Reply
#3

Ahhhh!! Muchas gracias tu siempre ayudando :')
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)