27.06.2011, 12:21
How can i make an npc follow you and attck you??
plz send me the script
plz send me the script
but one problem where do i paste this?
if(strcmp("/npc", cmdtext, true, 10) == 0) { SetNPCFollowPlayer(50, playerid); return 1; } |
public OnGameModeInit()
{
ZMap_Init("SAfull.hmap");
CreateNPC(50,"Leatherface"); // create the npc
SetSpawnInfo(50,0,28,x,y,z, a,0,0,0,0,0,0); // set his spawn info
SpawnNPC(50); // spawn him
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/npc", cmdtext, true, 10) == 0)
{
SetNPCFollowPlayer(50, playerid);
return 1;
}
return 0;
}