Idle NPC.
#1

Hi, i wanted to make a NPC which stands in a certain place holding a weapon and does no movement, i didnt see any tutorials regarding idle npcs , so if you guys know any Tutorials or if you can suggest me how to do it, i would appreciate that.
Thanks in advance.
Reply
#2

Did you try to record it idle for 2-3 seconds? I think it should work, not sure tho.
Reply
#3

Fixed.
Reply
#4

use this in your OnGameModeInit:
PHP код:
ConnectNPC("MyNPC" "npcidle"); // npcidle means you should have a .pwn file in your npcmodes 
// you can find it in samp server files that uploaded in samp site 
then use this in OnPlayerConnect:
PHP код:
if(IsPlayerNPC(playerid) return 1
And use this in OnPlayerRequestClass:
PHP код:
if(IsPlayerNPC(playerid) return SpawnPlayer(playerid); 
And Finally use this in OnPlayerSpawn:
PHP код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid pName sizeof(pName));

if(!
strcmp(playername,"Taxi1",true))
{
     
SetPlayerPos(playerid ,,z);
     
SetPlayerFacingAngle(playerid angle);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)