[npc]help
#1

how to change bots / NPC skin?
Reply
#2

Код:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid))
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); 
    if(!strcmp(npcname, "NPC NAME", true))
    {
			SetPlayerSkin(playerid, 'skinid');
			return 1;
    }
    return 1;
  }
 return 1;
}
Reply
#3

Код:
//Los Santos Mig_1
//------------------------------------------------------------------------------
#include <a_samp>
#include <a_npc>
//------------------------------------------------------------------------------
new Guard;
//------------------------------------------------------------------------------
public OnFilterScriptInit()
{
  print("LS Police Guard");
  ConnectNPC("[BOT]Mig_1","Mig_1");
  Guard = CreateVehicle(520, 0.0, 0.0, 5.0, 0.0, 0, 1, 5000);
  return 1;
}
//------------------------------------------------------------------------------
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC name.
    if(!strcmp(npcname, "[BOT]Mig_1", true)) //Checking if the NPC's name is [BOT]Mig_1
    {
      PutPlayerInVehicle(playerid, Guard, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, '70');
    }
    return 1;
  }
  return 1;
}
like this?
Reply
#4

pliz help
Reply
#5

change SetPlayerSkin(playerid, '70');

to

SetPlayerSkin(playerid, 70);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)