コード例 #1
0
cell AMX_NATIVE_CALL Natives::SetDynamicVehParamsForPlayer(AMX *amx, cell *params)
{
	CHECK_PARAMS(4, "SetDynamicVehParamsForPlayer");
	boost::unordered_map<int, Item::SharedVehicle>::iterator v = core->getData()->vehicles.find(static_cast<int>(params[1]));
	if (v != core->getData()->vehicles.end())
	{
		boost::unordered_map<int, int>::iterator i = core->getData()->internalVehicles.find(v->first);
		if (i != core->getData()->internalVehicles.end())
		{
			SetVehicleParamsForPlayer(i->second, static_cast<int>(params[2]), static_cast<int>(params[3]) != 0, static_cast<int>(params[4]) != 0);
		}
		return 1;
	}
	return 0;
}
コード例 #2
0
ファイル: a_vehicles.hpp プロジェクト: Tumba/Keeper
	bool SetParamsForPlayer(int playerid, bool objective, bool doorslocked) const
		{ return SetVehicleParamsForPlayer(id_, playerid, objective, doorslocked); }