Setar Skin -
Mteck - 03.06.2013
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?
Re: Setar Skin -
Supera - 03.06.2013
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);
}
}
Re: Setar Skin -
Mteck - 03.06.2013
Da onde retirou isso? .-.
Re: Setar Skin -
PT - 03.06.2013
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.
Re: Setar Skin -
Lucas_Pawno - 03.06.2013
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..
Re: Setar Skin -
Mteck - 03.06.2013
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..
Re: Setar Skin -
Lucas_Pawno - 03.06.2013
Vocк quer Randomico mesmo entгo, й para zombies. ?
Re: Setar Skin -
Mteck - 03.06.2013
Sim, randфmico que digo sгo um comboio com skin diferentes tipo: 30 Zombies com 5 Skins diferenciadas.
Sim, sгo para Zombies.
Re: Setar Skin -
Lucas_Pawno - 03.06.2013
Use o metodo do PT, pois eu testei aqui com NPC's e deu certo.