14.11.2015, 17:03
Hi,
i found an include for Objects Physics wich handles via script collisions and other physics of the objects. I have tried everything to move an object with this thing but it wont work, it tells me the message that i added that the object is moving but nothing ... This is the include im using
Thats my Code:
I got both messages that everything workes and it created the object but it didnt move ... I hope you know what i did wrong 
Thanks
i found an include for Objects Physics wich handles via script collisions and other physics of the objects. I have tried everything to move an object with this thing but it wont work, it tells me the message that i added that the object is moving but nothing ... This is the include im using
Thats my Code:
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehID = GetPlayerVehicleID(playerid);
if(vehicle[vehID][guns] == false)
{
vehicle[vehID][guns] = true;
//for(new i = 0; i < 101; i++)
//{
if(vehicle[vehID][guns] == true)
{
new Float:x, Float:y, Float:z, Float:rz;
GetVehiclePos(vehID, x, y, z);
GetVehicleZAngle(vehID, rz);
new obj = CreateObject(1603, x, y, z, 0.0, 0.0, rz);
PHY_InitObject(obj, 1603, 1.0, FLOAT_NAN, PHY_MODE_2D);
PHY_SetObjectVelocity(obj, 10.0, 10.0, 10.0);
PHY_SetObjectAcceleration(obj, 10.0, 10.0, 10.0);
SendClientMessage(playerid, 1, "Erfolgreich");
if(PHY_IsObjectMoving(obj))
{
SendClientMessage(playerid, 1, "Hi");
}
}
//}
}
else
{
vehicle[vehID][guns] = false;
}
}
}
return 1;
}

Thanks