native CR_EnableSimulation(); native CR_DisableSimulation(); native CR_Load(Float:worldrest = 0.0); native CR_RemoveColMap(); native CR_RemoveBuilding(modelid, Float:x, Float:y, Float:z, Float:range); native CR_SetWorldGravity(Float:x, Float:y, Float:z); native CR_GetWorldGravity(&Float:x, &Float:y, &Float:z); native CR_RayCastNormal(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3); native CR_RayCast(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3); native CR_RayCastEx(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3, &modelid); native CR_RayCastReflection(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:rx, &Float:ry, &Float:rz, &Float:angle); native CR_RayCastObjectInfo(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &modelid, &Float:boundingRadius, &isStatic); native CR_RayCastIntData(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3, &data); native CR_RayCastFloatData(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3, &Float:data); native CR_FreeMemory(); native CR_RemoveDynamicCol(index); native CR_RemoveStaticCol(index); native CR_CreateDynamicCol(objectid, modelid, Float:mass, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll, inertia = 0, tag = ACTIVE_TAG); native CR_CreateStaticCol(objectid, modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_GetDynamicColModel(index); native CR_GetStaticColModel(index); native CR_SetMass(index, Float:mass); native Float:CR_GetMass(index); native CR_SetDynamicColShape(index, modelid); native CR_SetStaticColShape(index, modelid); native CR_GetBoundingSphere(modelid, &Float:x, &Float:y, &Float:z, &Float:radius); native CR_GetAABB(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll, &Float:minx, &Float:miny, &Float:minz, &Float:maxx, &Float:maxy, &Float:maxz); native CR_GetTransform(index, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz); native CR_SetDynamicOrigin(index, Float:x, Float:y, Float:z); native CR_SetStaticOrigin(index, Float:x, Float:y, Float:z); native CR_GetDynamicOrigin(index, &Float:x, &Float:y, &Float:z); native CR_GetStaticOrigin(index, &Float:x, &Float:y, &Float:z); native CR_SetDynamicRotation(index, Float:yaw, Float:pitch, Float:roll); native CR_SetStaticRotation(index, Float:yaw, Float:pitch, Float:roll); native CR_GetDynamicRotation(index, &Float:yaw, &Float:pitch, &Float:roll); native CR_GetStaticRotation(index, &Float:yaw, &Float:pitch, &Float:roll); native CR_SetLinearVelocity(index, Float:vx, Float:vy, Float:vz); native CR_GetLinearVelocity(index, &Float:vx, &Float:vy, &Float:vz); native CR_SetAngularVelocity(index, Float:vx, Float:vy, Float:vz); native CR_GetAngularVelocity(index, &Float:vx, &Float:vy, &Float:vz); native CR_SetTorque(index, Float:tx, Float:ty, Float:tz); native CR_SetFriction(index, Float:friction); native Float:CR_GetFriction(index); native CR_SetRestitution(index, Float:rest); native Float:CR_GetRestitution(index); native CR_IsDynamicSlotUsed(index); native CR_IsStaticSlotUsed(index); native CR_IsActive(index); native CR_IsMoving(index); native CR_Activate(index); native CR_Simulator(newtime, oldtime); native CR_GetNumCollisionObject(); native CR_GetNumChildShapes(modelid); native CR_IsCompound(modelid); native CR_Wait(ms); native CR_DynamicContactTest(index); native CR_ContactTestEx(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_CharacterContactTest(Float:x, Float:y, Float:z, Float:radius, Float:height); native Float:CR_GetContactPoints(index, &Float:x1, &Float:y1, &Float:z1, &Float:x2, &Float:y2, &Float:z2); native CR_GetTimeMilliseconds(); native CR_GetDynamicColObject(index); native CR_GetStaticColObject(index); native CR_SetDynamicUserData(index, type, {Float,_}:...); native CR_SetStaticUserData(index, type, {Float,_}:...); native CR_GetDynamicInt(index, &data); native CR_GetDynamicFloat(index, &Float:data); native CR_GetStaticInt(index, &data); native CR_GetStaticFloat(index, &Float:data); native CR_GetStaticPool(); native CR_GetDynamicPool(); native Float:CR_PlacementCorrection(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_CreateVehicleCol(vehicleid, modelid, Float:x, Float:y, Float:z, Float:qx, Float:qy, Float:qz, Float:qw); native CR_RemoveVehicleCol(index); native CR_SetVehicleOrigin(index, Float:x, Float:y, Float:z); native CR_GetVehicleOrigin(index, &Float:x, &Float:y, &Float:z); native CR_SetVehicleRotation(index, Float:qx, Float:qy, Float:qz, Float:qw); native CR_GetVehicleRotation(index, &Float:qx, &Float:qy, &Float:qz, &Float:qw); native CR_GetVehicleID(index); native CR_GetVehicleModel(index); native CR_IsVehicleSlotUsed(index); native CR_VehicleContactTest(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_GetVehiclePool(); stock CR_SetTransform(index, Float:x, Float:y, Float:z, Float:rotx, Float:roty, Float:rotz) stock CR_UpdateTransform(index) stock CR_DestroyAllColVolumes(vehicle = 0) stock CR_DestroyDynamicCol(index) stock CR_DestroyStaticCol(index) stock CR_FlushMemory() stock CR_ThrowObject(playerid, index, Float:speed) stock CR_GetForwardObjectInfo(playerid, Float:distance, &modelid, &Float:boundingRadius, &isStatic) stock CR_PlaceObjectOnGround(objectid, modelid) stock CR_FindZ_For2D(Float:x, Float:y, &Float:z)
Firstly, no one will ever create that amount of objects |
943mb is a lot. By the way, I am trying to implement a feature which will reduce memory usage of object. Basically, I am dividing cimulator in two sections; static and dynamic. Static objects will use less memory compared to dynamic objects.
|
Is it possible to register a specific movement? Like throwing a knife and it could get stickied to the wall. Or at least hit the wall and fall down.
|
Is it possible to register a specific movement? Like throwing a knife and it could get stickied to the wall. Or at least hit the wall and fall down.
|
Yes you can detect if it hits any object on the map, but keep in mind that Vehicles and Peds/Players are not supported, you will need some workaround for these...
|
Here the problem is, weapons don't have a collision shape except for projectiles. |
A sphere without inertia would be just fine. Okay so, I have implemented a base technique to create static objects which is expected to use less memory than dynamic objects. Crayder, can you do a test with ColAndreas by creating 10000 static objects(modelid: 1221, if possible) and tell me the memory consumption?
|