25.09.2018, 09:40
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?
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[] = { 20005, 20006, 20007, 20008, 20009, 20012, 20013, 20014, 20015, 20016 };
public OnPlayerSpawn(playerid)
{
ApplyAnimation(playerid, "BOMBER", "null", 0, 0, 0, 0, 0, 1);
ApplyAnimation(playerid, "PED", "null", 0, 0, 0, 0, 0, 1);
if(IsPlayerNPC(playerid))
{
new spawn = random(sizeof(ZombieSpawns));
SetPlayerPos(playerid, ZombieSpawns[spawn][0], ZombieSpawns[spawn][1], ZombieSpawns[spawn][2]);
SetRNPCHealth(playerid, ZOMBIE_HEALTH);
SetPlayerSkin(playerid, ZSkins[random(12)]);
SetPlayerColor(playerid, ZOMBIE_COLOR);
RNPC_SetShootable(playerid, 1);
RNPC_ToggleVehicleCollisionCheck(playerid, 1);
GetZombieVictimID[playerid] = INVALID_PLAYER_ID;
return 1;
}