15.10.2011, 10:31
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...
2. NPC runs very laggy... Maybe i need to set another time to timer?
3. When i die from ,,NPC's hand" i die 2 times...
Giving Reputation for answers!
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 }
Код:
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 }
Код:
new Float:health; GetPlayerHealth(i, health); health -= 1.0; //if(health <= 0.0) health = 0.0; SetPlayerHealth(i, health);