Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FCNPC>
- new TestNPC;
- hook OnGameModeInit()
- {
- TestNPC = FCNPC_Create("polismen");
- FCNPC_Spawn(TestNPC, 280, 1558.0605, -1739.4417, 13.5469);
- FCNPC_SetHealth(TestNPC, 150.0);
- FCNPC_SetWeapon(TestNPC, 24);
- FCNPC_SetAmmo(TestNPC, 50);
- }
- public FCNPC_OnSpawn(npcid)
- {
- if(npcid == TestNPC) {
- FCNPC_SetHealth(TestNPC, 100.0);
- }
- }
- public FCNPC_OnTakeDamage(npcid, issuerid, Float:amount, weaponid, bodypart)
- {
- if(npcid == TestNPC) {
- FCNPC_AimAtPlayer(TestNPC, issuerid, true, -1, true, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- defer NPCStopShooting();
- }
- }
- public FCNPC_OnDeath(npcid, killerid, reason)
- {
- if(npcid == TestNPC) {
- defer NPCRespawn();
- }
- }
- timer NPCStopShooting[ 10000 ]()
- {
- FCNPC_StopAim(TestNPC);
- }
- timer NPCRespawn[ 10000 ]()
- {
- FCNPC_Respawn(TestNPC);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement