18.12.2015, 21:52
Quote:
That was the very first thing I did and have found it.
Spoke with my friend and we have a new workaround for my solution, but here's another problem. pawn Код:
float() = x ... etc. saving floats are spitting out the errors. Код:
error 022: must be lvalue (non-constant) warning 215: expression has no effect Does anyone know how to get around that? I can't set "Float:" tag before "object_data[5]". Since it's gonna give me an error from Streamer_SetArrayData. Thanks for help anyways. edit:// Got the data finally. object_data[2] = _; .... Thanks (: |
pawn Код:
// ** INCLUDES
#include <a_samp>
#include <streamer>
// ** MAIN
main()
{
print("Loaded \"streamer_array_data.amx\".");
}
// ** CALLBACKS
public OnGameModeInit()
{
new pickupid = CreateDynamicPickup(1242, 23, 136.6050, -74.2258, 1.4297);
enum eData
{
value,
Float:x
};
new aData[eData];
aData[value] = 1;
aData[x] = 10.0;
Streamer_SetArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, aData);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
new aData[2];
Streamer_GetArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, aData);
printf("aData[0]: %d", aData[0]);
printf("aData[1]: %f", aData[1]);
return 1;
}