diff --git a/filterscripts/tstudio.amx b/filterscripts/tstudio.amx index faa502b..b1530ee 100644 Binary files a/filterscripts/tstudio.amx and b/filterscripts/tstudio.amx differ diff --git a/filterscripts/tstudio/cmdbuffer.pwn b/filterscripts/tstudio/cmdbuffer.pwn index 6b270fb..0086bd4 100644 --- a/filterscripts/tstudio/cmdbuffer.pwn +++ b/filterscripts/tstudio/cmdbuffer.pwn @@ -22,24 +22,22 @@ OnPlayerKeyStateChangeCMD(playerid,newkeys,oldkeys) return 0; } -public OnPlayerCommandPerformed(playerid, cmdtext[], success) -{ - if(success) - { - // If we need to shift the buffer - if(CommandBuffed[playerid][MAX_COMMAND_BUFFER - 1]) - { - // Make every slot, start from slot 2, take the data from the slot before - for(new i = 1; i < MAX_COMMAND_BUFFER; i++) - CommandBuffer[playerid][i] = CommandBuffer[playerid][i - 1]; - } - - // Insert the command and it's parameters into the buffer - CommandBuffer[playerid][0][0] = EOS; - strcat(CommandBuffer[playerid][0], cmdtext); - - return 1; - } +public OnPlayerCommandText(playerid, cmdtext[]) +{ + print(cmdtext); + + // Make every slot, start from slot 2, take the data from the slot before + for(new i = MAX_COMMAND_BUFFER - 1; i > 0; --i) { + //printf("i = %2i 1, CB[i] = %s, CB[i-1] = %s", i, CommandBuffer[playerid][i], CommandBuffer[playerid][i - 1]); + //CommandBuffer[playerid][i] = CommandBuffer[playerid][i - 1]; + //printf("i = %2i 2, CB[i] = %s, CB[i-1] = %s", i, CommandBuffer[playerid][i], CommandBuffer[playerid][i - 1]); + format(CommandBuffer[playerid][i], 128, "%s", CommandBuffer[playerid][i - 1]); + } + + // Insert the command and it's parameters into the buffer + //CommandBuffer[playerid][0][0] = EOS; + format(CommandBuffer[playerid][0], 128, "%s", cmdtext); + return 0; } diff --git a/filterscripts/tstudio/menugui.pwn b/filterscripts/tstudio/menugui.pwn index 42ccb9a..991ed42 100644 --- a/filterscripts/tstudio/menugui.pwn +++ b/filterscripts/tstudio/menugui.pwn @@ -1625,6 +1625,35 @@ YCMD:runbind(playerid, arg[], help) return 1; } +YCMD:makebind(playerid, arg[], help) +{ + if(help) + { + SendClientMessage(playerid, STEALTH_ORANGE, "______________________________________________"); + SendClientMessage(playerid, STEALTH_GREEN, "Create a bind out of the specified number of last commands."); + return 1; + } + + new index, range; + sscanf(arg, "iI(1)", index, range); + + if(0 > index > MAX_CLICK_BINDS) return SendClientMessage(playerid, STEALTH_YELLOW, "Usage /makebind "); + if(1 > range > MAX_COMMAND_BUFFER) return SendClientMessage(playerid, STEALTH_YELLOW, "Usage /makebind "); + + for(new x; x < range; x++) { + //CommandBindData[index][x] = CommandBuffer[playerid][range - 1 - x]; + format(CommandBindData[index][x], 128, "%s", CommandBuffer[playerid][range - 1 - x]); + printf("%i: %s", x, CommandBindData[index][x]); + } + + BindUsed[index] = true; + + SendClientMessage(playerid, STEALTH_ORANGE, "______________________________________________"); + SendClientMessage(playerid, STEALTH_GREEN, sprintf("%i is now the last %i commands", index, range)); + + return 1; +} + YCMD:bindeditor(playerid, arg[], help) { diff --git a/filterscripts/tstudio/tsmain.pwn b/filterscripts/tstudio/tsmain.pwn index d58343a..a3b3bad 100644 --- a/filterscripts/tstudio/tsmain.pwn +++ b/filterscripts/tstudio/tsmain.pwn @@ -109,6 +109,7 @@ OnPlayerKeyStateChangeOEdit(playerid,newkeys,oldkeys) // player finished editing an object public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) { + //printf("%i, %i, %i, %i", playerid, objectid, response, GetEditMode(playerid)); switch(GetEditMode(playerid)) { case EDIT_MODE_OBJECT: diff --git a/pawno/include/streamer.inc b/pawno/include/streamer.inc index 2a3ec23..f65ef2c 100644 --- a/pawno/include/streamer.inc +++ b/pawno/include/streamer.inc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Incognito + * Copyright (C) 2014 Incognito * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,6 @@ * limitations under the License. */ -#if defined _streamer_included - #endinput -#endif -#define _streamer_included - #include // Definitions @@ -30,101 +25,31 @@ #define STREAMER_TYPE_MAP_ICON (4) #define STREAMER_TYPE_3D_TEXT_LABEL (5) #define STREAMER_TYPE_AREA (6) -#define STREAMER_TYPE_ACTOR (7) #define STREAMER_AREA_TYPE_CIRCLE (0) -#define STREAMER_AREA_TYPE_CYLINDER (1) +#define STREAMER_AREA_TYPE_RECTANGLE (1) #define STREAMER_AREA_TYPE_SPHERE (2) -#define STREAMER_AREA_TYPE_RECTANGLE (3) -#define STREAMER_AREA_TYPE_CUBOID (4) -#define STREAMER_AREA_TYPE_POLYGON (5) +#define STREAMER_AREA_TYPE_CUBE (3) +#define STREAMER_AREA_TYPE_POLYGON (4) #define STREAMER_OBJECT_TYPE_GLOBAL (0) #define STREAMER_OBJECT_TYPE_PLAYER (1) #define STREAMER_OBJECT_TYPE_DYNAMIC (2) -#define STREAMER_MAX_TYPES (8) -#define STREAMER_MAX_AREA_TYPES (5) -#define STREAMER_MAX_OBJECT_TYPES (3) - -#define INVALID_STREAMER_ID (0) - #if !defined FLOAT_INFINITY #define FLOAT_INFINITY (Float:0x7F800000) #endif -#if !defined STREAMER_ENABLE_TAGS - #define STREAMER_TAG_OBJECT - #define STREAMER_TAG_OBJECT_ALT - #define STREAMER_TAG_PICKUP - #define STREAMER_TAG_CP - #define STREAMER_TAG_RACE_CP - #define STREAMER_TAG_MAP_ICON - #define STREAMER_TAG_AREA - #define STREAMER_TAG_ACTOR - - #if !defined STREAMER_REMOVE_TEXT3D_TAG - #if !defined STREAMER_USE_DYNAMIC_TEXT3D_TAG - #define STREAMER_TAG_3D_TEXT_LABEL Text3D: - #define STREAMER_ALL_TAGS {Text3D,_}: - #else - #define STREAMER_TAG_3D_TEXT_LABEL DynamicText3D: - #define STREAMER_ALL_TAGS {DynamicText3D,_}: - #endif - #else - #define STREAMER_TAG_3D_TEXT_LABEL - #define STREAMER_ALL_TAGS - #endif -#else - #define STREAMER_TAG_OBJECT DynamicObject: - #define STREAMER_TAG_OBJECT_ALT {DynamicObject,_}: - #define STREAMER_TAG_PICKUP DynamicPickup: - #define STREAMER_TAG_CP DynamicCP: - #define STREAMER_TAG_RACE_CP DynamicRaceCP: - #define STREAMER_TAG_MAP_ICON DynamicMapIcon: - #define STREAMER_TAG_3D_TEXT_LABEL DynamicText3D: - #define STREAMER_TAG_AREA DynamicArea: - #define STREAMER_TAG_ACTOR DynamicActor: - - #define STREAMER_ALL_TAGS {DynamicObject,DynamicPickup,DynamicCP,DynamicRaceCP,DynamicMapIcon,DynamicText3D,DynamicArea,DynamicActor,_}: -#endif - -#if !defined STREAMER_OBJECT_SD - #define STREAMER_OBJECT_SD 300.0 -#endif -#if !defined STREAMER_OBJECT_DD - #define STREAMER_OBJECT_DD 0.0 -#endif -#if !defined STREAMER_PICKUP_SD - #define STREAMER_PICKUP_SD 200.0 -#endif -#if !defined STREAMER_CP_SD - #define STREAMER_CP_SD 200.0 -#endif -#if !defined STREAMER_RACE_CP_SD - #define STREAMER_RACE_CP_SD 200.0 -#endif -#if !defined STREAMER_MAP_ICON_SD - #define STREAMER_MAP_ICON_SD 200.0 -#endif -#if !defined STREAMER_3D_TEXT_LABEL_SD - #define STREAMER_3D_TEXT_LABEL_SD 200.0 -#endif -#if !defined STREAMER_ACTOR_SD - #define STREAMER_ACTOR_SD 200.0 -#endif - // Include File Version -public Streamer_IncludeFileVersion = 0x292; +public Streamer_IncludeFileVersion = 0x27201; #pragma unused Streamer_IncludeFileVersion -// Enum +// Enumerator enum { - E_STREAMER_AREA_ID, E_STREAMER_ATTACHED_OBJECT, E_STREAMER_ATTACHED_PLAYER, E_STREAMER_ATTACHED_VEHICLE, @@ -140,9 +65,7 @@ enum E_STREAMER_COLOR, E_STREAMER_DRAW_DISTANCE, E_STREAMER_EXTRA_ID, - E_STREAMER_HEALTH, E_STREAMER_INTERIOR_ID, - E_STREAMER_INVULNERABLE, E_STREAMER_MAX_X, E_STREAMER_MAX_Y, E_STREAMER_MAX_Z, @@ -161,15 +84,12 @@ enum E_STREAMER_NEXT_Y, E_STREAMER_NEXT_Z, E_STREAMER_PLAYER_ID, - E_STREAMER_PRIORITY, - E_STREAMER_ROTATION, E_STREAMER_R_X, E_STREAMER_R_Y, E_STREAMER_R_Z, E_STREAMER_SIZE, E_STREAMER_STREAM_DISTANCE, E_STREAMER_STYLE, - E_STREAMER_SYNC_ROTATION, E_STREAMER_TEST_LOS, E_STREAMER_TYPE, E_STREAMER_WORLD_ID, @@ -182,222 +102,157 @@ enum native Streamer_GetTickRate(); native Streamer_SetTickRate(rate); -native Streamer_GetPlayerTickRate(playerid); -native Streamer_SetPlayerTickRate(playerid, rate); -native Streamer_ToggleChunkStream(toggle); -native Streamer_IsToggleChunkStream(); -native Streamer_GetChunkTickRate(type, playerid = -1); -native Streamer_SetChunkTickRate(type, rate, playerid = -1); -native Streamer_GetChunkSize(type); -native Streamer_SetChunkSize(type, size); native Streamer_GetMaxItems(type); native Streamer_SetMaxItems(type, items); -native Streamer_GetVisibleItems(type, playerid = -1); -native Streamer_SetVisibleItems(type, items, playerid = -1); -native Streamer_GetRadiusMultiplier(type, &Float:multiplier, playerid = -1); -native Streamer_SetRadiusMultiplier(type, Float:multiplier, playerid = -1); -native Streamer_GetTypePriority(types[], maxtypes = sizeof types); -native Streamer_SetTypePriority(const types[], maxtypes = sizeof types); +native Streamer_GetVisibleItems(type); +native Streamer_SetVisibleItems(type, items); native Streamer_GetCellDistance(&Float:distance); native Streamer_SetCellDistance(Float:distance); native Streamer_GetCellSize(&Float:size); native Streamer_SetCellSize(Float:size); -native Streamer_ToggleItemStatic(type, STREAMER_ALL_TAGS id, toggle); -native Streamer_IsToggleItemStatic(type, STREAMER_ALL_TAGS id); -native Streamer_ToggleItemInvAreas(type, STREAMER_ALL_TAGS id, toggle); -native Streamer_IsToggleItemInvAreas(type, STREAMER_ALL_TAGS id); -native Streamer_ToggleItemCallbacks(type, STREAMER_ALL_TAGS id, toggle); -native Streamer_IsToggleItemCallbacks(type, STREAMER_ALL_TAGS id); -native Streamer_ToggleErrorCallback(toggle); -native Streamer_IsToggleErrorCallback(); // Natives (Updates) native Streamer_ProcessActiveItems(); native Streamer_ToggleIdleUpdate(playerid, toggle); native Streamer_IsToggleIdleUpdate(playerid); -native Streamer_ToggleCameraUpdate(playerid, toggle); -native Streamer_IsToggleCameraUpdate(playerid); native Streamer_ToggleItemUpdate(playerid, type, toggle); native Streamer_IsToggleItemUpdate(playerid, type); -native Streamer_GetLastUpdateTime(&Float:time); -native Streamer_Update(playerid, type = -1); -native Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, type = -1, compensatedtime = -1, freezeplayer = 1); +native Streamer_Update(playerid); +native Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1); // Natives (Data Manipulation) -native Streamer_GetFloatData(type, STREAMER_ALL_TAGS id, data, &Float:result); -native Streamer_SetFloatData(type, STREAMER_ALL_TAGS id, data, Float:value); -native Streamer_GetIntData(type, STREAMER_ALL_TAGS id, data); -native Streamer_SetIntData(type, STREAMER_ALL_TAGS id, data, value); -native Streamer_GetArrayData(type, STREAMER_ALL_TAGS id, data, dest[], maxdest = sizeof dest); -native Streamer_SetArrayData(type, STREAMER_ALL_TAGS id, data, const src[], maxsrc = sizeof src); -native Streamer_IsInArrayData(type, STREAMER_ALL_TAGS id, data, value); -native Streamer_AppendArrayData(type, STREAMER_ALL_TAGS id, data, value); -native Streamer_RemoveArrayData(type, STREAMER_ALL_TAGS id, data, value); +native Streamer_GetFloatData(type, {Text3D,_}:id, data, &Float:result); +native Streamer_SetFloatData(type, {Text3D,_}:id, data, Float:value); +native Streamer_GetIntData(type, {Text3D,_}:id, data); +native Streamer_SetIntData(type, {Text3D,_}:id, data, value); +native Streamer_GetArrayData(type, {Text3D,_}:id, data, dest[], maxlength = sizeof dest); +native Streamer_SetArrayData(type, {Text3D,_}:id, data, const src[], maxlength = sizeof src); +native Streamer_IsInArrayData(type, {Text3D,_}:id, data, value); +native Streamer_AppendArrayData(type, {Text3D,_}:id, data, value); +native Streamer_RemoveArrayData(type, {Text3D,_}:id, data, value); native Streamer_GetUpperBound(type); // Natives (Miscellaneous) -native Streamer_GetDistanceToItem(Float:x, Float:y, Float:z, type, STREAMER_ALL_TAGS id, &Float:distance, dimensions = 3); -native Streamer_ToggleItem(playerid, type, STREAMER_ALL_TAGS id, toggle); -native Streamer_IsToggleItem(playerid, type, STREAMER_ALL_TAGS id); -native Streamer_ToggleAllItems(playerid, type, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions); -native Streamer_GetItemInternalID(playerid, type, STREAMER_ALL_TAGS streamerid); -native Streamer_GetItemStreamerID(playerid, type, internalid); -native Streamer_IsItemVisible(playerid, type, STREAMER_ALL_TAGS id); +native Streamer_GetDistanceToItem(Float:x, Float:y, Float:z, type, {Text3D,_}:id, &Float:distance, dimensions = 3); +native Streamer_GetItemInternalID(playerid, type, {Text3D,_}:streamerid); +native Streamer_GetItemStreamerID(playerid, type, {Text3D,_}:internalid); +native Streamer_IsItemVisible(playerid, type, {Text3D,_}:id); native Streamer_DestroyAllVisibleItems(playerid, type, serverwide = 1); native Streamer_CountVisibleItems(playerid, type, serverwide = 1); native Streamer_DestroyAllItems(type, serverwide = 1); native Streamer_CountItems(type, serverwide = 1); -native Streamer_GetNearbyItems(Float:x, Float:y, Float:z, type, STREAMER_ALL_TAGS items[], maxitems = sizeof items, Float:range = 300.0); -native Streamer_GetAllVisibleItems(playerid, type, STREAMER_ALL_TAGS items[], maxitems = sizeof items); -native Streamer_GetItemOffset(type, STREAMER_ALL_TAGS id, &Float:x, &Float:y, &Float:z); -native Streamer_SetItemOffset(type, STREAMER_ALL_TAGS id, Float:x, Float:y, Float:z); // Natives (Objects) -native STREAMER_TAG_OBJECT CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0); -native DestroyDynamicObject(STREAMER_TAG_OBJECT objectid); -native IsValidDynamicObject(STREAMER_TAG_OBJECT objectid); -native GetDynamicObjectPos(STREAMER_TAG_OBJECT objectid, &Float:x, &Float:y, &Float:z); -native SetDynamicObjectPos(STREAMER_TAG_OBJECT objectid, Float:x, Float:y, Float:z); -native GetDynamicObjectRot(STREAMER_TAG_OBJECT objectid, &Float:rx, &Float:ry, &Float:rz); -native SetDynamicObjectRot(STREAMER_TAG_OBJECT objectid, Float:rx, Float:ry, Float:rz); -native GetDynamicObjectNoCameraCol(STREAMER_TAG_OBJECT objectid); -native SetDynamicObjectNoCameraCol(STREAMER_TAG_OBJECT objectid); -native MoveDynamicObject(STREAMER_TAG_OBJECT objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0); -native StopDynamicObject(STREAMER_TAG_OBJECT objectid); -native IsDynamicObjectMoving(STREAMER_TAG_OBJECT objectid); -native AttachCameraToDynamicObject(playerid, STREAMER_TAG_OBJECT objectid); -native AttachDynamicObjectToObject(STREAMER_TAG_OBJECT objectid, attachtoid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz, syncrotation = 1); -native AttachDynamicObjectToPlayer(STREAMER_TAG_OBJECT objectid, playerid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz); -native AttachDynamicObjectToVehicle(STREAMER_TAG_OBJECT objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz); -native EditDynamicObject(playerid, STREAMER_TAG_OBJECT objectid); -native IsDynamicObjectMaterialUsed(STREAMER_TAG_OBJECT objectid, materialindex); -native GetDynamicObjectMaterial(STREAMER_TAG_OBJECT objectid, materialindex, &modelid, txdname[], texturename[], &materialcolor, maxtxdname = sizeof txdname, maxtexturename = sizeof texturename); -native SetDynamicObjectMaterial(STREAMER_TAG_OBJECT objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0); -native IsDynamicObjectMaterialTextUsed(STREAMER_TAG_OBJECT objectid, materialindex); -native GetDynamicObjectMaterialText(STREAMER_TAG_OBJECT objectid, materialindex, text[], &materialsize, fontface[], &fontsize, &bold, &fontcolor, &backcolor, &textalignment, maxtext = sizeof text, maxfontface = sizeof fontface); -native SetDynamicObjectMaterialText(STREAMER_TAG_OBJECT objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); -native STREAMER_TAG_OBJECT GetPlayerCameraTargetDynObject(playerid); +native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 0.0); +native DestroyDynamicObject(objectid); +native IsValidDynamicObject(objectid); +native SetDynamicObjectPos(objectid, Float:x, Float:y, Float:z); +native GetDynamicObjectPos(objectid, &Float:x, &Float:y, &Float:z); +native SetDynamicObjectRot(objectid, Float:rx, Float:ry, Float:rz); +native GetDynamicObjectRot(objectid, &Float:rx, &Float:ry, &Float:rz); +native MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0); +native StopDynamicObject(objectid); +native IsDynamicObjectMoving(objectid); +native AttachCameraToDynamicObject(playerid, objectid); +native AttachDynamicObjectToVehicle(objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz); +native EditDynamicObject(playerid, objectid); +native GetDynamicObjectMaterial(objectid, materialindex, &modelid, txdname[], texturename[], &materialcolor, maxtxdname = sizeof txdname, maxtexturename = sizeof texturename); +native SetDynamicObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0); +native GetDynamicObjectMaterialText(objectid, materialindex, text[], &materialsize, fontface[], &fontsize, &bold, &fontcolor, &backcolor, &textalignment, maxtext = sizeof text, maxfontface = sizeof fontface); +native SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); // Natives (Pickups) -native STREAMER_TAG_PICKUP CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_PICKUP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0); -native DestroyDynamicPickup(STREAMER_TAG_PICKUP pickupid); -native IsValidDynamicPickup(STREAMER_TAG_PICKUP pickupid); +native CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0); +native DestroyDynamicPickup(pickupid); +native IsValidDynamicPickup(pickupid); // Natives (Checkpoints) -native STREAMER_TAG_CP CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_CP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0); -native DestroyDynamicCP(STREAMER_TAG_CP checkpointid); -native IsValidDynamicCP(STREAMER_TAG_CP checkpointid); -native IsPlayerInDynamicCP(playerid, STREAMER_TAG_CP checkpointid); +native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0); +native DestroyDynamicCP(checkpointid); +native IsValidDynamicCP(checkpointid); +native TogglePlayerDynamicCP(playerid, checkpointid, toggle); +native TogglePlayerAllDynamicCPs(playerid, toggle); +native IsPlayerInDynamicCP(playerid, checkpointid); native GetPlayerVisibleDynamicCP(playerid); // Natives (Race Checkpoints) -native STREAMER_TAG_RACE_CP CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_RACE_CP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0); -native DestroyDynamicRaceCP(STREAMER_TAG_RACE_CP checkpointid); -native IsValidDynamicRaceCP(STREAMER_TAG_RACE_CP checkpointid); -native IsPlayerInDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid); +native CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0); +native DestroyDynamicRaceCP(checkpointid); +native IsValidDynamicRaceCP(checkpointid); +native TogglePlayerDynamicRaceCP(playerid, checkpointid, toggle); +native TogglePlayerAllDynamicRaceCPs(playerid, toggle); +native IsPlayerInDynamicRaceCP(playerid, checkpointid); native GetPlayerVisibleDynamicRaceCP(playerid); // Natives (Map Icons) -native STREAMER_TAG_MAP_ICON CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_MAP_ICON_SD, style = MAPICON_LOCAL, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0); -native DestroyDynamicMapIcon(STREAMER_TAG_MAP_ICON iconid); -native IsValidDynamicMapIcon(STREAMER_TAG_MAP_ICON iconid); +native CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0, style = MAPICON_LOCAL); +native DestroyDynamicMapIcon(iconid); +native IsValidDynamicMapIcon(iconid); // Natives (3D Text Labels) -native STREAMER_TAG_3D_TEXT_LABEL CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0); -native DestroyDynamic3DTextLabel(STREAMER_TAG_3D_TEXT_LABEL id); -native IsValidDynamic3DTextLabel(STREAMER_TAG_3D_TEXT_LABEL id); -native GetDynamic3DTextLabelText(STREAMER_TAG_3D_TEXT_LABEL id, text[], maxtext = sizeof text); -native UpdateDynamic3DTextLabelText(STREAMER_TAG_3D_TEXT_LABEL id, color, const text[]); +native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0); +native DestroyDynamic3DTextLabel(Text3D:id); +native IsValidDynamic3DTextLabel(Text3D:id); +native GetDynamic3DTextLabelText(Text3D:id, text[], maxlength = sizeof text); +native UpdateDynamic3DTextLabelText(Text3D:id, color, const text[]); // Natives (Areas) -native STREAMER_TAG_AREA CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1, priority = 0); -native STREAMER_TAG_AREA CreateDynamicCylinder(Float:x, Float:y, Float:minz, Float:maxz, Float:size, worldid = -1, interiorid = -1, playerid = -1, priority = 0); -native STREAMER_TAG_AREA CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, priority = 0); -native STREAMER_TAG_AREA CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1, priority = 0); -native STREAMER_TAG_AREA CreateDynamicCuboid(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1, priority = 0); -native STREAMER_TAG_AREA CreateDynamicCube(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1, priority = 0); -native STREAMER_TAG_AREA CreateDynamicPolygon(const Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worldid = -1, interiorid = -1, playerid = -1, priority = 0); -native DestroyDynamicArea(STREAMER_TAG_AREA areaid); -native IsValidDynamicArea(STREAMER_TAG_AREA areaid); -native GetDynamicPolygonPoints(STREAMER_TAG_AREA areaid, Float:points[], maxpoints = sizeof points); -native GetDynamicPolygonNumberPoints(STREAMER_TAG_AREA areaid); -native IsPlayerInDynamicArea(playerid, STREAMER_TAG_AREA areaid, recheck = 0); +native CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1); +native CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1); +native CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1); +native CreateDynamicCube(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1); +native CreateDynamicPolygon(Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worldid = -1, interiorid = -1, playerid = -1); +native DestroyDynamicArea(areaid); +native IsValidDynamicArea(areaid); +native GetDynamicPolygonPoints(areaid, Float:points[], maxlength = sizeof points); +native GetDynamicPolygonNumberPoints(areaid); +native TogglePlayerDynamicArea(playerid, areaid, toggle); +native TogglePlayerAllDynamicAreas(playerid, toggle); +native IsPlayerInDynamicArea(playerid, areaid, recheck = 0); native IsPlayerInAnyDynamicArea(playerid, recheck = 0); -native IsAnyPlayerInDynamicArea(STREAMER_TAG_AREA areaid, recheck = 0); +native IsAnyPlayerInDynamicArea(areaid, recheck = 0); native IsAnyPlayerInAnyDynamicArea(recheck = 0); -native GetPlayerDynamicAreas(playerid, STREAMER_TAG_AREA areas[], maxareas = sizeof areas); +native GetPlayerDynamicAreas(playerid, areas[], maxlength = sizeof areas); native GetPlayerNumberDynamicAreas(playerid); -native IsPointInDynamicArea(STREAMER_TAG_AREA areaid, Float:x, Float:y, Float:z); +native IsPointInDynamicArea(areaid, Float:x, Float:y, Float:z); native IsPointInAnyDynamicArea(Float:x, Float:y, Float:z); -native IsLineInDynamicArea(STREAMER_TAG_AREA areaid, Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2); -native IsLineInAnyDynamicArea(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2); -native GetDynamicAreasForPoint(Float:x, Float:y, Float:z, STREAMER_TAG_AREA areas[], maxareas = sizeof areas); -native GetNumberDynamicAreasForPoint(Float:x, Float:y, Float:z); -native GetDynamicAreasForLine(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, STREAMER_TAG_AREA areas[], maxareas = sizeof areas); -native GetNumberDynamicAreasForLine(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2); -native AttachDynamicAreaToObject(STREAMER_TAG_AREA areaid, STREAMER_TAG_OBJECT_ALT objectid, type = STREAMER_OBJECT_TYPE_DYNAMIC, playerid = INVALID_PLAYER_ID, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0); -native AttachDynamicAreaToPlayer(STREAMER_TAG_AREA areaid, playerid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0); -native AttachDynamicAreaToVehicle(STREAMER_TAG_AREA areaid, vehicleid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0); -native ToggleDynAreaSpectateMode(STREAMER_TAG_AREA areaid, toggle); -native IsToggleDynAreaSpectateMode(STREAMER_TAG_AREA areaid); - -// Natives (Actors) - -native STREAMER_TAG_ACTOR CreateDynamicActor(modelid, Float:x, Float:y, Float:z, Float:r, invulnerable = 1, Float:health = 100.0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_ACTOR_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0); -native DestroyDynamicActor(STREAMER_TAG_ACTOR actorid); -native IsValidDynamicActor(STREAMER_TAG_ACTOR actorid); -native IsDynamicActorStreamedIn(STREAMER_TAG_ACTOR actorid, forplayerid); -native GetDynamicActorVirtualWorld(STREAMER_TAG_ACTOR actorid); -native SetDynamicActorVirtualWorld(STREAMER_TAG_ACTOR actorid, vworld); -native GetDynamicActorAnimation(STREAMER_TAG_ACTOR actorid, animlib[], animname[], &Float:fdelta, &loop, &lockx, &locky, &freeze, &time, maxanimlib = sizeof animlib, maxanimname = sizeof animname); -native ApplyDynamicActorAnimation(STREAMER_TAG_ACTOR actorid, const animlib[], const animname[], Float:fdelta, loop, lockx, locky, freeze, time); -native ClearDynamicActorAnimations(STREAMER_TAG_ACTOR actorid); -native GetDynamicActorFacingAngle(STREAMER_TAG_ACTOR actorid, &Float:ang); -native SetDynamicActorFacingAngle(STREAMER_TAG_ACTOR actorid, Float:ang); -native GetDynamicActorPos(STREAMER_TAG_ACTOR actorid, &Float:x, &Float:y, &Float:z); -native SetDynamicActorPos(STREAMER_TAG_ACTOR actorid, Float:x, Float:y, Float:z); -native GetDynamicActorHealth(STREAMER_TAG_ACTOR actorid, &Float:health); -native SetDynamicActorHealth(STREAMER_TAG_ACTOR actorid, Float:health); -native SetDynamicActorInvulnerable(STREAMER_TAG_ACTOR actorid, invulnerable = 1); -native IsDynamicActorInvulnerable(STREAMER_TAG_ACTOR actorid); -native STREAMER_TAG_ACTOR GetPlayerTargetDynamicActor(playerid); -native STREAMER_TAG_ACTOR GetPlayerCameraTargetDynActor(playerid); +native AttachDynamicAreaToObject(areaid, objectid, type = STREAMER_OBJECT_TYPE_DYNAMIC, playerid = INVALID_PLAYER_ID); +native AttachDynamicAreaToPlayer(areaid, playerid); +native AttachDynamicAreaToVehicle(areaid, vehicleid); // Natives (Extended) -native STREAMER_TAG_OBJECT CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas); -native STREAMER_TAG_PICKUP CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = STREAMER_PICKUP_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas); -native STREAMER_TAG_CP CreateDynamicCPEx(Float:x, Float:y, Float:z, Float:size, Float:streamdistance = STREAMER_CP_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas); -native STREAMER_TAG_RACE_CP CreateDynamicRaceCPEx(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, Float:streamdistance = STREAMER_RACE_CP_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas); -native STREAMER_TAG_MAP_ICON CreateDynamicMapIconEx(Float:x, Float:y, Float:z, type, color, style = MAPICON_LOCAL, Float:streamdistance = STREAMER_MAP_ICON_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas); -native STREAMER_TAG_3D_TEXT_LABEL CreateDynamic3DTextLabelEx(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, - maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas); -native STREAMER_TAG_AREA CreateDynamicCircleEx(Float:x, Float:y, Float:size, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -native STREAMER_TAG_AREA CreateDynamicCylinderEx(Float:x, Float:y, Float:minz, Float:maxz, Float:size, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -native STREAMER_TAG_AREA CreateDynamicSphereEx(Float:x, Float:y, Float:z, Float:size, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -native STREAMER_TAG_AREA CreateDynamicRectangleEx(Float:minx, Float:miny, Float:maxx, Float:maxy, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -native STREAMER_TAG_AREA CreateDynamicCuboidEx(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -native STREAMER_TAG_AREA CreateDynamicCubeEx(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -native STREAMER_TAG_AREA CreateDynamicPolygonEx(const Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -native STREAMER_TAG_ACTOR CreateDynamicActorEx(modelid, Float:x, Float:y, Float:z, Float:r, invulnerable = 1, Float:health = 100.0, Float:streamdistance = STREAMER_ACTOR_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas); +native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicCPEx(Float:x, Float:y, Float:z, Float:size, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicRaceCPEx(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicMapIconEx(Float:x, Float:y, Float:z, type, color, style = MAPICON_LOCAL, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native Text3D:CreateDynamic3DTextLabelEx(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicCircleEx(Float:x, Float:y, Float:size, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicRectangleEx(Float:minx, Float:miny, Float:maxx, Float:maxy, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicSphereEx(Float:x, Float:y, Float:z, Float:size, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicCubeEx(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); +native CreateDynamicPolygonEx(Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players); -// Natives (Deprecated) +// Natives (Internal) native Streamer_CallbackHook(callback, {Float,_}:...); +// Natives (Deprecated) + native Streamer_TickRate(rate); native Streamer_MaxItems(type, items); -native Streamer_VisibleItems(type, items, playerid = -1); +native Streamer_VisibleItems(type, items); native Streamer_CellDistance(Float:distance); native Streamer_CellSize(Float:size); @@ -416,29 +271,238 @@ native CountDynamic3DTextLabels(); native DestroyAllDynamicAreas(); native CountDynamicAreas(); -native TogglePlayerDynamicCP(playerid, STREAMER_TAG_CP checkpointid, toggle); -native TogglePlayerAllDynamicCPs(playerid, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions); -native TogglePlayerDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid, toggle); -native TogglePlayerAllDynamicRaceCPs(playerid, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions); -native TogglePlayerDynamicArea(playerid, STREAMER_TAG_AREA areaid, toggle); -native TogglePlayerAllDynamicAreas(playerid, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions); - // Callbacks -forward OnDynamicObjectMoved(STREAMER_TAG_OBJECT objectid); -forward OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz); -forward OnPlayerSelectDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z); -forward OnPlayerShootDynamicObject(playerid, weaponid, STREAMER_TAG_OBJECT objectid, Float:x, Float:y, Float:z); -forward OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid); -forward OnPlayerEnterDynamicCP(playerid, STREAMER_TAG_CP checkpointid); -forward OnPlayerLeaveDynamicCP(playerid, STREAMER_TAG_CP checkpointid); -forward OnPlayerEnterDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid); -forward OnPlayerLeaveDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid); -forward OnPlayerEnterDynamicArea(playerid, STREAMER_TAG_AREA areaid); -forward OnPlayerLeaveDynamicArea(playerid, STREAMER_TAG_AREA areaid); -forward OnPlayerGiveDamageDynamicActor(playerid, STREAMER_TAG_ACTOR actorid, Float:amount, weaponid, bodypart); -forward OnDynamicActorStreamIn(STREAMER_TAG_ACTOR actorid, forplayerid); -forward OnDynamicActorStreamOut(STREAMER_TAG_ACTOR actorid, forplayerid); -forward Streamer_OnItemStreamIn(type, STREAMER_ALL_TAGS id); -forward Streamer_OnItemStreamOut(type, STREAMER_ALL_TAGS id); -forward Streamer_OnPluginError(const error[]); +forward OnDynamicObjectMoved(objectid); +forward OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz); +forward OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z); +forward OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x, Float:y, Float:z); +forward OnPlayerPickUpDynamicPickup(playerid, pickupid); +forward OnPlayerEnterDynamicCP(playerid, checkpointid); +forward OnPlayerLeaveDynamicCP(playerid, checkpointid); +forward OnPlayerEnterDynamicRaceCP(playerid, checkpointid); +forward OnPlayerLeaveDynamicRaceCP(playerid, checkpointid); +forward OnPlayerEnterDynamicArea(playerid, areaid); +forward OnPlayerLeaveDynamicArea(playerid, areaid); + +// Callback Hook Section + +#define STREAMER_OPC (0) +#define STREAMER_OPDC (1) +#define STREAMER_OPEO (2) +#define STREAMER_OPSO (3) +#define STREAMER_OPPP (4) +#define STREAMER_OPEC (5) +#define STREAMER_OPLC (6) +#define STREAMER_OPERC (7) +#define STREAMER_OPLRC (8) +#define STREAMER_OPWS (9) + +public OnPlayerConnect(playerid) +{ + Streamer_CallbackHook(STREAMER_OPC, playerid); + #if defined Streamer_OnPlayerConnect + return Streamer_OnPlayerConnect(playerid); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerConnect + forward Streamer_OnPlayerConnect(playerid); +#endif +#if defined _ALS_OnPlayerConnect + #undef OnPlayerConnect +#else + #define _ALS_OnPlayerConnect +#endif +#define OnPlayerConnect Streamer_OnPlayerConnect + +public OnPlayerDisconnect(playerid, reason) +{ + Streamer_CallbackHook(STREAMER_OPDC, playerid, reason); + #if defined Streamer_OnPlayerDisconnect + return Streamer_OnPlayerDisconnect(playerid, reason); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerDisconnect + forward Streamer_OnPlayerDisconnect(playerid, reason); +#endif +#if defined _ALS_OnPlayerDisconnect + #undef OnPlayerDisconnect +#else + #define _ALS_OnPlayerDisconnect +#endif +#define OnPlayerDisconnect Streamer_OnPlayerDisconnect + +public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ) +{ + if (playerobject) + { + Streamer_CallbackHook(STREAMER_OPEO, playerid, playerobject, objectid, response, fX, fY, fZ, fRotX, fRotY, fRotZ); + } + #if defined Streamer_OnPlayerEditObject + return Streamer_OnPlayerEditObject(playerid, playerobject, objectid, response, fX, fY, fZ, fRotX, fRotY, fRotZ); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerEditObject + forward Streamer_OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +#endif +#if defined _ALS_OnPlayerEditObject + #undef OnPlayerEditObject +#else + #define _ALS_OnPlayerEditObject +#endif +#define OnPlayerEditObject Streamer_OnPlayerEditObject + +public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ) +{ + if (type == SELECT_OBJECT_PLAYER_OBJECT) + { + Streamer_CallbackHook(STREAMER_OPSO, playerid, type, objectid, modelid, fX, fY, fZ); + } + #if defined Streamer_OnPlayerSelectObject + return Streamer_OnPlayerSelectObject(playerid, type, objectid, modelid, fX, fY, fZ); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerSelectObject + forward Streamer_OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +#endif +#if defined _ALS_OnPlayerSelectObject + #undef OnPlayerSelectObject +#else + #define _ALS_OnPlayerSelectObject +#endif +#define OnPlayerSelectObject Streamer_OnPlayerSelectObject + +public OnPlayerPickUpPickup(playerid, pickupid) +{ + Streamer_CallbackHook(STREAMER_OPPP, playerid, pickupid); + #if defined Streamer_OnPlayerPickUpPickup + return Streamer_OnPlayerPickUpPickup(playerid, pickupid); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerPickUpPickup + forward Streamer_OnPlayerPickUpPickup(playerid, pickupid); +#endif +#if defined _ALS_OnPlayerPickUpPickup + #undef OnPlayerPickUpPickup +#else + #define _ALS_OnPlayerPickUpPickup +#endif +#define OnPlayerPickUpPickup Streamer_OnPlayerPickUpPickup + +public OnPlayerEnterCheckpoint(playerid) +{ + Streamer_CallbackHook(STREAMER_OPEC, playerid); + #if defined Streamer_OnPlayerEnterCP + return Streamer_OnPlayerEnterCP(playerid); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerEnterCP + forward Streamer_OnPlayerEnterCP(playerid); +#endif +#if defined _ALS_OnPlayerEnterCheckpoint + #undef OnPlayerEnterCheckpoint +#else + #define _ALS_OnPlayerEnterCheckpoint +#endif +#define OnPlayerEnterCheckpoint Streamer_OnPlayerEnterCP + +public OnPlayerLeaveCheckpoint(playerid) +{ + Streamer_CallbackHook(STREAMER_OPLC, playerid); + #if defined Streamer_OnPlayerLeaveCP + return Streamer_OnPlayerLeaveCP(playerid); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerLeaveCP + forward Streamer_OnPlayerLeaveCP(playerid); +#endif +#if defined _ALS_OnPlayerLeaveCheckpoint + #undef OnPlayerLeaveCheckpoint +#else + #define _ALS_OnPlayerLeaveCheckpoint +#endif +#define OnPlayerLeaveCheckpoint Streamer_OnPlayerLeaveCP + +public OnPlayerEnterRaceCheckpoint(playerid) +{ + Streamer_CallbackHook(STREAMER_OPERC, playerid); + #if defined Streamer_OnPlayerEnterRaceCP + return Streamer_OnPlayerEnterRaceCP(playerid); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerEnterRaceCP + forward Streamer_OnPlayerEnterRaceCP(playerid); +#endif +#if defined _ALS_OnPlayerEnterRaceCP + #undef OnPlayerEnterRaceCheckpoint +#else + #define _ALS_OnPlayerEnterRaceCP +#endif +#define OnPlayerEnterRaceCheckpoint Streamer_OnPlayerEnterRaceCP + +public OnPlayerLeaveRaceCheckpoint(playerid) +{ + Streamer_CallbackHook(STREAMER_OPLRC, playerid); + #if defined Streamer_OnPlayerLeaveRaceCP + return Streamer_OnPlayerLeaveRaceCP(playerid); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerLeaveRaceCP + forward Streamer_OnPlayerLeaveRaceCP(playerid); +#endif +#if defined _ALS_OnPlayerLeaveRaceCP + #undef OnPlayerLeaveRaceCheckpoint +#else + #define _ALS_OnPlayerLeaveRaceCP +#endif +#define OnPlayerLeaveRaceCheckpoint Streamer_OnPlayerLeaveRaceCP + +public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) +{ + if (hittype == BULLET_HIT_TYPE_PLAYER_OBJECT) + { + Streamer_CallbackHook(STREAMER_OPWS, playerid, weaponid, hittype, hitid, fX, fY, fZ); + } + #if defined Streamer_OnPlayerWeaponShot + return Streamer_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ); + #else + return 1; + #endif +} + +#if defined Streamer_OnPlayerWeaponShot + forward Streamer_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); +#endif +#if defined _ALS_OnPlayerWeaponShot + #undef OnPlayerWeaponShot +#else + #define _ALS_OnPlayerWeaponShot +#endif +#define OnPlayerWeaponShot Streamer_OnPlayerWeaponShot diff --git a/plugins/streamer.dll b/plugins/streamer.dll index fc5742f..20274b1 100644 Binary files a/plugins/streamer.dll and b/plugins/streamer.dll differ diff --git a/scriptfiles/tstudio/SavedMaps/testmap.db b/scriptfiles/tstudio/SavedMaps/testmap.db new file mode 100644 index 0000000..2e0d370 Binary files /dev/null and b/scriptfiles/tstudio/SavedMaps/testmap.db differ