// getCheckpointType(checkpointid)
	int CCheckpointModuleNatives::GetType(EntityId checkpointId)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			return pCheckpoint->GetType();
		}

		return false;
	}
Ejemplo n.º 2
0
// getCheckpointType(checkpointid, type)
SQInteger CCheckpointNatives::GetType(SQVM * pVM)
{
	EntityId checkpointId;
	sq_getentity(pVM, -1, &checkpointId);
	CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

	if(pCheckpoint)
	{
		sq_pushinteger(pVM, pCheckpoint->GetType());
		return 1;
	}

	sq_pushbool(pVM, false);
	return 1;
}