29.03.2019, 16:21
Como faзo para o NPC passar um tempo com a animaзгo de morte (igual o personagem) antes de dar respawn?
Код:
forward FCNPC_OnDeath(npcid, killerid, reason); public FCNPC_OnDeath(npcid, killerid, reason) { if(killerid != INVALID_PLAYER_ID) { new Random = random(sizeof(ZPos)); FCNPC_SetWeapon(npcid,1); FCNPC_ApplyAnimation(npcid, "PED", "WALK_DRUNK", 4.1, 1, 1, 1, 0, 0); SetTimer("Timer", 40000, true); FCNPC_SetAmmo(npcid,1); FCNPC_SetPosition(npcid,ZPos[Random][0],ZPos[Random][1],ZPos[Random][2]); FCNPC_Respawn(npcid); } return 1; }