NPC problem - 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)
+--- Thread: NPC problem (
/showthread.php?tid=476449)
NPC problem -
Heater - 18.11.2013
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
Re: NPC problem -
Isolated - 18.11.2013
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.
Re: NPC problem -
Pottus - 18.11.2013
What is this non-sense?
if(playerid == GetPlayerID("Player"))
Re: NPC problem -
[D]ry[D]esert - 18.11.2013
Quote:
Originally Posted by [uL]Pottus
What is this non-sense?
if(playerid == GetPlayerID("Player"))
|
i think what he meant was GetPlayerIDFromName.
Respuesta: NPC problem -
Swedky - 18.11.2013
Why does 'SetPlayerPos' use? (For the NPC).
The NPC always will begin where you began the recording of this one.