#10

pawn Код:
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's name.
    if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
    {
      SetPlayerSkin(playerid,put_the_skin_ID_here);
    }
    return 1;
  }
  //Other stuff for normal players goes here!
  return 1;
}
Example:

pawn Код:
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's name.
    if(!strcmp(npcname, "crusing", true)) //Checking if the NPC's name is MyFirstNPC
    {
      SetPlayerSkin(playerid,0);//CJ skin
    }
    return 1;
  }
  //Other stuff for normal players goes here!
  return 1;
}
Reply


Messages In This Thread
Bot - by cruising - 07.06.2011, 21:40
Re: Bot - by Stigg - 07.06.2011, 21:41
Re: Bot - by cruising - 07.06.2011, 22:32
Re: Bot - by Stigg - 07.06.2011, 22:35
Re: Bot - by cruising - 08.06.2011, 00:10
Re: Bot - by Tee - 08.06.2011, 00:16
Re: Bot - by cruising - 08.06.2011, 00:42
Re: Bot - by Tee - 08.06.2011, 00:46
Re: Bot - by cruising - 08.06.2011, 00:50
Re: Bot - by Tee - 08.06.2011, 01:06

Forum Jump:


Users browsing this thread: 2 Guest(s)