03.08.2013, 16:33
PHP код:
OnGameModeInit:
NPC[0] = FCNPC_Create("Gun_Huyan");
FCNPC_Spawn(NPC[0],83, 1796.2704,-1147.6326,23.8229);
FCNPC_SetAngle(NPC[0],93.7959);
public FCNPC_OnTakeDamage(npcid, damagerid, weaponid)
{
new Float:pos[3];new Float:HA[3];
GetPlayerHealth(damagerid,HA[0]);
GetPlayerArmour(damagerid,HA[1]);
GetPlayerPos(damagerid,pos[0],pos[1],pos[2]);
FCNPC_AimAt(NPC[0],pos[0],pos[1],pos[2],1);
if(HA[0] < 30) FCNPC_StopAim(NPC[0]);
//if(FCNPC_GetHealth(NPC[0]) < 1) FCNPC_Kill(NPC[0]);
}
public FCNPC_OnSpawn(npcid)
{
FCNPC_SetHealth(NPC[0],100.0);
FCNPC_SetArmour(NPC[0],100.0);
FCNPC_SetWeapon(NPC[0],24);
FCNPC_SetAmmo(NPC[0],400);
}