SA-MP Forums Archive
[HELP]NPC SKIN - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]NPC SKIN (/showthread.php?tid=309620)



[HELP]NPC SKIN - Tamao_Serizawa - 08.01.2012

How do i set my npc skin.??And i need a scripter for my server
But the important thing is skin for nPC!


Re: [HELP]NPC SKIN - Konstantinos - 08.01.2012

pawn Code:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "Bot_Name", true)) {
            SetPlayerSkin(playerid, 200); // <- The Skin here!
        }
        return 1;
    }
    //Other stuff for normal players goes here!
    return 1;
}



Re: [HELP]NPC SKIN - FarSe. - 08.01.2012

pawn Code:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new name[24];GetPlayerName(playerid,name,24);
        if(strcmp(name,"BOTNAME",true)!=0)
        {
            SetPlayerSkin(playerid, IDSKIN);
        }
    }
}
Too slow