NPC Skins??
#1

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;
  }
Reply
#2

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?
Reply
#3

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...
Reply
#4

use SetPlayerSpawnInfo
Reply
#5

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

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
Reply
#7

Now I get 2 CJs instead...
Reply
#8

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
Reply
#9

Solved...
Reply
#10

i need help on this too..

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


Forum Jump:


Users browsing this thread: 1 Guest(s)