Re: Streamer Plugin -
Reboma - 06.02.2014
Is it possible to make an OnDynamicObjectStreamIn and OnDynamicObjectStreamOut?
With script or somehow?
Re: Streamer Plugin -
fordawinzz - 06.02.2014
I have another problem with CreateDynamicMapIconEx.. I created a list which works okay, if I print it nothing is wrong.. but when I create the mapicon it shows to everybody.. don't know what's wrong:
pawn Код:
E_PTEMP[i][pHurtIcon] = CreateDynamicMapIconEx(x, y, z, 22, 0, MAPICON_GLOBAL, .streamdistance = 6000.0, .players = Medics_List, .maxplayers = 50);
the list looks like this:
0 - 0, 1 - 1, 2 - 65535, 3 - 65535, ... 49 - 65535
btw: I tried with both setting the default value to INVALID_PLAYER_ID and -1, none worked...
Re: Streamer Plugin -
Incognito - 09.02.2014
The array you pass should only contain the player IDs which will be able to see the map icon. You shouldn't put INVALID_PLAYER_ID in there. Specifying an out-of-bounds number will just set every bit in the bit array. The reason for this is that it allows you to pass { -1 } instead of an array 500 or 1000 cells large.
For example, if you wanted to make the map icon visible for player IDs 0 and 1 only, then you'd just do this:
pawn Код:
new players[] = { 0, 1 };
CreateDynamicMapIconEx(x, y, z, type, color, style, .players = players);
Re: Streamer Plugin -
Incognito - 09.02.2014
Yes, but in that case, you could just limit the size of the array so that any extraneous values aren't passed to the plugin.
pawn Код:
// We can just assume MAX_PLAYERS is 500.
new players[MAX_PLAYERS];
players[0] = 1;
players[1] = 4;
players[2] = 7;
// Result: { 1, 4, 7, 0, ... }
// However, we only want the first 3 values, so we'll just set "maxplayers" to 3.
CreateDynamicObjectEx(..., .players = players, .maxplayers = 3);
Re: Streamer Plugin -
fordawinzz - 09.02.2014
ok , this is how I build the list:
pawn Код:
for(new i = 0; i < sizeof Medics_List; i++) { //OnPlayerDisconnect
if(Medics_List[i] == playerid) {
Medics_Counter --;
Medics_List[i] = INVALID_PLAYER_ID;
break;
}
}
if(Medics_Counter == 0) { //Login code
Medics_List[0] = playerid;
Medics_Counter ++;
}
else if(Medics_Counter > 0) {
for(new i = 0; i < sizeof Medics_List; i++) {
if(Medics_List[i] == INVALID_PLAYER_ID) {
Medics_List[i] = playerid;
Medics_Counter ++;
break;
}
}
}
What if I actually wanted ID 0 to see the icon?
I've set the maxplayers parameter to Medics_Counter.. Trying if this works now
yep, it works now .. thanks !
Re: Streamer Plugin -
ikey07 - 09.02.2014
Im just letting know that random object disappearing issue was in my script, I had random house fires, and I was reseting fire objects ( destroying ) them before creating new fire, but as I already destroyed them when firefighters cleared out the fire, variables with assigned IDs still had dynamic object IDs, so I was destroying other objects which had the same ids as fire object IDs, I hope it made a sense.
Video, just for a reference:
[ame]http://www.youtube.com/watch?v=AJI-Rpp4QwI[/ame]
Anyhow, sleep well by knowing that there isn't an issue in the plugin
PS. It took me only 3 years to find this out, that I have a bug in the script
Re: Streamer Plugin -
IstuntmanI - 09.02.2014
Quote:
Originally Posted by ikey07
Im just letting know that random object disappearing issue was in my script, I had random house fires, and I was reseting fire objects ( destroying ) them before creating new fire, but as I already destroyed them when firefighters cleared out the fire, variables with assigned IDs still had dynamic object IDs, so I was destroying other objects which had the same ids as fire object IDs, I hope it made a sense.
Video, just for a reference:
http://www.youtube.com/watch?v=AJI-Rpp4QwI
Anyhow, sleep well by knowing that there isn't an issue in the plugin
PS. It took me only 3 years to find this out, that I have a bug in the script
|
So you solved it ?
You should reset the variable when you are deleting an object ID:
pawn Код:
new Obj = -1;
// Somewhere
Obj = CreateDynamicObject( ... );
// Somewhere else
if( Obj != -1 )
{
DestroyDynamicObject( Obj );
Obj = -1;
}
Re: Streamer Plugin -
ikey07 - 09.02.2014
I should have and well now I set variables to -1 whenever I delete an object, I had a loop without checking anything just
for(new i; i < sizeof(SmokeMakers); i++)
{
DestroyDynamicObject(SmokeMakers[i]);
}
I had it in the 5 minute timer in random, so thats why it was so rare, as not always these objects had the same IDs, and fire started in random, so i couldnt find it out.
But today after I added neon system, players started to get smokes and fires at their cars instead of neon, so I get it, its smething about SmokeMaker objects
Thanksfully its solved now, no more random disappearing road blocks or house furniture or growing marijuana pots. it fixed tons of bugs
Re: Streamer Plugin -
cm666 - 13.02.2014
plugin normal work on 0.3z ?
Re: Streamer Plugin -
Cole_William - 13.02.2014
When will you update for 0.3z?
Re: Streamer Plugin -
iZN - 13.02.2014
Quote:
Originally Posted by Cole_William
When will you update for 0.3z?
|
Hm?
https://github.com/samp-incognito/sa...lugin/releases
Re: Streamer Plugin -
cm666 - 14.02.2014
Quote:
Originally Posted by iZN
|
This version compatibly on 1000p ?
Re: Streamer Plugin -
kurta999 - 14.02.2014
Quote:
Originally Posted by cm666
This version compatibly on 1000p ?
|
https://github.com/samp-incognito/sa...37bc2f6a42138d
+#define MAX_PLAYERS (1000)
So yes, there is only 1000 players version which also work with 1000p and 500p version too.
Incognito, the Streamer_GetCellSize()/GetCellDistance() doesn't work, please fix it.
+cell AMX_NATIVE_CALL Natives::Streamer_GetCellSize(AMX *amx, cell *params)
+{
+ CHECK_PARAMS(
2, "Streamer_GetCellSize");
+ float cellSize = core->getGrid()->getCellSize();
+ Utility:
toreFloatInNative(amx, params[2], cellSize);
+ return 1;
+}
I'll update YSF, so if someone will add AttachPlayerObjectToPlayer & AttachPlayerObjectToPlayerObject support for the streamer engine, then these functions will work.
Re: Streamer Plugin -
CKA3KuH - 14.02.2014
Quote:
streamer.inc(487) : warning 219: local variable "hitid" shadows a variable at a preceding level
|
fix it.
Re: Streamer Plugin -
xeeZ - 14.02.2014
Quote:
Originally Posted by CKA3KuH
fix it.
|
It's your fault.
Код:
warning 219: local variable "x" shadows a variable at a preceding level
Re: Streamer Plugin -
CKA3KuH - 14.02.2014
Quote:
Originally Posted by xeeZ
It's your fault.
Код:
warning 219: local variable "x" shadows a variable at a preceding level
|
You are wrong. Look at this line in the file.
Re: Streamer Plugin -
xeeZ - 14.02.2014
Quote:
Originally Posted by CKA3KuH
You are wrong. Look at this line in the file.
|
I did look at it, it's just a forward declaration. You are looking in the wrong place, the warning comes from somewhere else. Search for a global variable with the same name.
Re: Streamer Plugin -
caoraivoso3 - 14.02.2014
IsValidObject function is to see if the object id exists or not?
Re: Streamer Plugin -
'Pawno. - 15.02.2014
How can I set the "attached 3d text label" position on the vehicle?
When I create the 3d text label and the position is like "0.0, 0.0, 1.5" nothing happens. (It's attached to the vehicle!)
Anybody can help me?
Re: Streamer Plugin -
dominik523 - 15.02.2014
Some people had issues with OnPlayerWeaponShot lacks a definition and other things. Make sure you place this code above #include <streamer>
pawn Код:
/////
#define BULLET_HIT_TYPE_NONE 0
#define BULLET_HIT_TYPE_PLAYER 1
#define BULLET_HIT_TYPE_VEHICLE 2
#define BULLET_HIT_TYPE_OBJECT 3
#define BULLET_HIT_TYPE_PLAYER_OBJECT 4
forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
/////
#include <streamer>