Esse plugin carrega objetos, pickups, checkpoints, race checkpoints, map icons, e 3D text labels definidas pelo dono do servidor. é o melhor streamer da atualidade, inteiramente escrito em C++, portanto o resultado é um pouco mais rápido do que qualquer outra aplicação disponível atualmente em pawn.
Definições
Enums
Natives
Settings:
Updates:
Data Manipulation:
Miscellaneous:
Objects:
Pickups:
Checkpoints:
Race Checkpoints:
Map Icons:
3D Text Labels:
Areas:
Extended:
Callbacks
Instruções
Crie um diretório chamado "plugins" dentro do diretório do servidor, caso não exista. Coloque o arquivo de plugin (streamer.dll ou streamer.so) dentro deste diretório.
Adicione a seguinte linha ao server.cfg para que o plugin seja carregado quando o servidor iniciar:
Windows:
Linux:
No Windows, adicione streamer.inc para a pasta pawno\include. Inclua este arquivo em qualquer um dos scripts que o servidor irá executar:
Recompile os scripts com qualquer natives desejados substituindo as natives padrões do SA-MP.
Download
Os binários mais recentes compilados sempre estarão aqui:
GitHub Releases Page
Mais informações »
Definições
Code:
#define STREAMER_TYPE_OBJECT (0) #define STREAMER_TYPE_PICKUP (1) #define STREAMER_TYPE_CP (2) #define STREAMER_TYPE_RACE_CP (3) #define STREAMER_TYPE_MAP_ICON (4) #define STREAMER_TYPE_3D_TEXT_LABEL (5) #define STREAMER_TYPE_AREA (6) #define STREAMER_AREA_TYPE_CIRCLE (0) #define STREAMER_AREA_TYPE_RECTANGLE (1) #define STREAMER_AREA_TYPE_SPHERE (2) #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)
pawn Code:
enum { E_STREAMER_ATTACHED_OBJECT, E_STREAMER_ATTACHED_PLAYER, E_STREAMER_ATTACHED_VEHICLE, E_STREAMER_ATTACH_OFFSET_X, E_STREAMER_ATTACH_OFFSET_Y, E_STREAMER_ATTACH_OFFSET_Z, E_STREAMER_ATTACH_R_X, E_STREAMER_ATTACH_R_Y, E_STREAMER_ATTACH_R_Z, E_STREAMER_ATTACH_X, E_STREAMER_ATTACH_Y, E_STREAMER_ATTACH_Z, E_STREAMER_COLOR, E_STREAMER_DRAW_DISTANCE, E_STREAMER_EXTRA_ID, E_STREAMER_INTERIOR_ID, E_STREAMER_MAX_X, E_STREAMER_MAX_Y, E_STREAMER_MAX_Z, E_STREAMER_MIN_X, E_STREAMER_MIN_Y, E_STREAMER_MIN_Z, E_STREAMER_MODEL_ID, E_STREAMER_MOVE_R_X, E_STREAMER_MOVE_R_Y, E_STREAMER_MOVE_R_Z, E_STREAMER_MOVE_SPEED, E_STREAMER_MOVE_X, E_STREAMER_MOVE_Y, E_STREAMER_MOVE_Z, E_STREAMER_NEXT_X, E_STREAMER_NEXT_Y, E_STREAMER_NEXT_Z, E_STREAMER_PLAYER_ID, E_STREAMER_R_X, E_STREAMER_R_Y, E_STREAMER_R_Z, E_STREAMER_SIZE, E_STREAMER_STREAM_DISTANCE, E_STREAMER_STYLE, E_STREAMER_TEST_LOS, E_STREAMER_TYPE, E_STREAMER_WORLD_ID, E_STREAMER_X, E_STREAMER_Y, E_STREAMER_Z }
Natives
Settings:
pawn Code:
native Streamer_GetTickRate(); native Streamer_SetTickRate(rate); native Streamer_GetMaxItems(type); native Streamer_SetMaxItems(type, items); 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);
Updates:
pawn Code:
native Streamer_ProcessActiveItems(); native Streamer_ToggleIdleUpdate(playerid, toggle); native Streamer_ToggleItemUpdate(playerid, type, toggle); native Streamer_Update(playerid); native Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1);
Data Manipulation:
pawn Code:
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);
Miscellaneous:
pawn Code:
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);
Objects:
pawn Code:
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);
Pickups:
pawn Code:
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);
Checkpoints:
pawn Code:
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);
Race Checkpoints:
pawn Code:
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);
Map Icons:
pawn Code:
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);
3D Text Labels:
pawn Code:
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[]);
Areas:
pawn Code:
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(areaid, recheck = 0); native IsAnyPlayerInAnyDynamicArea(recheck = 0); native GetPlayerDynamicAreas(playerid, areas[], maxlength = sizeof areas); native GetPlayerNumberDynamicAreas(playerid); native IsPointInDynamicArea(areaid, Float:x, Float:y, Float:z); native IsPointInAnyDynamicArea(Float:x, Float:y, Float:z); native AttachDynamicAreaToObject(areaid, objectid, type = STREAMER_OBJECT_TYPE_DYNAMIC, playerid = INVALID_PLAYER_ID); native AttachDynamicAreaToPlayer(areaid, playerid); native AttachDynamicAreaToVehicle(areaid, vehicleid);
Extended:
pawn Code:
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);
Callbacks
pawn Code:
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);
Instruções
Crie um diretório chamado "plugins" dentro do diretório do servidor, caso não exista. Coloque o arquivo de plugin (streamer.dll ou streamer.so) dentro deste diretório.
Adicione a seguinte linha ao server.cfg para que o plugin seja carregado quando o servidor iniciar:
Windows:
Code:
plugins streamer.dll
Code:
plugins streamer.so
pawn Code:
#include
Download
Os binários mais recentes compilados sempre estarão aqui:
GitHub Releases Page