06.02.2014, 21:59
No more updates?
PHY_InitObject(A1, 342);
PHY_SetObjectWorld(A1, 0);
PHY_RollObject(A1);
PHY_SetObjectVelocity(A1, vx, vy, vz);
PHY_SetObjectGravity(A1, GRAVITY);
PHY_SetObjectFriction(A1, 7);
PHY_SetObjectAirResistance(A1, 0.1);
PHY_ToggleObjectPlayerColls(A1, 1, 0.6);
PHY_GetObjectVelocity(A1, vx, vy, vz);
Yes, i've made init first and here is the code
pawn Код:
EDIT: i used acceleration but it didnt work. |
public PHY_OnObjectCollideWithSAWorld(objectid, Float:cx, Float:cy, Float:cz) {
if(objectid == dropid || objectid == drop2) {
SendClientMessageToAll(-1, "Reached the ground");
PHY_DeleteObject(dropid);
}
return true;
}
public PHY_OnObjectCollideWithPlayer(objectid, playerid) {
if(objectid == dropid || objectid == drop2) {
SendClientMessageToAll(-1, "Reached the ground");
PHY_DeleteObject(dropid);
}
return true;
}
new drop2;
CMD:ball(playerid, params[])
{
new Float:x, Float:y, Float:z, Float:ang, Float:vz, Float:mass;
sscanf(params, "F(0.0)F(1.0)", vz, mass);
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, ang);
new a = CreateObject(1598, x, y, z-0.69, 0, 0, 0);
drop2 = a;
PHY_InitObject(a, 1598, mass, _, PHY_MODE_3D);
PHY_SetObjectVelocity(a, 6.0 * floatsin(-ang, degrees), 6.0 * floatcos(-ang, degrees), vz);
PHY_RollObject(a);
PHY_SetObjectFriction(a, 0.25);
PHY_SetObjectAirResistance(a, 0.1);
PHY_SetObjectGravity(a, 7.1);
PHY_SetObjectZBound(a, _, _, 0.5);
PHY_UseColAndreas(a);
PHY_ToggleObjectPlayerColls(playerid);
return 1;
}
Hey gta191977649!, we really appreciate what you have done, however, can you check out my previous reply about the colliding with SAWorld callback? - I think it has something to do with the compatibility with the latest version of ColAndreas and this include.
Thanks! |