SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

Participe do fórum, é rápido e fácil

SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

SSGamers - 12 Anos online por você.

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Chegou o novo tema 6.5.5 - SSGamers - Servidores online de qualidade - Aproveite e entre para nossa comunidade, inscreva-se já! - Ouça nossa web radio - Veja nossas novidades - Participe dos nossos setores de jogos online - Parcerias aberta fale já com um administrador.

    Get a player's name.

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


    Steam Steam : WeslleySSGames
    Zello : WeslleySSGames
    Mensagens : 11378
    Moedas : 1031977
    Data de inscrição : 06/10/2011
    Idade : 28
    Localização : Brasil

    Get a player's name. Empty Get a player's name.

    Mensagem por Weslley_Script Qua 22 Mar 2023 - 11:52

    Description:
    Get a player's name.

    Parameters:
    (playerid, name[], len)





    playeridThe ID of the player to get the name of.



    name[]An array into which to store the name, passed by reference.



    lenThe length of the string that should be stored. Recommended to be MAX_PLAYER_NAME + 1. The + 1 is necessary to account for the null terminator.

    Return Values:

    The length of the player's name. 0 if player specified doesn't exist.

    • The player's name is stored in the specified array.


    Exemplo usado:
    Código:
    public OnPlayerConnect(playerid)
    {
        // Get the name of the player that connected and display a join message to other players
     
        new name[MAX_PLAYER_NAME + 1];
        GetPlayerName(playerid, name, sizeof(name));
     
        new string[MAX_PLAYER_NAME + 23 + 1];
        format(string, sizeof(string), "%s has joined the server.", name);
        SendClientMessageToAll(0xC4C4C4FF, string);
     
        return 1;
    }

    Fonte: Wiki sa-mp



    Get a player's name. D07Xwqb
    Get a player's name. Yjab9HN

      Data/hora atual: Qua 8 maio 2024 - 18:30