[UNSOLVED] How do I set skins for the Npcs ?
#1

I tried lots of things but skin is still the same
Please help
Reply
#2

if(!strcmp(npcname, "bot", true))
{
SetPlayerSkin(playerid, 250);
}
Reply
#3

Quote:
Originally Posted by actiwe
if(!strcmp(npcname, "bot", true))
{
SetPlayerSkin(playerid, 250);
}
I tried that but skin never changes and where do I put it ? My old one I putted onplayerconnect and onplayerspawn
Reply
#4

I think you can do it like this:

Код:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid))
  {
    SetPlayerSkin(playerid, 250);
  }
}
Reply
#5

Quote:
Originally Posted by mansonh
I think you can do it like this:

Код:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid))
  {
    SetPlayerSkin(playerid, 250);
  }
}
I have 3 more Npcs they works fine but this one skin dosen't even change.
Reply
#6

Did you add the skin into your game mode?
Reply
#7

thats most likely cuz of the name, make sure the name is the same u wrote in the bot script!
Reply
#8

Quote:
Originally Posted by aNdReSkKkK
thats most likely cuz of the name, make sure the name is the same u wrote in the bot script!
Names are exactly same and other function like PutPlayerInVehicle works just fine, although however
skin and other functions are not getting to be set.
Reply
#9

well i have this and they load the skin, maybe check urs?

Код:
public OnGameModeInit()
{

  ConnectNPC("[NPC]Juan","FarmGuard");
Код:
public OnPlayerSpawn(playerid)
{

	if(IsPlayerNPC(playerid)) //Checks if player is NPC.
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //
    if(!strcmp(npcname, "[NPC]Juan", true)) /
    {
      GivePlayerWeapon(playerid,32,500); // M4
      SetPlayerSkin(playerid,30); // Skin Latino
      PlayerInfo[playerid][team] = CIVILIAN;
    }
  return 1;
  } // end of NPC Check

// then the rest of player spawn thing for regular players
this to avoid my real player skin things and stuff
Reply
#10

Maybey i am looking at it wrong but to me it looks like there is a } missing.

[Doppeyy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)