29.12.2013, 19:47
I actually wanted to make something recently and couldn't find the AttachDynamic3DTextLableToPlayer, isn't this supposed to exist?
I actually wanted to make something recently and couldn't find the AttachDynamic3DTextLableToPlayer, isn't this supposed to exist?
|
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);
Hi, i have a weird problem. Im using your NEWEST include + plugin for linux, and i got an error everytime i startup the server (the plugin and include works good though):
Код:
*** Streamer Plugin: Warning: Include file version (unknown version) does not match plugin version (0x26105) (script might need to be recompiled with the latest include file) Код:
public Streamer_IncludeFileVersion = 0x26105; Anyone has any idea ? |
-------------------------- SA-MP Server: 0.3x-R2 Exception At Address: 0x003E10A0 Module: (Unknown) Registers: EAX: 0x00692CD0 EBX: 0x01E0E488 ECX: 0x00492BE6 EDX: 0x01FD0174 ESI: 0x01E0EA18 EDI: 0x01FD8D84 EBP: 0x76F83468 ESP: 0x0018FE08 EFLAGS: 0x00010202 Stack: +0000: 0x00692CDB 0x0069813C 0x0046941B 0x01E0E488 +0010: 0x76F810FF 0x76F81136 0x00000000 0x01E0E488 +0020: 0x0018FEA4 0x004A4A1E 0x00000000 0x00488C46 +0030: 0x00000000 0x00001DB1 0x0018FF88 0x7EFDE000 +0040: 0x0000E000 0x00010101 0x00000032 0x00001E61 +0050: 0x000000A0 0x000019D0 0x01FD9558 0x656D6167 +0060: 0x65646F6D 0x00003531 0x004BC014 0x004BC010 +0070: 0x7EFDE000 0x004A5150 0x0018FE70 0x0018FF78 +0080: 0x0018FF78 0x00496FD8 0x004B27A8 0xFFFFFFFF +0090: 0x00495271 0x00495281 0x004A5150 0x0018FF78 +00A0: 0x004A4E01 0xFFFFFFFF 0x00496A76 0x00000001 +00B0: 0x01FD1730 0x01FD1788 0x00000094 0x00000006 +00C0: 0x00000001 0x00001DB1 0x00000002 0x76726553 +00D0: 0x20656369 0x6B636150 0x00003120 0x00000000 +00E0: 0x00000000 0x00000000 0x00000000 0x00000000 +00F0: 0x00000000 0x00000000 0x00000000 0x00000000 +0100: 0x00000000 0x00000000 0x00000000 0x00000000 +0110: 0x00000000 0x00000000 0x00000000 0x00000000 +0120: 0x00000000 0x00000000 0x00000000 0x00000000 +0130: 0x00000000 0x00000000 0x00000000 0x00000000
If I set the drawdistance with E_STREAMER_DRAW_DISTANCE to 300.0 on each object, does this overload the client? (50000 objects on the server)
|
I have the same problem as this guy; https://sampforum.blast.hk/showthread.php?tid=452965 (he still has the problem)
I so far was able to figure out that the objects that are no longer there are actually destroyed, not just hidden or anything. Streamer_IsItemVisible returns false and GetDynamicObjectPos is 0.0, 0.0, 0.0 I create and destroy objects quite often and it just seems like object IDs are getting mixed up and the wrong ones destroyed. I always properly assign Objects to variables and check if they're valid before destroying them. I've had this issue for a very long time, also using the latest version of the plugin. Anybody experiencing similar issues? Any idea on how to fix it? |
#include <a_samp>
#include <streamer>
enum conInfo
{
bCreated,Float:bX,Float:bY,Float:bZ,Float:bR,bObject,bModel
};
new Coninfo[1000][conInfo];
CreateCone(playerid,type)
{
for(new i = 0; i < sizeof(Coninfo); i++)
{
if(Coninfo[i][bCreated] == 0)
{
GetPlayerPos(playerid,Coninfo[i][bX],Coninfo[i][bY],Coninfo[i][bZ]);
GetPlayerFacingAngle(playerid,Coninfo[i][bR]);
Coninfo[i][bCreated] = 1;
if(type == 0) { Coninfo[i][bModel] = 1238; Coninfo[i][bZ] = Coninfo[i][bZ]-0.71; }
else if(type == 1) { Coninfo[i][bModel] = 1237; Coninfo[i][bZ] = Coninfo[i][bZ]-1.01; }
if(random(2) == 0)
{
Coninfo[i][bObject] = CreateDynamicObject(Coninfo[i][bModel],Coninfo[i][bX]+random(50),Coninfo[i][bY]-random(50),Coninfo[i][bZ],0,0,Coninfo[i][bR],-1,-1,-1,200.0);
}
else
{
Coninfo[i][bObject] = CreateDynamicObject(Coninfo[i][bModel],Coninfo[i][bX]-random(50),Coninfo[i][bY]+random(50),Coninfo[i][bZ],0,0,Coninfo[i][bR],-1,-1,-1,200.0);
}
for(new user; user < MAX_PLAYERS; user++)
{
if(IsPlayerConnected(user) && IsPlayerInRangeOfPoint(user,50.0,Coninfo[i][bX],Coninfo[i][bY],Coninfo[i][bZ]))
{
Streamer_UpdateEx(user,Coninfo[i][bX],Coninfo[i][bY],Coninfo[i][bZ]);
}
}
return 1;
}
}
return 0;
}
DeleteCone()
{
for(new i = 0; i < sizeof(Coninfo); i++)
{
if(Coninfo[i][bCreated] == 1)
{
Coninfo[i][bCreated] = 0; Coninfo[i][bX] = 0.0; Coninfo[i][bY] = 0.0; Coninfo[i][bZ] = 0.0;
DestroyDynamicObject(Coninfo[i][bObject]);
}
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/conex", cmdtext, true))
{
for(new i; i < sizeof(Coninfo); i++)
{
CreateCone(playerid,random(2));
}
SendClientMessage(playerid,-1,"Cones created.");
return 1;
}
else if (!strcmp("/rconex", cmdtext, true))
{
DeleteCone();
SendClientMessage(playerid,-1,"Cones deleted.");
return 1;
}
return 0;
}
// This is a global variable that gets initialized in some function to create a road object.
// Let's say this variable is equal to 100 (that is, the object ID is 100).
road = CreateDynamicObject(...);
// The global variable is used in some function to destroy the road object.
// However, the variable is still equal to 100.
DestroyDynamicObject(road);
// Another global variable gets initialized in some function to create a bridge object.
// Since the road object was just destroyed, this variable is also equal to 100.
bridge = CreateDynamicObject(...);
// The function that destroys the road object is called again before another road object is created.
// Although the road object no longer exists, both the "road" and "bridge" variables are still equivalent.
// Therefore, the bridge object gets destroyed.
DestroyDynamicObject(road);
#define BULLET_HIT_TYPE_NONE 0 #define BULLET_HIT_TYPE_PLAYER 1 #define BULLET_HIT_TYPE_VEHICLE 2 #define BULLET_HIT_TYPE_OBJECT 3 forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);