Thread: CSDM spawn vote
View Single Post
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 09-26-2009 , 15:55   Re: CSDM spawn vote
Reply With Quote #7

Code:
static cell AMX_NATIVE_CALL csdm_setstyle(AMX *amx, cell *params)
{
	int len;
	char *name = MF_GetAmxString(amx, params[1], 0, &len);

	if (strcmp(name, "none") == 0)
	{
		g_SpawnMethod = -1;
		return 1;
	}

	SpawnMethod *pSpawn = NULL;

	for (size_t i=0; i<g_SpawnMngr.Spawns(); i++)
	{
		pSpawn = g_SpawnMngr.GetSpawn(i);
		if (strcmpi(pSpawn->GetName(), name) == 0)
		{
			g_SpawnMethod = i;
			return 1;
		}
	}

	return 0;
}
The value the function returns is "1" for each defined spawn method, "0" - if the spawn method is not defined. It looks like with that function You can probably somehow modify the spawn method from external plugin (but it needs csdm.inc for compilation), but every map change the method will be changed back to that what You have defined in csdm.cfg.
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline