NPC skins
#1

I added few npcs but the skins are always same for everyone.

Код:
    if(IsPlayerNPC(playerid))
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname,"Firstnpc",true))
        {
            SetPlayerSkin(playerid, 121);
        }
		if(!strcmp(npcname,"Secondnpc",true))
		{
		    SetPlayerSkin(playerid, 110);
		}
		if(!strcmp(npcname,"Thirdnpc",true))
		{
		    SetPlayerSkin(playerid, 111);
		}
    }
I already tried with else if(
Reply
#2

Stupid Question but which skin do they spawn with from that list?
Reply
#3

Skin ID:1
Reply
#4

Well the codes fine... is there anything above or below that which is forcing the skin to change a second time. If there is a problem with the code you've shown I cant see it :/
Reply
#5

The only thing that could possible bug it is this
Код:
	for(new i = 1; i < 287; i++)
	{
	    AddPlayerClass(i, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); 
	}
It's under my gamemodeinit (for the class skin selection all skins)


Also when I added only 1 line of code it worked perfectly, but when I added for other npc's then it got screwed up
Reply
#6

That shouldn't affect your NPCs unless your forcng them through a class selection which you dont seem to be... Check if you are by placing SpawnPlayer(playerid); under the NPC skin setting... other than that I dont know... Sorry :/
Reply
#7

No problems mate, thanks for atleast trying to help me +rep to you too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)