NPC problem
#1

Hi everyone.
I created NPC without recording file with
Код:
public OnGameModeInit()
{
ConnectNPC("Player","idle");
return true;
}
When i'm setting up skin and position nothing is happening. NPC not appears in that position. By the way, position is good.
Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
	   if(playerid == GetPlayerID("Player"))
	   {
                 SetPlayerSkin(playerid, 180);
                 SetPlayerPos ( playerid, -1119.6813,-1058.2977,129.7554);
           }
}
return true;
}
Please, help
Reply
#2

Do you actually spawn the NPC? Also, why are you using GetPlayerID when you can use strcmp?

EDIT: This forum requires that you wait 240 seconds between posts. Please try again in 32 seconds.
Reply
#3

What is this non-sense?

if(playerid == GetPlayerID("Player"))
Reply
#4

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
What is this non-sense?

if(playerid == GetPlayerID("Player"))
i think what he meant was GetPlayerIDFromName.
Reply
#5

Why does 'SetPlayerPos' use? (For the NPC).
The NPC always will begin where you began the recording of this one.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)