How to set a specific NPC's skin?
#1

I want to add one demonic NPC at coordinate, with different skin from other NPC's and I don't want other NPC's to have his skin.

How can I do that?

PHP код:
new Float:ZombieSpawns[][] =
{
    {-
117.6339,1160.3606,19.5938,75.6100},
    {-
117.6339,1160.3606,19.5938,75.6100},
    {-
117.6339,1160.3606,19.5938,75.6100},
    {-
117.6339,1160.3606,19.5938,75.6100},
    {-
117.6339,1160.3606,19.5938,75.6100},
    {-
117.6339,1160.3606,19.5938,75.6100},
    {-
187.3822,1098.3834,19.5965,97.4476},
    {-
187.3822,1098.3834,19.5965,97.4476},
    {-
187.3822,1098.3834,19.5965,97.4476},
    {-
187.3822,1098.3834,19.5965,97.4476},
    {-
187.3822,1098.3834,19.5965,97.4476},
    {-
187.3822,1098.3834,19.5965,97.4476},
    {-
188.1270,1196.6998,19.5491,358.4333},
    {-
188.1270,1196.6998,19.5491,358.4333},
    {-
188.1270,1196.6998,19.5491,358.4333},
    {-
188.1270,1196.6998,19.5491,358.4333}
};
new 
ZSkins[] = { 20005200062000720008200092001220013200142001520016  };
public 
OnPlayerSpawn(playerid)
{
    
ApplyAnimation(playerid"BOMBER""null"000001);
    
ApplyAnimation(playerid"PED""null"000001);
    if(
IsPlayerNPC(playerid))
    {
            new 
spawn random(sizeof(ZombieSpawns));
            
SetPlayerPos(playeridZombieSpawns[spawn][0], ZombieSpawns[spawn][1], ZombieSpawns[spawn][2]);
            
SetRNPCHealth(playeridZOMBIE_HEALTH);
            
SetPlayerSkin(playeridZSkins[random(12)]);
            
SetPlayerColor(playeridZOMBIE_COLOR);
            
RNPC_SetShootable(playerid1);
            
RNPC_ToggleVehicleCollisionCheck(playerid1);
            
GetZombieVictimID[playerid] = INVALID_PLAYER_ID;
            return 
1;
    } 
Reply


Messages In This Thread
How to set a specific NPC's skin? - by Zeus666 - 25.09.2018, 09:40
Re: How to set a specific NPC's skin? - by Flamehaze7 - 25.09.2018, 11:33

Forum Jump:


Users browsing this thread: 1 Guest(s)