View Single Post
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 10-07-2020 , 15:32   Re: [CS] Halloween Mod (ReAPI Support)
Reply With Quote #178

Quote:
Originally Posted by RaZ_HU View Post
Hi!

Can I place the required entities on maps without editing them (spawn them by AMXX)?
I have some map ideas, but I have no knowledge in mapping (also I can't find source for those maps)
You can use the Custom Entities API, which is already included in the Halloween Mod:
https://forums.alliedmods.net/showthread.php?p=2467312

List of the mod entities: https://github.com/Hedgefog/cs-hallo...ities/index.md

Example:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <api_custom_entities>

public plugin_init()
{
  
register_plugin("PLUGIN""VERSION""AUTHOR");
  
SpawnGhost(Float:{ 0.00.00.0});
}

public 
SpawnGhost(const Float:vOrigin[3])
{
  new 
temp true;
  new 
ent CE_Create("hwn_npc_ghost"vOrigintemp);
  
dllfunc(DLLFunc_Spawnent);

To remove entity use
PHP Code:
CE_Remove(ent
You can also use the "ce_spawn entity_name" admin console command to spawn a specific entity on the origin you are located.
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 10-07-2020 at 15:45.
Hedgehog Fog is offline