[Ajuda] Setar Skin
#1

Tipo, isso sу vai setar 5 skin pra 5 NPC? ou vai ser pra todos?
pawn Код:
if(IsPlayerNPC(playerid)) {
    static skin;
    switch(skin) {
        case 0: {
            SetPlayerSkin(playerid, 77);
        }
        case 1: {
            SetPlayerSkin(playerid, 160);
        }
        case 2: {
            SetPlayerSkin(playerid, 79);
        }
        case 3: {
            SetPlayerSkin(playerid, 159);
        }
        case 4: {
            SetPlayerSkin(playerid, 162);
        }
    }
    skin++;
Caso nгo seja eu terei que setar o tanto de skin pra cada Slot dos npcs?
Reply
#2

pawn Код:
if(IsPlayerNPC(playerid))
{
    static Nome_Npc[24];
    GetPlayerName(playerid, Nome_Npc, sizeof(Nome_Npc));
    if(!strcmp(Nome_Npc,"Nome1",false)) // Nome do npc
    {
        SetPlayerSkin(playerid, 100);  // Skin
    }
    if(!strcmp(Nome_Npc,"Nome2",false))
    {
        SetPlayerSkin(playerid, 103);
    }
    if(!strcmp(Nome_Npc,"Nome3",false))
    {
        SetPlayerSkin(playerid, 106);
    }
}
Reply
#3

Da onde retirou isso? .-.
Reply
#4

Podias tentar algo desde genero;

pawn Код:
new skins[] =
{
    77,
    160,
    79,
    159,
    162
};

if(IsPlayerNPC(playerid))
{
    static skin;
    switch(skin)
    {
        SetPlayerSkin(playerid, skins[random(sizeof(skins))]);
    }
}
@ nao sei se esta correto assim, pois nao testei, mas deu para entender a ideia, eu acho, desculpa la.
Reply
#5

Quote:
Originally Posted by Supera
Посмотреть сообщение
pawn Код:
if(IsPlayerNPC(playerid))
{
    static Nome_Npc[24];
    GetPlayerName(playerid, Nome_Npc, sizeof(Nome_Npc));
    if(!strcmp(Nome_Npc,"Nome1",false)) // Nome do npc
    {
        SetPlayerSkin(playerid, 100);  // Skin
    }
    if(!strcmp(Nome_Npc,"Nome2",false))
    {
        SetPlayerSkin(playerid, 103);
    }
    if(!strcmp(Nome_Npc,"Nome3",false))
    {
        SetPlayerSkin(playerid, 106);
    }
}
Este estб mais correto que os outros, pois esse nгo й randфmico igual o do nosso amigo ali emcima..
Reply
#6

Da forma que coloquei deu certo, porйm demora um pouco questгo de 40 segundos atй eu dar uma volta pela LS e avistar as novas skins nos zombies..
Reply
#7

Vocк quer Randomico mesmo entгo, й para zombies. ?
Reply
#8

Sim, randфmico que digo sгo um comboio com skin diferentes tipo: 30 Zombies com 5 Skins diferenciadas.
Sim, sгo para Zombies.
Reply
#9

Use o metodo do PT, pois eu testei aqui com NPC's e deu certo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)