my npc keep moving ? WTF ?
#1

https://www.youtube.com/watch?v=sVpHRDZQWUM

i'm simply using larp gamemode.

...

my code :


Код:
public OnPlayerConnect(playerid)
{
	if( IsPlayerNPC( playerid ) ) return 1;
}

public OnPlayerSpawn(playerid)
{
 	if(IsPlayerNPC(playerid))
	{
		gPlayerAccount[playerid] = 1;
		new nume[MAX_PLAYER_NAME];
		GetPlayerName(playerid,nume,sizeof(nume));
		if(!strcmp(nume,"[BOT]Tutorial1",false))
  		{
  		    TogglePlayerControllable(playerid, 0);
		    SetPlayerVirtualWorld(playerid, 95);
		    SetPlayerPos(playerid , 222.3193,115.0811,1010.2188);
		    SetPlayerFacingAngle( playerid, 177.3717 );
		    SetPlayerSkin(playerid,98);
		  	SetPlayerAttachedObject(playerid, 3,1210,5,0.3,0.1,0.0,0.0,270.0,0.0);
		}
		if(!strcmp(nume,"[BOT]Tutorial2",false))
		{
		    TogglePlayerControllable(playerid, 0);
		    SetPlayerVirtualWorld(playerid, 95);
		    SetPlayerPos(playerid , 221.5607,111.9919,1010.2118);
		    SetPlayerFacingAngle(playerid ,0.3366 );
		    SetPlayerSkin(playerid,281);
	    	SetPlayerAttachedObject(playerid, 1,19521,2,0.14,0,0,0,0,0,1,1.15,1.20);
		    SetPlayerAttachedObject(playerid, 3,19142,1,0.05,0.04,0,0,0,0,1.10,1.10,1.10);
		}
	    return 1;
	}
	
}

//------------------------------------------------------------------------------------------------------
public OnGameModeInit()
{


    new string[MAX_PLAYER_NAME];
    new string1[MAX_PLAYER_NAME];
	for(new c=0;c<CAR_AMOUNT;c++)
	{
		Gas[c] = GasMax;
	}
	ConnectNPC("[BOT]Tutorial1", "npcidle");
	ConnectNPC("[BOT]Tutorial2", "npcidle");
}
Reply
#2

Check this tutorial on NPC
https://sampforum.blast.hk/showthread.php?tid=170545
Reply
#3

UP , Please somebody who know what he is talking not just post hunting ?
Reply
#4

do you have npcidle in your npcmodes/recordings?if yes then when you are loading it,it will do the action that it was saved in that file.
Reply
#5

Well yes i do have it , and i want the npc just to keep idle ... to don't move.
Reply
#6

remove the npcidle.rec file and make a file at npcmodes and name it npcidle,it should be a .pwn file and put this in it:
pawn Код:
#include <a_npc>
main(){}
and compile
Reply
#7

I've tried this .. the same ' afk effect' [ in video you can see they're rotating for a sec ]


maybe is because im hosting the server in my windows ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)