NPC Skins Help
#1

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

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

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

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

Quote:
Originally Posted by TheYoungCapone
Посмотреть сообщение
that code that i gave you works.

Reply
#6

why are you using it under onplayerconnect? use it under onplayerspawn.
Also you don't have to use If(IsPlayerNPC)
Reply
#7

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)