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.

    SetPlayerSkin

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


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

    SetPlayerSkin Empty SetPlayerSkin

    Mensagem por Weslley_Script Ter 28 Mar 2023 - 11:13

    Description:
    Set the skin of a player. A player's skin is their character model.

    Parameters:
    Código:
    (playerid, skinid)
    playerid   The ID of the player to set the skin of.
    skinid   The skin the player should use.

    Return Values:
    1: The function executed successfully.
    0: The function failed to execute. This means the player specified does not exist.
    Note that 'success' is reported even when skin ID is invalid (not 0-311, or 74), but the skin will be set to ID 0 (CJ).

    Example Usage:

    Código:
    public OnPlayerCommandText(playerid, cmdtext[])
    {
        if(strcmp(cmdtext, "/fireman", true) == 0)
        {
            // Set the player's skin to ID 277, which is a fireman.
            SetPlayerSkin(playerid, 277);
            return 1;
        }
        return 0;
    }
    Código:
    stock SetPlayerSkinFix(playerid, skinid)
    {
       new
           Float:tmpPos[4],
          vehicleid = GetPlayerVehicleID(playerid),
          seatid = GetPlayerVehicleSeat(playerid);
       GetPlayerPos(playerid, tmpPos[0], tmpPos[1], tmpPos[2]);
       GetPlayerFacingAngle(playerid, tmpPos[3]);
       if(skinid < 0 || skinid > 299) return 0;
       if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
       {
           SetPlayerPos(playerid, tmpPos[0], tmpPos[1], tmpPos[2]);
          SetPlayerFacingAngle(playerid, tmpPos[3]);
          TogglePlayerControllable(playerid, 1); // preventing any freeze - optional
          return SetPlayerSkin(playerid, skinid);
       }
       else if(IsPlayerInAnyVehicle(playerid))
       {
           new
               tmp;
           RemovePlayerFromVehicle(playerid);
           SetPlayerPos(playerid, tmpPos[0], tmpPos[1], tmpPos[2]);
          SetPlayerFacingAngle(playerid, tmpPos[3]);
          TogglePlayerControllable(playerid, 1); // preventing any freeze - important - because of doing animations of exiting vehicle
          tmp = SetPlayerSkin(playerid, skinid);
          PutPlayerInVehicle(playerid, vehicleid, (seatid == 128) ? 0 : seatid);
          return tmp;
       }
       else
       {
           return SetPlayerSkin(playerid, skinid);
       }
    }

    Fonte: Wiki SA-MP



    SetPlayerSkin D07Xwqb
    SetPlayerSkin Yjab9HN

      Tópicos semelhantes

      -

      Data/hora atual: Sex 10 maio 2024 - 2:07