SA-MP Forums Archive
NPC Skins?? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC Skins?? (/showthread.php?tid=105115)



NPC Skins?? - introzen - 27.10.2009

I've tried to change the skin on my NPC but when i do so, it spawn 2 times...

pawn Код:
if(IsPlayerNPC(playerid))
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "cop_1", true))
    {
      SetPlayerSkin(playerid,281);
    }
    return 1;
  }



Re: NPC Skins?? - Luka P. - 27.10.2009

Quote:
Originally Posted by IntrozeN
I've tried to change the skin on my NPC but when i do so, it spawn 2 times...

pawn Код:
if(IsPlayerNPC(playerid))
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "cop_1", true))
    {
      SetPlayerSkin(playerid,281);
    }
    return 1;
  }
Where did you put that code? OnPlayerSpawn,Connect?


Re: NPC Skins?? - introzen - 27.10.2009

Quote:
Originally Posted by Luka™
Quote:
Originally Posted by IntrozeN
I've tried to change the skin on my NPC but when i do so, it spawn 2 times...

pawn Код:
if(IsPlayerNPC(playerid))
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "cop_1", true))
    {
      SetPlayerSkin(playerid,281);
    }
    return 1;
  }
Where did you put that code? OnPlayerSpawn,Connect?
OnPlayerSpawn...


Re: NPC Skins?? - Pawno_Master - 27.10.2009

use SetPlayerSpawnInfo


Re: NPC Skins?? - introzen - 27.10.2009

Quote:
Originally Posted by ekeleke
use SetPlayerSpawnInfo
Not I or Samp Wiki has heard of that function?


Re: NPC Skins?? - Pawno_Master - 27.10.2009

i mean SetSpawnInfo

Код:
SetSpawnInfo( playerid, 0, 107, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
in that code 107 = the skin ID do not mind the other numbers just change the 107 to the wanted skinid


Re: NPC Skins?? - introzen - 27.10.2009

Now I get 2 CJs instead...


Re: NPC Skins?? - AKA_Cross - 27.10.2009

Quote:
Originally Posted by IntrozeN
Quote:
Originally Posted by ekeleke
use SetPlayerSpawnInfo
Not I or Samp Wiki has heard of that function?
you sure about that?

https://sampwiki.blast.hk/wiki/SetSpawnInfo


Re: NPC Skins?? - introzen - 27.10.2009

Solved...


Re: NPC Skins?? - GaGlets(R) - 27.10.2009

i need help on this too..

Setspawninf is only for NPCs witch are walking.. but for drivers i dont know how to put..