[Plugin] Streamer Plugin

I don't know why the labels disappear without any code, but I guess it's SA-MP bug when the labels are mixed up. That is, having more than 1 label on the same vehicle. Sometimes SA-MP still mix up 2 vehicles as the same one, so you get 2 labels on the same vehicle. To solve it you have to check if the vehicle has that label first. If so, remove it and then create a new one. You can't assume the label doesn't exist.
Reply

I guess a label id is used a second time after destroying, because that would explain the problem.
Therefore, I have to reset the 3D Text variable. But how?

Quote:

DestroyDynamic3DTextLabel(VehicleInfo[VehID][VehicleLabel]);
VehicleInfo[VehID][VehicleLabel] = INVALID_3DTEXT_ID;

This doesn't work, because of tag mismatch.

What is the invalid ID for the streamer?

edit:
Код:
Text3D:INVALID_3DTEXT_ID
works fine!
Reply

Someone help me! How to fix this errors and warnings?
Quote:

H:\Users\Elmars\Desktop\SAMP - Copy\pawno\include\streamer.inc(155) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
H:\Users\Elmars\Desktop\SAMP - Copy\pawno\include\streamer.inc(313) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditObject")
H:\Users\Elmars\Desktop\SAMP - Copy\pawno\include\streamer.inc(336) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectObject")
H:\Users\Elmars\Desktop\SAMP - Copy\pawno\include\streamer.inc(33 : error 017: undefined symbol "SELECT_OBJECT_PLAYER_OBJECT"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply

Quote:
Originally Posted by Niknais14
Посмотреть сообщение
Someone help me! How to fix this errors and warnings?
Update your SA:MP includes and open your script with pawno from that folder.
Reply

You mean a_samp.inc
Reply

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
Update your SA:MP includes and open your script with pawno from that folder.
What do you mean with "Update your SA:MP includes"?
Reply

Quote:
Originally Posted by Niknais14
Посмотреть сообщение
What do you mean with "Update your SA:MP includes"?
Download the newest version of the SA-MP server. That is what it means. You need the updated includes in that download.
Reply

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
Download the newest version of the SA-MP server. That is what it means. You need the updated includes in that download.
Still nothing, can i send to you my server and you fix it?
Reply

Maybe make a forced update before attaching the camera. They won't appear until you move (unless you turn it on using Streamer_ToggleIdleUpdate). I am also making an in-game editor that fulfills my needs.
Reply

why does it tell me that the server didnt respond please help
Reply

Quote:
Originally Posted by the_chaoz
Посмотреть сообщение
Well looks like won't get this pice of code working like I want:
pawn Код:
stock StartEditor(playerid)
{
    new Float:P[3];
    TogglePlayerSpectating(playerid, true);
    GetPlayerCameraPos(playerid, P[0], P[1], P[2]);
    gPlayers[playerid][CameraObject] = CreateDynamicObject(19300, P[0], P[1], P[2], 0.0, 0.0, 0.0, .playerid = playerid);
    AttachCameraToDynamicObject(playerid, gPlayers[playerid][CameraObject]);
    gPlayers[playerid][Mode] = PLAYER_MODE_EDITOR;
    return 1;
}
Yes I know, the object must be streamed in in order to AttachCameraToDynamicObject work. I've tryed from a timer to make a delay, to re-order so the camera coords are obtained after the player enter on spec mode, etc. And nothing work.

Does anyone have any clue?
Quote:
Originally Posted by leong124
Посмотреть сообщение
Maybe make a forced update before attaching the camera. They won't appear until you move (unless you turn it on using Streamer_ToggleIdleUpdate). I am also making an in-game editor that fulfills my needs.
You can also use Streamer_Update or Streamer_UpdateEx immediately after CreateDynamicObject. It will re-synchronize all the objects. (Even if IdleUpdate is disabled.) I don't think there's a function to re-synchronise a single object.
Reply

Looks like TogglePlayerSpectating is the problem. It doesn't matter where I use Streamer_Update combined or not with Streamer_ToggleIdleUpdate an vice versa, I just end Specing nowhere.
Reply

My code uses TogglePlayerSpectating and I don't have any problem. I haven't turn it off since I haven't make the testing mode. Anything other than that mode shouldn't turn if off. I also use Streamer_UpdateEx before AttachCameraToDynamicObject.
I create a camera once the server starts and destroy it when free camera mode is off. When I want to move it again, I'll create the camera object and use Streamer_UpdateEx before AttachCameraToDynamicObject. So, TogglePlayerSpectating may not be the problem.
Reply

Quote:
Originally Posted by the_chaoz
Посмотреть сообщение
Well looks like won't get this pice of code working like I want:
pawn Код:
stock StartEditor(playerid)
{
    new Float:P[3];
    TogglePlayerSpectating(playerid, true);
    GetPlayerCameraPos(playerid, P[0], P[1], P[2]);
    gPlayers[playerid][CameraObject] = CreateDynamicObject(19300, P[0], P[1], P[2], 0.0, 0.0, 0.0, .playerid = playerid);
    AttachCameraToDynamicObject(playerid, gPlayers[playerid][CameraObject]);
    gPlayers[playerid][Mode] = PLAYER_MODE_EDITOR;
    return 1;
}
Yes I know, the object must be streamed in in order to AttachCameraToDynamicObject work. I've tryed from a timer to make a delay, to re-order so the camera coords are obtained after the player enter on spec mode, etc. And nothing work.

Does anyone have any clue?
Use Streamer_Update(playerid) after you create the dynamic object, only then edit it.
Reply

*** Streamer Plugin: Obsolete or invalid native "Streamer_CallbackHook" found (script needs to be recompiled with the latest include file)
Reply

pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if (pickupid == skinShop)
    {
        if (GetPlayerMoney(playerid) < SKIN_COST)
            return SendClientMessage(playerid, COLOR_WHITE, "[ {ff0000}klaida {ffffff}]: Jыs neturite {ff0000}$"#SKIN_COST"");

        printf("A");
        ShowModelSelectionMenu(playerid, (pInfo[playerid][statsGender] == 1) ? (maleSkins) : (femaleSkins), "KAINA - $"#SKIN_COST"");
        printf("B");
    }

    return (true);
}
pawn Код:
skinShop = CreateDynamicPickup(1275, 1, 214.5725, -40.2552, 1002.0234, 4, 1);
I can see the pickup, but when I pick it up, nothing happens [I thought its ShowModelSelectionMenu, but it isnt. I dont even see A print message.
Reply

I have this terrible bug where the objects seem to stream in at around a distance of 40.0/50.0, I am using this code since we moved to 0.3x
Код:
for (new o, s = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); o != s; o++)
	{
		if (IsValidDynamicObject(o))
		{
			new Float: distance;
			Streamer_GetFloatData(STREAMER_TYPE_OBJECT, o, E_STREAMER_STREAM_DISTANCE, distance);
			Streamer_SetFloatData(STREAMER_TYPE_OBJECT, o, E_STREAMER_DRAW_DISTANCE, distance+450);
		}
	}
But oddly, it doesn't seem to work. If i restart the server the streaming seems fine for a few minutes then it goes back to streaming around 40.0/50.0. Its really annoying and my players are getting annoyed.

Any advice/help?
Reply

Quote:
Originally Posted by cordellpwnz
Посмотреть сообщение
*** Streamer Plugin: Obsolete or invalid native "Streamer_CallbackHook" found (script needs to be recompiled with the latest include file)
That's what you have to do. Open your script and compile them with the F5 button in pawno.

Quote:
Originally Posted by BaubaS
Посмотреть сообщение
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if (pickupid == skinShop)
    {
        if (GetPlayerMoney(playerid) < SKIN_COST)
            return SendClientMessage(playerid, COLOR_WHITE, "[ {ff0000}klaida {ffffff}]: Jыs neturite {ff0000}$"#SKIN_COST"");

        printf("A");
        ShowModelSelectionMenu(playerid, (pInfo[playerid][statsGender] == 1) ? (maleSkins) : (femaleSkins), "KAINA - $"#SKIN_COST"");
        printf("B");
    }

    return (true);
}
pawn Код:
skinShop = CreateDynamicPickup(1275, 1, 214.5725, -40.2552, 1002.0234, 4, 1);
I can see the pickup, but when I pick it up, nothing happens [I thought its ShowModelSelectionMenu, but it isnt. I dont even see A print message.
Check if OnPlayerPickUpDynamicPickup is actually called, and whether "if (GetPlayerMoney(playerid) < SKIN_COST)" calls.

Quote:
Originally Posted by Shadow_
Посмотреть сообщение
I have this terrible bug where the objects seem to stream in at around a distance of 40.0/50.0, I am using this code since we moved to 0.3x
Код:
for (new o, s = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); o != s; o++)
	{
		if (IsValidDynamicObject(o))
		{
			new Float: distance;
			Streamer_GetFloatData(STREAMER_TYPE_OBJECT, o, E_STREAMER_STREAM_DISTANCE, distance);
			Streamer_SetFloatData(STREAMER_TYPE_OBJECT, o, E_STREAMER_DRAW_DISTANCE, distance+450);
		}
	}
But oddly, it doesn't seem to work. If i restart the server the streaming seems fine for a few minutes then it goes back to streaming around 40.0/50.0. Its really annoying and my players are getting annoyed.

Any advice/help?
At least you shouldn't change the draw distance, but the stream distance in Streamer_SetFloatData. You should check whether your code of CreateDynamicObject have set the draw and stream distance correctly.
Reply

This error is caused by?
Reply

EDIT: Seemed to be an issue with fsdebug. Disregard.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)