3 problems...
#1

Hey!
I need some help...
1. When i come closer to NPC, it chases me and when it gets more closer me it attacks, but Animation is still running even i added to Timer SetFacing Functions to Kill timer Chase and Apply animation to fight...

Код:
if(IsPlayerNPC(npcid))
{
if(IsPlayerInRangeOfPoint(i,2,npcx,npcy,npcz))
{
timer2 = SetTimerEx("SetFacing", 1000, 1, "iff", npcid, AttackRadius, Accuracy);// It makes him attack me
}
if(IsPlayerInRangeOfPoint(i, 10, npcx, npcy, npcz))
{
timer1 = SetTimerEx("Chase",100,1,"i",npcid);// It makes him Chase
}
2. NPC runs very laggy... Maybe i need to set another time to timer?

Код:
if(IsPlayerNPC(npcid))
{
if(IsPlayerInRangeOfPoint(i,2,npcx,npcy,npcz))
{
timer2 = SetTimerEx("SetFacing", 1000, 1, "iff", npcid, AttackRadius, Accuracy);// It makes him attack me
}
if(IsPlayerInRangeOfPoint(i, 10, npcx, npcy, npcz))
{
timer1 = SetTimerEx("Chase",100,1,"i",npcid);// It makes him Chase
}
3. When i die from ,,NPC's hand" i die 2 times...

Код:
new Float:health;
   GetPlayerHealth(i, health);
   health -= 1.0;
   //if(health <= 0.0) health = 0.0;
   SetPlayerHealth(i, health);
Giving Reputation for answers!
Reply


Messages In This Thread
3 problems... - by lukas567 - 15.10.2011, 10:31
Re: 3 problems... - by TheLazySloth - 16.10.2011, 06:56

Forum Jump:


Users browsing this thread: 2 Guest(s)