I made this stock to loop spawn my npc's using hlsdk as a guide
PHP Code:
stock Stock_ZbsSpawns(const szTargetName[])
{
new iEnt = -1;
while((iEnt = find_ent_by_tname(iEnt, szTargetName)) > 0)
{
if(g_SpawnCount >= sizeof g_spawns)
break;
entity_get_vector(iEnt, EV_VEC_origin, g_vOriginSp)
g_spawns[g_SpawnCount][0] = g_vOriginSp[0];
g_spawns[g_SpawnCount][1] = g_vOriginSp[1];
g_spawns[g_SpawnCount][2] = g_vOriginSp[2];
g_SpawnCount++;
}
}
The problem is that's as far as my understanding goes ._.
what I really want to do is to set the spawn coordinates of the npc through a cfg.
like this
PHP Code:
new szFile[ 128 ], szMap[ 32 ];
get_configsdir( szFile, charsmax( szFile ) );
get_mapname( szMap, charsmax( szMap ) );
format( szFile, charsmax( szFile ), "%s/csdm/%s.spawns.cfg", szFile, szMap );
thank you very much for your response