[Plugin] Streamer Plugin

Incognito: please make CreateDynamicObject start from the first available ID (id = CreateDynaO.), because after destroying some objects and creating new ones will just start again from highest id used (even DestroyAllDynaO. does not reset to 0)
Reply

I'm wanting the checkpoint to be destroyed after a player uses it, but only for that person. I've tried using the DestroyDynamicCP but it doesn't seem to be working. I have it set so when a player drives into a checkpoint it destroys their current car and puts them into a new one. I'm just wondering how to get it to work properly. Thanks.


Edit: Fixed. Thanks Garsino!
Reply

Can you explain to me why I'm getting hundreds of these warnings when I've added your plugin?!



EDIT: Never mind, was my mistake.

Although, doing this gives me some warnings:

pawn Код:
if(PlayerInfo[playerid][Level] == 2)
    {
    new Text3D:Moderator3D;
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    Moderator3D = CreateDynamic3DTextLabel("Moderator", MOD, X, Y, Z, 40.0, playerid);
        //Attach3DTextLabelToPlayer(Moderator3D,playerid,X, Y, Z);
        return 1;
    }
spits out:

Код:
C:\Documents and Settings\Ben\Desktop\Projects\gamemodes\LSX.pwn(2672) : warning 204: symbol is assigned a value that is never used: "Moderator3D"
Why?
Reply

Exactly as it says, you assign Moderator3D a value from CreateDynamic3DTextLabel but you never use it. Once you uncomment that Attach3DTextLabelToPlayer line or use it in some other way the warning will disappear.
Reply

Thanks for the response, Simon

Yes, but ... I thought that CreateDynamic3DTextLabel handles the attaching? Otherwise what's the "attachplayer" parameter for? D:
Reply

Quote:
Originally Posted by _❼_
Thanks for the response, Simon

Yes, but ... I thought that CreateDynamic3DTextLabel handles the attaching? Otherwise what's the "attachplayer" parameter for? D:
It does. Simon hasn't said anything about attaching itself only assigining variable.
Reply

Yes, CreateDynamic3DTextLabel handles the attaching.

You should store the returned textlabel id only if you plan to do something with it later like

Код:
DestroyDynamic3DTextLabel 
IsValidDynamic3DTextLabel
UpdateDynamic3DTextLabelText
If you're not using it anywhere else, it just gaves you that warning.

Otherwise, just use:

pawn Код:
if(PlayerInfo[playerid][Level] == 2)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    CreateDynamic3DTextLabel("Moderator", MOD, X, Y, Z, 40.0, playerid);
    return 1;
}
Reply

I love this streamer it is awesome
Reply

Quote:
Originally Posted by =Contador=
Incognito: please make CreateDynamicObject start from the first available ID (id = CreateDynaO.), because after destroying some objects and creating new ones will just start again from highest id used (even DestroyAllDynaO. does not reset to 0)
Looks like it's just a problem with DestroyAllDynamicObjects, but it's very easy to fix (in fact, I have a better and faster way of assigning IDs now, so I may just add that in as well). As a workaround, you can simply use DestroyDynamicObject in a loop to make the next created objects start from the lowest IDs.
Reply

Quote:
Originally Posted by [03
Garsino ]
Object loading while in a vehicle is SLOW!
Can you do anything about it?
Reply

Quote:
Originally Posted by [03
Garsino ]
Quote:
Originally Posted by [03
Garsino ]
Object loading while in a vehicle is SLOW!
Can you do anything about it?
Not only are they slow, they hardly appear for me. Sometimes all the objects around spawn, but little things such as fences and some walls do not appear.
Reply

Quote:
Originally Posted by Sma_X
Yes, CreateDynamic3DTextLabel handles the attaching.

You should store the returned textlabel id only if you plan to do something with it later like

Код:
DestroyDynamic3DTextLabel 
IsValidDynamic3DTextLabel
UpdateDynamic3DTextLabelText
If you're not using it anywhere else, it just gaves you that warning.

Otherwise, just use:

pawn Код:
if(PlayerInfo[playerid][Level] == 2)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    CreateDynamic3DTextLabel("Moderator", MOD, X, Y, Z, 40.0, playerid);
    return 1;
}
I do ... I delete them later .. like when a moderator leaves their 3DLabel will need to be destroyed won't it? Otherwise the person who joins after them will get the label?
Reply

Save it in PVar not local variable then

Код:
SetPVarInt(playerid,"ModLabel",_:CreateDynamic3DTextLabel("Moderator", MOD, X, Y, Z, 40.0, playerid));
and later
Код:
DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid,"ModLabel"));
Btw, do you have more than 2048, so you need to stream them? If you don't have mroe thna 2048 labels then it's useless to stream them.
Reply

Quote:
Originally Posted by $ЂЯĢ
Save it in PVar not local variable then

Код:
SetPVarInt(playerid,"ModLabel",_:CreateDynamic3DTextLabel("Moderator", MOD, X, Y, Z, 40.0, playerid));
and later
Код:
DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid,"ModLabel"));
Btw, do you have more than 2048, so you need to stream them? If you don't have mroe thna 2048 labels then it's useless to stream them.
I use them for Properties, Info at various places, NPC's and players ... so quite alot. I haven't learnt PVars yet ... is it really necessary to use PVar?
Reply

It is the best way to do.

Question remains, do you have more thna 2048 labels? Even if you use them a lot, 2k is not small amount.
Reply

Nah man, I think.. wait let's count...

• 200/250 for properties ... so let's say 250.
• Uhh, maybe like 20 for NPC's
• Calling it 500 for players since it has to be max just incase a server has 500.
• Maybe like .. 20/30 for info and other shit ..

So no ... but I was thinking it would be more efficient to stream them since 1000+ 3D Labels is alot .. especially if nobody is around to see them?
Reply

Quote:
Originally Posted by _❼_
Nah man, I think.. wait let's count...

• 200/250 for properties ... so let's say 250.
• Uhh, maybe like 20 for NPC's
• Calling it 500 for players since it has to be max just incase a server has 500.
• Maybe like .. 20/30 for info and other shit ..

So no ... but I was thinking it would be more efficient to stream them since 1000+ 3D Labels is alot .. especially if nobody is around to see them?
No, the only reason to stream 3DText's is if you need more than you are allowed, by default... Nothing more.
Reply

Quote:
Originally Posted by _❼_
Nah man, I think.. wait let's count...

�200/250 for properties ... so let's say 250.
�Uhh, maybe like 20 for NPC's
�Calling it 500 for players since it has to be max just incase a server has 500.
�Maybe like .. 20/30 for info and other shit ..

So no ... but I was thinking it would be more efficient to stream them since 1000+ 3D Labels is alot .. especially if nobody is around to see them?
Limit wouldn't be 2048 if it couldn't handle it. And with streaming labels you make just more work because streamer needs to do checking on labels all the time and SA:MP server needs to do the same, so double work.
Reply

Another suggestion. Make that when item is created it's automatically checked if it needs to be streamed for anyone.

Let's take an example. I stand somewhere and deploy roadblock. If I don't move it won't show up, so I have to move a bit to see it. IT would be much better if it showed up regardless I moved sincle last check or no.
Reply

Quote:
Originally Posted by Tɧ϶ Tσηί�
Speaking of CreateDynamicMapIcon(); -- When you create a new one, is an ID automatically assigned? Because I saw that in the original function, you have to fill out the params, but in this Streamer you don't have too.
What would be point of streamer if you still weren't able to have more than 100 icons?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)