[UNSOLVED] How do I set skins for the Npcs ? -
Hijolion - 04.02.2010
I tried lots of things but skin is still the same

Please help
Re: [UNSOLVED] How do I set skins for the Npcs ? -
actiwe - 04.02.2010
if(!strcmp(npcname, "bot", true))
{
SetPlayerSkin(playerid, 250);
}
Re: [UNSOLVED] How do I set skins for the Npcs ? -
Hijolion - 04.02.2010
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
Re: [UNSOLVED] How do I set skins for the Npcs ? -
mansonh - 04.02.2010
I think you can do it like this:
Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
SetPlayerSkin(playerid, 250);
}
}
Re: [UNSOLVED] How do I set skins for the Npcs ? -
Hijolion - 04.02.2010
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.
Re: [UNSOLVED] How do I set skins for the Npcs ? -
mansonh - 04.02.2010
Did you add the skin into your game mode?
Re: [UNSOLVED] How do I set skins for the Npcs ? -
aNdReSkKkK - 05.02.2010
thats most likely cuz of the name, make sure the name is the same u wrote in the bot script!
Re: [UNSOLVED] How do I set skins for the Npcs ? -
Hijolion - 05.02.2010
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.
Re: [UNSOLVED] How do I set skins for the Npcs ? -
aNdReSkKkK - 05.02.2010
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
Re: [UNSOLVED] How do I set skins for the Npcs ? -
Doppeyy - 05.02.2010
Maybey i am looking at it wrong but to me it looks like there is a } missing.
[Doppeyy