View Single Post
Author Message
Junior Member
Join Date: Apr 2021
Old 05-05-2022 , 04:04   [ZP][TUT] Bots can break sandbag and attack npc boss
Reply With Quote #1

1. add into plugin
#include <sypb>
2. add into plugin "sypb_set_entity_action (index, team, action)"

index: Entity id
-1 is del all entity action
team: Entity Team
0 = No Team, 1 = TR, 2 = CT
action: Bot Action
1 = Enemy, Bot Will Attack Entity
(Work on Different teams, eg TR bot attack No Team and CT Team Entity)
2 = Avoid, Bot Will Avoid Entity (eg, avoid hegrenade)
(Work on Different teams, eg TR bot Avoid No Team and CT Team Entity)
3 = Move, Bot Will Move To Entity (eg, move to and pickup the weapon)
(Work on Same teams, eg TR bot Move To No Team and TR Team Entity)
-1 is del the entity action

Exampe sandbag:

public place_palletwbags(id) 
	new EXAMPLE = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_wall")); 
	set_pev(EXAMPLE ,pev_classname,"amxx_pallets"); 
	sypb_set_entity_action(EXAMPLE , 1, 1) // bots can attack sandbag

Example alien boss:

public Game_Start()
		engfunc(EngFunc_RemoveEntity, Alien_Ent)
	static Alien; Alien = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
	sypb_set_entity_action(Alien, 0, 1)  // bots can attack alien boss

3. Sypb links:

HTML Code:
4.Sypb useful codes

0:Normal 1:Deathmatch 2:Zombie plague 3:NPC Boss 4:ZH
sypb_gamemode 2
Attached Files
File Type: sma Get Plugin or Get Source (zpl_boss_alien.sma - 25 views - 40.1 KB)
File Type: sma Get Plugin or Get Source (zp_extra_sandbags.sma - 22 views - 28.2 KB)
theqramboq is offline