09.06.2017, 14:34
This is my function, when admin creates an item on the server:
I want to add an extra array 'object_data[10]' but it has to be a string which can hold 64 characters.
object_data[10] and then it needs to know the amount of chars which is [64]... I can't figure it out and dunno how to do it.
Anyone?
pawn Код:
PublicEx OnAdminCreateItem(playerid, objectid, itemid, modelid, quantity, Float:x, Float:y, Float:z)
{
Streamer_UpdateEx(playerid, x, y, z, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
new object_data[10];
object_data[0] = itemid;
SerwerData[E_SERWER_LAST_ITEM_UID] = object_data[1] = cache_insert_id();
object_data[2] = modelid;
object_data[3] = _:x;
object_data[4] = _:y;
object_data[5] = _:z;
object_data[6] = GetPlayerVirtualWorld(playerid);
object_data[7] = GetPlayerInterior(playerid);
object_data[8] = quantity;
object_data[9] = INVALID_3DTEXT_ID;
Streamer_SetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, object_data, sizeof(object_data));
pawn Код:
strmid(object_data[10][......], "My text has 64 chars or whatever", 0, 64, 64);
Anyone?