[Plugin] Streamer Plugin

Well I liked this FIlter Script can be use in many Ways ;o
Reply

Wait for Incognito
Reply

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
It's indeed not possible with the plugin. If you want to attach certain objects to a player, I suggest you use CreateObject and AttachObjectToPlayer for those specific objects. An AttachDynamicObjectToPlayer function doesn't exist, unfortunately.
It used to exist and would have made a great multi-purpose function but it got removed for SetPlayerAttachedObject()
https://sampwiki.blast.hk/wiki/AttachPlayerObjectToPlayer what poor choice by the SAMP team they should have left it in and just had both.
Reply

Is anyone having problems with checkpoints not being destroyed when DestroyDynamicCP is called? It is worth mentioning that I've hooked it with:

pawn Код:
stock _DestroyDynamicCP(&cpid)
{
    DestroyDynamicCP(cpid);
    cpid = -1;
}
#define DestroyDynamicCP _DestroyDynamicCP
Reply

How can I use the default OnPlayerEditObject and OnPlayerSelectObject functions while also using it's counterparts, OnPlayerEditDynamicObject and OnPlayerSelectDynamicObject? I need to use static objects and the default functions aren't getting called!
Reply

I am confused I am creating an cube area near a Npc I created but When the npc moves it requires to be updated how to get the position and update the cube
Reply

pocha nao entendi nada
Reply

When using SelectObject (playerid), and we pass the mouse over the items, information is (objectid, ModelID, X, Y, Z ....).

I would like to know how to get the IDs of objects in script.

For example:

I create an object ID: 147
I create an object ID: 148
I create an object ID: 149

I delete the object ID: 148
Object ID: 149 becomes the object ID: 148
Reply

i love it. keep it up
Reply

Quote:
Originally Posted by Ultrascipter
Посмотреть сообщение
When using SelectObject (playerid), and we pass the mouse over the items, information is (objectid, ModelID, X, Y, Z ....).

I would like to know how to get the IDs of objects in script.

For example:

I create an object ID: 147
I create an object ID: 148
I create an object ID: 149

I delete the object ID: 148
Object ID: 149 becomes the object ID: 148
You need to assign the object with a variable. For example;

pawn Код:
new tempVariable[3];

tempVariable[0] = CreateDynamicObject(.......
tempVariable[1] = CreateDynamicObject(.......
tempVariable[2] = CreateDynamicObject(.......
Then you will use those variable to do something with the objects. For an example, let's delete the 2nd object we created.

pawn Код:
if(tempVariable[1] == objectid) { DestroyDynamicObject(tempVariable[1]) }
And if you actually want the ID of the object, just printf the variable.

pawn Код:
printf("%d", tempVariable[1]);
Reply

I currently have a variable for each object as you said.

My server uses all dynamic objects (global object, object placed, distributor object, vehicle object, object retarder object work ...)

The coefficient according confused objects is huge with over 3500 items.

Exemple:

Код:
new object[440];
public OnGameModeInit()
{
object[1] = CreateDynamicObject
object[2] = CreateDynamicObject
object[3] = CreateDynamicObject
object[4] = CreateDynamicObject
}
public OnPlayerEditDynamicObject(playerid, objectid, modelid,X, Y, Z)
{
DestroyDynamicObject(object[3]);
// Here, the object ID 4 becomes the object ID 3. There is indeed an auto increment

After in-game by another player:
DestroyDynamicObject(object[4]);

It removes the effect variable script, but the real object In Game

// Hop confusion !!


}
Reply

Quote:
Originally Posted by Ultrascipter
Посмотреть сообщение
I currently have a variable for each object as you said.

My server uses all dynamic objects (global object, object placed, distributor object, vehicle object, object retarder object work ...)

The coefficient according confused objects is huge with over 3500 items.

Exemple:

Код:
new object[440];
public OnGameModeInit()
{
object[1] = CreateDynamicObject
object[2] = CreateDynamicObject
object[3] = CreateDynamicObject
object[4] = CreateDynamicObject
}
public OnPlayerEditDynamicObject(playerid, objectid, modelid,X, Y, Z)
{
DestroyDynamicObject(object[3]);
// Here, the object ID 4 becomes the object ID 3. There is indeed an auto increment

After in-game by another player:
DestroyDynamicObject(object[4]);

It removes the effect variable script, but the real object In Game

// Hop confusion !!


}
Separate it with different variables instead of using the same variable for different objects.

Example:

pawn Код:
new HQDoor;
new HQGate;
Unless it's mapping, then there is no reason to assign a variable to them.
Reply

Guys, I'm coming up to coding a teleporting feature, which I cannot test under optimal load at the moment, but only on localhost, where the problem with objects not loading quickly enough doesn't appear.

Or actually, this is the issue I have experienced:
1) The script calls UpdateEx function with new coordinates
2) Player is teleported to location, objects are visible
3) Objects disappear in the blink of an eye
4) Objects reappear, but the player has already fallen

At least I think this is the issue. Also when I do:
1) Manual CreatePlayerObject to create the static object at the new location
2) Teleport player
3) The static object is there, the other objects are streamed in some time

What have you guys done to overcome this issue? I have a few things on my mind (one is to use UpdateEx, then toggle off item updating using ToggleItemUpdate, and perhaps I'll get around to testing), but would love to hear some first-hand experience.

My current project architecture would not appreciate having CreateObject global objects around all the time.
Reply

Quote:
Originally Posted by AndreT
Посмотреть сообщение
Guys, I'm coming up to coding a teleporting feature, which I cannot test under optimal load at the moment, but only on localhost, where the problem with objects not loading quickly enough doesn't appear.

Or actually, this is the issue I have experienced:
1) The script calls UpdateEx function with new coordinates
2) Player is teleported to location, objects are visible
3) Objects disappear in the blink of an eye
4) Objects reappear, but the player has already fallen

At least I think this is the issue. Also when I do:
1) Manual CreatePlayerObject to create the static object at the new location
2) Teleport player
3) The static object is there, the other objects are streamed in some time

What have you guys done to overcome this issue? I have a few things on my mind (one is to use UpdateEx, then toggle off item updating using ToggleItemUpdate, and perhaps I'll get around to testing), but would love to hear some first-hand experience.

My current project architecture would not appreciate having CreateObject global objects around all the time.
I'm experiencing this too, my temporary solution isn't so good though, I use static objects for the base and on other teleports I just freeze the player for a couple of seconds while the objects load.
Reply

delete
Reply

It's usually best to limit your streamed objects to about 800 max then you can use a few CreateObject()'s to catch the player teleporting in and also freeze them for extra security. Updating the streamer and teleporting the player is not particularly effective from my experience and a few catch objects won't hurt at all. Interestingly updating the streamer when the player say logs in and spawns works well you really have to experiment to know the streamers limits and capabilities. In fact certain things the streamer is not very good at doing such as a moveobject animations that involve looping multiple frames this gives very poor performance but for a simple open close gate is not a problem.
Reply

Could you please possibly make that dynamic map icons can be set as global map icons? It's kinda annoying when you have to go somewhere (follow where the map icons is) and you have to be close to see it.
Reply

What I do to prevent people from falling through the map:
I freeze the players when they are teleported, and then state "Press SPRINT_KEY to unfreeze and continue". Via this way, people who have quickly loading objects don't have to wait long and people who have problems with slow loading objects don't fall through the map.
Reply

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
What I do to prevent people from falling through the map:
I freeze the players when they are teleported, and then state "Press SPRINT_KEY to unfreeze and continue". Via this way, people who have quickly loading objects don't have to wait long and people who have problems with slow loading objects don't fall through the map.
Or just freeze a player for three seconds. That is enough for a player to have all surrounding objects loaded.
Reply

My Text Labels do not seem to work anymore.
Код:
BusinessInfo[b][bTextLabel] = CreateDynamic3DTextLabel(string, COLOR_WHITE, BusinessInfo[b][bPosition][0], BusinessInfo[b][bPosition][1], BusinessInfo[b][bPosition][2], 20.0);
It just flickers then disappears, any idea what's wrong?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)