NPC Skins Help - 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 Help (
/showthread.php?tid=245107)
NPC At Character Selection Menu -
Placebo - 30.03.2011
Original problem fixed.. New question..
Is it possible to show NPC's at character selection menu? I connect the NPC's at game initialization, but they don't show until after one person spawns..
Re: NPC Skins Help -
TheYoungCapone - 30.03.2011
Onplayerspawn
Код:
new npcname[MAX_PLAYERS];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "YourNPCName", true))
{
SetPlayerSkin(playerid, 114);//whatever skin id u want
SetPlayerColor(playerid, COLOR_DBLUE)//whatever color u want
}
Re: NPC Skins Help -
Placebo - 30.03.2011
Quote:
Originally Posted by TheYoungCapone
Onplayerspawn
Код:
new npcname[MAX_PLAYERS];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "YourNPCName", true))
{
SetPlayerSkin(playerid, 114);//whatever skin id u want
SetPlayerColor(playerid, COLOR_DBLUE)//whatever color u want
}
|
Ah yeah, I realized I goofed up on the strcmp, and I have changed that, but both skins are still 105 (I don't set it as 105 anywhere).
Re: NPC Skins Help -
TheYoungCapone - 30.03.2011
Quote:
Originally Posted by Placebo
Ah yeah, I realized I goofed up on the strcmp, and I have changed that, but both skins are still 105 (I don't set it as 105 anywhere).
|
that code that i gave you works.
Re: NPC Skins Help -
Placebo - 30.03.2011
Quote:
Originally Posted by TheYoungCapone
that code that i gave you works.
|
Re: NPC Skins Help -
TheYoungCapone - 30.03.2011
why are you using it under onplayerconnect? use it under onplayerspawn.
Also you don't have to use If(IsPlayerNPC)
Re: NPC Skins Help -
Placebo - 30.03.2011
Quote:
Originally Posted by TheYoungCapone
why are you using it under onplayerconnect? use it under onplayerspawn.
Also you don't have to use If(IsPlayerNPC)
|
Oh, I figured if I could set it when the bots connect, that I don't have to worry about them later.. Also, I thought that the bots don't really 'spawn' lol.
I have moved it to OnPlayerSpawn, and it works.
If you don't mind, I have another question...
Is it possible to show NPC's at character selection menu?
Re: NPC Skins Help -
TheYoungCapone - 30.03.2011
Quote:
Originally Posted by Placebo
Oh, I figured if I could set it when the bots connect, that I don't have to worry about them later.. Also, I thought that the bots don't really 'spawn' lol.
I have moved it to OnPlayerSpawn, and it works.
If you don't mind, I have another question...
Is it possible to show NPC's at character selection menu?
|
Uhmm I'm not sure but I'd have to say no.