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=490302)
NPC problem -
marwanalramahi - 26.01.2014
I've been trying to add an idle npc and first it always got kicked and when i fixed it now he joins and stays but he is like air there is no skin or anything here is the OnPlayerSpawn code:
Код:
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(strcmp(npcname, "Idle", true))
{
SetPlayerSkin(playerid, 44);
SetPlayerPos(playerid,308.2357,-143.1079,999.6016);
SetPlayerFacingAngle(playerid, 360);
return 1;
}
return 1;
}
Thanks in advance and who ever help me will get +rep.
Re: NPC problem -
McBan - 26.01.2014
Код:
SetPlayerPos(playerid, 308.2357, -143.1079, 999.6016);
SetPlayerFacingAngle(playerid, 90);
Re: NPC problem -
Yashas - 26.01.2014
It is supposed to be !strcmp not strcmp
Try it!
Re: NPC problem -
marwanalramahi - 27.01.2014
Guys the problem isn't in joining it joins and in place when i do /goto i go to the pos above but he is like air there is no body there.
Re: NPC problem -
marwanalramahi - 28.01.2014
Anyone knows what to do ?