• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MF_GetAmxAddr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MF_GetAmxAddr函数的典型用法代码示例。如果您正苦于以下问题:C++ MF_GetAmxAddr函数的具体用法?C++ MF_GetAmxAddr怎么用?C++ MF_GetAmxAddr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MF_GetAmxAddr函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: get_stats

static cell AMX_NATIVE_CALL get_stats(AMX *amx, cell *params) /* 7 param */
{
	
	int index = params[1] + 1;

	for(RankSystem::iterator a = g_rank.front(); a ;--a){
		if ((*a).getPosition() == index)  {
			cell *cpStats = MF_GetAmxAddr(amx,params[2]);
			cell *cpBodyHits = MF_GetAmxAddr(amx,params[3]);
			cpStats[0] = (*a).kills;
			cpStats[1] = (*a).deaths;
			cpStats[2] = (*a).hs;
			cpStats[3] = (*a).tks;
			cpStats[4] = (*a).shots;
			cpStats[5] = (*a).hits;
			cpStats[6] = (*a).damage;

			cpStats[7] = (*a).getPosition();

			MF_SetAmxString(amx,params[4],(*a).getName(),params[5]);
			if (params[6] > 0)
				MF_SetAmxString(amx, params[6], (*a).getUnique(), params[7]);
			for(int i = 1; i < 8; ++i)
				cpBodyHits[i] = (*a).bodyHits[i];
			return --a ? index : 0;
		}	
	}
	
	return 0;
}
开发者ID:fysiks1,项目名称:amxmodx,代码行数:30,代码来源:rank.cpp


示例2: Call_Int_Vector_Cbase

cell Call_Int_Vector_Cbase(AMX *amx, cell *params)
{
	SETUP(2);

	Vector v3;
	float *fl3=(float *)MF_GetAmxAddr(amx, params[3]);
	v3.x=fl3[0];
	v3.y=fl3[1];
	v3.z=fl3[2];

	int id4=*MF_GetAmxAddr(amx, params[4]);
	CHECK_ENTITY(id4);
	void *p4=IndexToPrivate(id4);

#if defined(_WIN32)
	int ret=reinterpret_cast<int (__fastcall *)(void *, int, Vector, void*)>(__func)(pv, 0, v3, p4);
#elif defined(__linux__) || defined(__APPLE__)
	int ret=reinterpret_cast<int (*)(void *, Vector, void*)>(__func)(pv, v3, p4);
#endif

	fl3[0]=v3.x;
	fl3[1]=v3.y;
	fl3[2]=v3.z;

	return ret;
}
开发者ID:reuben,项目名称:amxmodx,代码行数:26,代码来源:call_funcs.cpp


示例3: Call_Int_Cbase_pVector

cell Call_Int_Cbase_pVector(AMX *amx, cell *params)
{
	SETUP(2);

	int id3=*MF_GetAmxAddr(amx, params[3]);
	CHECK_ENTITY(id3);
	void *pv1=(INDEXENT_NEW(id3)->pvPrivateData);

	Vector v4;
	float *fl4=(float *)MF_GetAmxAddr(amx, params[4]);
	v4.x=fl4[0];
	v4.y=fl4[1];
	v4.z=fl4[2];

#if defined(_WIN32)
	int ret = reinterpret_cast<int (__fastcall *)(void*, int, void *, Vector *)>(__func)(pv, 0, pv1, &v4);
#elif defined(__linux__) || defined(__APPLE__)
	int ret = reinterpret_cast<int (*)(void *, void *, Vector *)>(__func)(pv, pv1, &v4);
#endif

	fl4[0]=v4.x;
	fl4[1]=v4.y;
	fl4[2]=v4.z;

	return ret;
}
开发者ID:reuben,项目名称:amxmodx,代码行数:26,代码来源:call_funcs.cpp


示例4: Call_Void_Cbase_pVector_Float

cell Call_Void_Cbase_pVector_Float(AMX *amx, cell *params)
{
	SETUP(3);

	int id3=*MF_GetAmxAddr(amx, params[3]);
	CHECK_ENTITY(id3);

	void *i3=IndexToPrivate(id3);

	Vector v4;
	float *fl4=(float *)MF_GetAmxAddr(amx, params[4]);
	v4.x=fl4[0];
	v4.y=fl4[1];
	v4.z=fl4[2];

	float f5=amx_ctof2(*MF_GetAmxAddr(amx, params[5]));

#if defined(_WIN32)
	reinterpret_cast<void (__fastcall *)(void*, int, void *, Vector *, float)>(__func)(pv, 0, i3, &v4, f5);
#elif defined(__linux__) || defined(__APPLE__)
	reinterpret_cast<void (*)(void *, void *, Vector *, float)>(__func)(pv, i3, &v4, f5);
#endif

	fl4[0]=v4.x;
	fl4[1]=v4.y;
	fl4[2]=v4.z;

	return 1;
}
开发者ID:reuben,项目名称:amxmodx,代码行数:29,代码来源:call_funcs.cpp


示例5: Call_Vector_pVector

cell Call_Vector_pVector(AMX *amx, cell *params)
{
	SETUP(2);

	Vector v3;
	float *fl3=(float *)MF_GetAmxAddr(amx, params[3]);
	v3.x=fl3[0];
	v3.y=fl3[1];
	v3.z=fl3[2];

#if defined(_WIN32)
	Vector ret;
	reinterpret_cast<void (__fastcall *)(void *, int, Vector*, Vector*)>(__func)(pv, 0, &ret, &v3);
#elif defined(__linux__) || defined(__APPLE__)
	Vector ret=reinterpret_cast<Vector (*)(void *, Vector*)>(__func)(pv, &v3);
#endif
	float *out=(float *)MF_GetAmxAddr(amx, params[4]);
	out[0]=ret.x;
	out[1]=ret.y;
	out[2]=ret.z;

	fl3[0]=v3.x;
	fl3[1]=v3.y;
	fl3[2]=v3.z;

	return 1;
} 
开发者ID:reuben,项目名称:amxmodx,代码行数:27,代码来源:call_funcs.cpp


示例6: Call_Void_Float_Vector_Trace_Int

cell Call_Void_Float_Vector_Trace_Int(AMX *amx, cell *params)
{
	SETUP(4);

	float f3=amx_ctof2(*MF_GetAmxAddr(amx, params[3]));
	Vector v4;
	TraceResult *tr5=reinterpret_cast<TraceResult *>(*MF_GetAmxAddr(amx, params[5]));
	int i6=*MF_GetAmxAddr(amx, params[6]);

	float *fl4=(float *)MF_GetAmxAddr(amx, params[4]);
	v4.x=fl4[0];
	v4.y=fl4[1];
	v4.z=fl4[2];

	if (tr5==NULL)
	{
		MF_LogError(amx, AMX_ERR_NATIVE, "Null traceresult provided.");

		return 0;
	}

#if defined(_WIN32)
	reinterpret_cast<void (__fastcall *)(void *, int, float, Vector, TraceResult *, int)>(__func)(pv, 0, f3, v4, tr5, i6);
#elif defined(__linux__) || defined(__APPLE__)
	reinterpret_cast<void (*)(void *, float, Vector, TraceResult *, int)>(__func)(pv, f3, v4, tr5, i6);
#endif

	return 1;
}
开发者ID:reuben,项目名称:amxmodx,代码行数:29,代码来源:call_funcs.cpp


示例7: Call_Int_Vector_Vector_Float_Float

cell Call_Int_Vector_Vector_Float_Float(AMX *amx, cell *params)
{
	SETUP(4);

	Vector v3;
	Vector v4;

	float *fl3=(float *)MF_GetAmxAddr(amx, params[3]);
	v3.x=fl3[0];
	v3.y=fl3[1];
	v3.z=fl3[2];

	float *fl4=(float *)MF_GetAmxAddr(amx, params[4]);
	v4.x=fl4[0];
	v4.y=fl4[1];
	v4.z=fl4[2];

	float f5=amx_ctof2(*MF_GetAmxAddr(amx, params[5]));
	float f6=amx_ctof2(*MF_GetAmxAddr(amx, params[6]));

#if defined(_WIN32)
	return reinterpret_cast<int (__fastcall *)(void *, int, Vector, Vector, float, float)>(__func)(pv, 0, v3, v4, f5, f6);
#elif defined(__linux__) || defined(__APPLE__)
	return reinterpret_cast<int (*)(void *, Vector, Vector, float, float)>(__func)(pv, v3, v4, f5, f6);
#endif
}
开发者ID:reuben,项目名称:amxmodx,代码行数:26,代码来源:call_funcs.cpp


示例8: get_stats

static cell AMX_NATIVE_CALL get_stats(AMX *amx, cell *params) /* 7 param */
{
	int index = params[1] + 1;
	RankSystem::iterator a;
	a.getEntryByRank(index);
	if (a)
	{
		cell *cpStats = MF_GetAmxAddr(amx,params[2]);
		cell *cpBodyHits = MF_GetAmxAddr(amx,params[3]);
		cpStats[0] = (*a).kills;
		cpStats[1] = (*a).deaths;
		cpStats[2] = (*a).hs;
		cpStats[3] = (*a).tks;
		cpStats[4] = (*a).shots;
		cpStats[5] = (*a).hits;
		cpStats[6] = (*a).damage;

		cpStats[7] = (*a).getPosition();

		MF_SetAmxString(amx,params[4],(*a).getName(),params[5]);
		if (params[6] > 0)
		{
			MF_SetAmxString(amx, params[6], (*a).getUnique(), params[7]);
		}
		for (int i = 1; i < 8; ++i)
		{
			cpBodyHits[i] = (*a).bodyHits[i];
		}
		return index;
	}
	return 0;
}
开发者ID:9iky6,项目名称:amxmodx,代码行数:32,代码来源:rank.cpp


示例9: get_user_stats

static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
{
	int index = params[1];
	CHECK_PLAYERRANGE(index);
	CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
	if ( pPlayer->rank ){
		cell *cpStats = MF_GetAmxAddr(amx,params[2]);
		cell *cpBodyHits = MF_GetAmxAddr(amx,params[3]);
		cpStats[0] = pPlayer->rank->kills;
		cpStats[1] = pPlayer->rank->deaths;
		cpStats[2] = pPlayer->rank->hs;
		cpStats[3] = pPlayer->rank->tks;
		cpStats[4] = pPlayer->rank->shots;
		cpStats[5] = pPlayer->rank->hits;
		cpStats[6] = pPlayer->rank->damage;

		cpStats[7] = pPlayer->rank->getPosition();

		for(int i = 1; i < 8; ++i)
			cpBodyHits[i] = pPlayer->rank->bodyHits[i];
		return pPlayer->rank->getPosition();
	}
	return 0;

}
开发者ID:9iky6,项目名称:amxmodx,代码行数:25,代码来源:rank.cpp


示例10: fm_return

static cell AMX_NATIVE_CALL fm_return(AMX *amx, cell *params)
{
	int len;
	switch (params[1])
	{
	case FMV_STRING:
		{
			mStringResult = STRING(ALLOC_STRING(MF_GetAmxString(amx, params[2], 0 ,&len)));
			break;
		}
	case FMV_FLOAT:
		{
			mFloatResult = amx_ctof(*(MF_GetAmxAddr(amx,params[2])));
			break;
		}
	case FMV_CELL:
		{
			mCellResult = *(MF_GetAmxAddr(amx,params[2]));
			break;
		}
	default:
		{
		return 0;
		break;
		}
	}

	retType = params[1];

	return 1;
}
开发者ID:KamilBrown,项目名称:amxmodx,代码行数:31,代码来源:forward.cpp


示例11: GetModelCollisionBox

// GetModelCollisionBox( index, Float:mins[3], Float:maxs[3] );
static cell AMX_NATIVE_CALL GetModelCollisionBox(AMX *amx, cell *params)
{
	int entityIndex = params[1];

	CHECK_ENTITY(entityIndex);

	edict_t *pEdict = INDEXENT2(entityIndex);

	if (!FNullEnt(pEdict))
	{
		studiohdr_t *pStudiohdr = static_cast<studiohdr_t*>(GET_MODEL_PTR(pEdict));

		if (!pStudiohdr)
		{
			MF_LogError(amx, AMX_ERR_NATIVE, "Could not find the model pointer for the entity.");
			return 0;
		}

		cell *cmins = MF_GetAmxAddr(amx, params[2]);
		cell *cmaxs = MF_GetAmxAddr(amx, params[3]);

		cmins[0] = amx_ftoc(pStudiohdr->bbmin.x);
		cmins[1] = amx_ftoc(pStudiohdr->bbmin.y);
		cmins[2] = amx_ftoc(pStudiohdr->bbmin.z);

		cmaxs[0] = amx_ftoc(pStudiohdr->bbmax.x);
		cmaxs[1] = amx_ftoc(pStudiohdr->bbmax.y);
		cmaxs[2] = amx_ftoc(pStudiohdr->bbmax.z);

		return 1;
	}

	return 0;
};
开发者ID:Chuvi-w,项目名称:amxmodx,代码行数:35,代码来源:misc.cpp


示例12: get_user_astats

static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
{
	int index = params[1];
	CHECK_PLAYERRANGE(index);
	int attacker = params[2];
	CHECK_PLAYERRANGE(attacker);
	CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
	if (pPlayer->attackers[attacker].hits){
		cell *cpStats = MF_GetAmxAddr(amx,params[3]);
		cell *cpBodyHits = MF_GetAmxAddr(amx,params[4]);
		CPlayer::PlayerWeapon* stats = &pPlayer->attackers[attacker];
		cpStats[0] = stats->kills;
		cpStats[1] = stats->deaths;
		cpStats[2] = stats->hs;
		cpStats[3] = stats->tks;
		cpStats[4] = stats->shots;
		cpStats[5] = stats->hits;
		cpStats[6] = stats->damage;
		for(int i = 1; i < 8; ++i)
			cpBodyHits[i] = stats->bodyHits[i];
		if (params[6] && attacker && stats->name )
			MF_SetAmxString(amx,params[5],stats->name,params[6]);
		return 1;
	}
	return 0;
}
开发者ID:9iky6,项目名称:amxmodx,代码行数:26,代码来源:rank.cpp


示例13: trace_normal

static cell AMX_NATIVE_CALL trace_normal(AMX *amx, cell *params)
{
	int iEnt = params[1];

	cell *cStart = MF_GetAmxAddr(amx, params[2]);
	cell *cEnd = MF_GetAmxAddr(amx, params[3]);
	REAL fStartX = amx_ctof(cStart[0]);
	REAL fStartY = amx_ctof(cStart[1]);
	REAL fStartZ = amx_ctof(cStart[2]);
	REAL fEndX = amx_ctof(cEnd[0]);
	REAL fEndY = amx_ctof(cEnd[1]);
	REAL fEndZ = amx_ctof(cEnd[2]);

	cell *vRet = MF_GetAmxAddr(amx, params[4]);

	Vector vStart = Vector(fStartX, fStartY, fStartZ);
	Vector vEnd = Vector(fEndX, fEndY, fEndZ);

	TraceResult tr;
	TRACE_LINE(vStart, vEnd, dont_ignore_monsters, INDEXENT2(iEnt), &tr);

	vRet[0] = amx_ftoc(tr.vecPlaneNormal.x);
	vRet[1] = amx_ftoc(tr.vecPlaneNormal.y);
	vRet[2] = amx_ftoc(tr.vecPlaneNormal.z);

	if (tr.flFraction >= 1.0)
		return 0;

	return 1;
}
开发者ID:9iky6,项目名称:amxmodx,代码行数:30,代码来源:engine.cpp


示例14: SQL_ReadResult

static cell AMX_NATIVE_CALL SQL_ReadResult(AMX *amx, cell *params)
{
	AmxQueryInfo *qInfo = (AmxQueryInfo *)GetHandle(params[1], Handle_Query);
	if (!qInfo)
	{
		MF_LogError(amx, AMX_ERR_NATIVE, "Invalid query handle: %d", params[1]);
		return 0;
	}

	IResultSet *rs = qInfo->info.rs;

	if (!rs || rs->IsDone())
	{
		MF_LogError(amx, AMX_ERR_NATIVE, "No result set in this query!");
		return 0;
	}

	IResultRow *row = rs->GetRow();

	unsigned int col = static_cast<unsigned int>(params[2]);
	if (col >= rs->FieldCount())
	{
		MF_LogError(amx, AMX_ERR_NATIVE, "Invalid column: %d", col);
		return 0;
	}

	cell numparams = params[0] / sizeof(cell);
	switch (numparams)
	{
	case 4:
		{
			const char *str = row->GetString(col);
			if (!str)
				str = "";
			cell *len = MF_GetAmxAddr(amx, params[4]);
			MF_SetAmxString(amx, params[3], str, (int)*len);
			break;
		}
	case 3:
		{
			REAL num = row->GetFloat(col);
			cell *addr = MF_GetAmxAddr(amx, params[3]);
			*addr = amx_ftoc(num);
			break;
		}
	case 2:
		{
			int num = row->GetInt(col);
			return num;
			break;
		}
	default:
		{
			MF_LogError(amx, AMX_ERR_NATIVE, "Bad number of arguments passed.");
			break;
		}
	}

	return 1;
}
开发者ID:Chuvi-w,项目名称:amxmodx,代码行数:60,代码来源:basic_sql.cpp


示例15: Call_Vector_Float_Cbase_Int

cell Call_Vector_Float_Cbase_Int(AMX *amx, cell *params)
{
	SETUP(4);

	float f3=amx_ctof2(*MF_GetAmxAddr(amx, params[3]));
	int id4=*MF_GetAmxAddr(amx, params[4]);
	int i5=*MF_GetAmxAddr(amx, params[5]);
	
	CHECK_ENTITY(id4);

	void *p4=IndexToPrivate(id4);

#if defined(_WIN32)
	Vector ret;
	reinterpret_cast<void(__fastcall *)(void *, int, Vector*, float, void *, int)>(__func)(pv, 0, &ret, f3, p4, i5);
#elif defined(__linux__) || defined(__APPLE__)
	Vector ret = reinterpret_cast<Vector(*)(void *, float, void *, int)>(__func)(pv, f3, p4, i5);
#endif

	float *out = (float *)MF_GetAmxAddr(amx, params[6]);
	out[0] = ret.x;
	out[1] = ret.y;
	out[2] = ret.z;

	return 1;
}
开发者ID:reuben,项目名称:amxmodx,代码行数:26,代码来源:call_funcs.cpp


示例16: Call_Void_Vector_Vector

cell Call_Void_Vector_Vector(AMX *amx, cell *params)
{
	SETUP(2);

	Vector v3;
	Vector v4;

	float *fl3=(float *)MF_GetAmxAddr(amx, params[3]);
	v3.x=fl3[0];
	v3.y=fl3[1];
	v3.z=fl3[2];

	float *fl4=(float *)MF_GetAmxAddr(amx, params[4]);
	v4.x=fl4[0];
	v4.y=fl4[1];
	v4.z=fl4[2];

#if defined(_WIN32)
	reinterpret_cast<void (__fastcall *)(void *, int, Vector, Vector)>(__func)(pv, 0, v3, v4);
#elif defined(__linux__) || defined(__APPLE__)
	reinterpret_cast<void (*)(void *, Vector, Vector)>(__func)(pv, v3, v4);
#endif

	return 1;
}
开发者ID:reuben,项目名称:amxmodx,代码行数:25,代码来源:call_funcs.cpp


示例17: Call_Void_Entvar_Float_Vector_Trace_Int

cell Call_Void_Entvar_Float_Vector_Trace_Int(AMX *amx, cell *params)
{
	SETUP(5);

	int id3=*MF_GetAmxAddr(amx, params[3]);
	float f4=amx_ctof2(*MF_GetAmxAddr(amx, params[4]));
	Vector v5;
	TraceResult *tr6=reinterpret_cast<TraceResult *>(*MF_GetAmxAddr(amx, params[6]));
	int i7=*MF_GetAmxAddr(amx, params[7]);

	float *fl5=(float *)MF_GetAmxAddr(amx, params[5]);
	v5.x=fl5[0];
	v5.y=fl5[1];
	v5.z=fl5[2];

	if (tr6==NULL)
	{
		MF_LogError(amx, AMX_ERR_NATIVE, "Null traceresult provided.");

		return 0;
	}

	CHECK_ENTITY(id3);

	entvars_t *ev3=&(INDEXENT_NEW(id3)->v);
#if defined(_WIN32)
	reinterpret_cast<void (__fastcall *)(void *, int, entvars_t *, float, Vector, TraceResult *, int)>(__func)(pv, 0, ev3, f4, v5, tr6, i7);
#elif defined(__linux__) || defined(__APPLE__)
	reinterpret_cast<void (*)(void *, entvars_t *, float, Vector, TraceResult *, int)>(__func)(pv, ev3, f4, v5, tr6, i7);
#endif

	return 1;
}
开发者ID:reuben,项目名称:amxmodx,代码行数:33,代码来源:call_funcs.cpp


示例18: get_user_wstats

static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
{
	int index = params[1];
	CHECK_PLAYERRANGE(index);
	int weapon = params[2];
	if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
		MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
		return 0;
	}
	CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
	if (pPlayer->weapons[weapon].shots){
		cell *cpStats = MF_GetAmxAddr(amx,params[3]);
		cell *cpBodyHits = MF_GetAmxAddr(amx,params[4]);
		CPlayer::PlayerWeapon* stats = &pPlayer->weapons[weapon];
		cpStats[0] = stats->kills;
		cpStats[1] = stats->deaths;
		cpStats[2] = stats->hs;
		cpStats[3] = stats->tks;
		cpStats[4] = stats->shots;
		cpStats[5] = stats->hits;
		cpStats[6] = stats->damage;
		for(int i = 1; i < 8; ++i)
			cpBodyHits[i] = stats->bodyHits[i];
		return 1;
	}
	return 0;
}
开发者ID:9iky6,项目名称:amxmodx,代码行数:27,代码来源:rank.cpp


示例19: ns_fire_partsys

// ns_fire_ps(Particle:id,Float:origin[3],Float:angles[3],flags=0)
static cell AMX_NATIVE_CALL ns_fire_partsys(AMX *amx, cell *params)
{
	float *origin=(float*)MF_GetAmxAddr(amx,params[2]);
	float *angles=(float*)MF_GetAmxAddr(amx,params[3]);

	ParticleMan.FireSystem(static_cast<int>(params[1]),origin,angles,static_cast<int>(params[4]));

	return 0;
};
开发者ID:Chuvi-w,项目名称:amxmodx,代码行数:10,代码来源:particles.cpp


示例20: traceresult

static cell AMX_NATIVE_CALL traceresult(AMX *amx, cell *params)
{
	int type = params[1];
	cell *cRet;
/*
	TR_AllSolid,			// (int) if true, plane is not valid
	TR_StartSolid,		// (int) if true, the initial point was in a solid area
	TR_InOpen,		// (int)
	TR_InWater,	// (int)
	TR_Fraction,			// (float) time completed, 1.0 = didn't hit anything
	TR_EndPos,			// (vector) final position
	TR_PlaneDist,		// (float)
	TR_PlaneNormal,		// (vector) surface normal at impact
	TR_Hit,				// (entity) entity the surface is on
	TR_Hitgroup			// (int) 0 == generic, non zero is specific body part
*/
	switch (type)
	{
	case TR_AllSolid:
		return g_tr.fAllSolid;
	case TR_StartSolid:
		return g_tr.fStartSolid;
	case TR_InOpen:
		return g_tr.fInOpen;
	case TR_InWater:
		return g_tr.fInWater;
	case TR_Hitgroup:
		return g_tr.iHitgroup;
	case TR_Hit:
		if (!FNullEnt(g_tr.pHit))
			return ENTINDEX(g_tr.pHit);
		else
			return -1;
	case TR_Fraction:
		cRet = MF_GetAmxAddr(amx,params[2]);
		cRet[0] = amx_ftoc(g_tr.flFraction);
		return 1;
	case TR_EndPos:
		cRet = MF_GetAmxAddr(amx,params[2]);
		cRet[0] = amx_ftoc(g_tr.vecEndPos[0]);
		cRet[1] = amx_ftoc(g_tr.vecEndPos[1]);
		cRet[2] = amx_ftoc(g_tr.vecEndPos[2]);
		return 1;
	case TR_PlaneDist:
		cRet = MF_GetAmxAddr(amx,params[2]);
		cRet[0] = amx_ftoc(g_tr.flPlaneDist);
		return 1;
	case TR_PlaneNormal:
		cRet = MF_GetAmxAddr(amx,params[2]);
		cRet[0] = amx_ftoc(g_tr.vecPlaneNormal[0]);
		cRet[1] = amx_ftoc(g_tr.vecPlaneNormal[1]);
		cRet[2] = amx_ftoc(g_tr.vecPlaneNormal[2]);
		return 1;		
	}
	return 0;
}
开发者ID:9iky6,项目名称:amxmodx,代码行数:56,代码来源:engine.cpp



注:本文中的MF_GetAmxAddr函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MF_GetAmxString函数代码示例发布时间:2022-05-30
下一篇:
C++ MFStr函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap