19.01.2016, 19:23
I think I should consider doing another test maybe tomorrow or after tomorrow!
Thanks Crayder.
Thanks Crayder.
I have released a better version of Pool game:
https://sampforum.blast.hk/showthread.php?tid=600413 |
He doesn't need to do anything to update ColAndreas. It's completely on the user's end.
I think you meant to say "use y_iterate instead foreach". In my opinion, this too should be up to the user. @PeppeAC you should just verify either foreach or y_iterate were included. They both have definitions for this. They both have the same exact functions. One is more recently updated than the other, y_iterate. How exactly do you think they can be improved? |
CA_RayCastLineAngle(x, y, z, x, y, z - 1000.0, unused, unused, bound);
native CA_RayCastLineAngle(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz);
I get argument warning in this line in this include:
Код:
CA_RayCastLineAngle(x, y, z, x, y, z - 1000.0, unused, unused, bound); Код:
native CA_RayCastLineAngle(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz); |
I get argument warning in this line in this include:
Код:
CA_RayCastLineAngle(x, y, z, x, y, z - 1000.0, unused, unused, bound); Код:
native CA_RayCastLineAngle(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz); |
public DropInventoryItem(playerid, modelid)
{
#define SPEED (10.0)
#define Z_SPEED (4.0)
#define GRAVITY (13.0)
new Float:posx, Float:posy, Float:posz, Float:posa;
GetPlayerPos(playerid, posx, posy, posz);
GetPlayerFacingAngle(playerid, posa);
Streamer_Update(playerid);
new obj = CA_CreateDynamicObject_DC(modelid, posx, posy - 0.5 * floatcos(-(posa + 90.0), degrees), posz, 93.7, 120.0, posa + 60.0, -1, -1, -1, 300.0, 300.0);
PHY_InitObject();
PHY_UseColAndreas(obj, 1);
PHY_SetObjectVelocity(obj, SPEED * floatsin(-posa, degrees), SPEED * floatcos(-posa, degrees), Z_SPEED);
PHY_SetObjectFriction(obj, 100);
PHY_SetObjectGravity(obj, GRAVITY);
ApplyAnimation(playerid, "GRENADE", "WEAPON_throwu", 3.0, 0, 0, 0, 0, 0);
return 1;
}
Hi, i'm trying to make a basic drop/loot system with ColAndreas and this include. I used Peppe's example to make a function that creates an onbject to throw. If I use the function CreateObject (native) it works perfectly, but if use the streamer of ColAndreas or Incognito's streamer the object spawns, but it doesn't move. I need to use streamer due to objects limit. Any solution?
Код:
public DropInventoryItem(playerid, modelid)
{
#define SPEED (10.0)
#define Z_SPEED (4.0)
#define GRAVITY (13.0)
new Float:posx, Float:posy, Float:posz, Float:posa;
GetPlayerPos(playerid, posx, posy, posz);
GetPlayerFacingAngle(playerid, posa);
Streamer_Update(playerid);
new obj = CA_CreateDynamicObject_DC(modelid, posx, posy - 0.5 * floatcos(-(posa + 90.0), degrees), posz, 93.7, 120.0, posa + 60.0, -1, -1, -1, 300.0, 300.0);
PHY_InitObject();
PHY_UseColAndreas(obj, 1);
PHY_SetObjectVelocity(obj, SPEED * floatsin(-posa, degrees), SPEED * floatcos(-posa, degrees), Z_SPEED);
PHY_SetObjectFriction(obj, 100);
PHY_SetObjectGravity(obj, GRAVITY);
ApplyAnimation(playerid, "GRENADE", "WEAPON_throwu", 3.0, 0, 0, 0, 0, 0);
return 1;
}
|