SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 01/05/2017, 07:48 AM   #5611
babeng
Little Clucker
 
Join Date: Aug 2016
Posts: 1
Reputation: 0
Default Re: Streamer Plugin

How to install this? i really dont understand anything
babeng is offline   Reply With Quote
Old 01/05/2017, 07:53 AM   #5612
TommyB
Beta Tester
 
TommyB's Avatar
 
Join Date: Sep 2010
Location: Texas, USA.
Posts: 170
Reputation: 137
Default Re: Streamer Plugin

Quote:
Originally Posted by coool View Post
How can i set the offsets of attached 3d text label on vehicle ??
I'm not entirely sure but you could probably use Streamer_SetFloatData to edit E_STREAMER_ATTACH_OFFSET_X, E_STREAMER_ATTACH_OFFSET_Y, and E_STREAMER_ATTACH_OFFSET_Z. If that doesn't work see if manipulating any other position in the enum would do the trick.
__________________

Last edited by TommyB; 05/05/2017 at 02:32 PM.
TommyB is offline   Reply With Quote
Old 05/05/2017, 10:34 PM   #5613
rt-2
Huge Clucker
 
rt-2's Avatar
 
Join Date: Jun 2011
Location: Montréal, Québec, Canada
Posts: 283
Reputation: 24
Default Re: Streamer Plugin

There use to be a description of the parameters for "CreateDynamicObject" on this page, you removed it and it's not on the wiki, thank you
__________________
rt-2
My hardcore first person 1994 simulation in development:
SA Advance Roleplay
rt-2 is offline   Reply With Quote
Old 06/05/2017, 04:06 AM   #5614
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,856
Reputation: 602
Default Re: Streamer Plugin

Quote:
Originally Posted by rt-2 View Post
There use to be a description of the parameters for "CreateDynamicObject" on this page, you removed it and it's not on the wiki, thank you
It is in the wiki, the streamer wiki. It's on GitHub.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 06/05/2017, 11:47 AM   #5615
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,962
Reputation: 197
Default Re: Streamer Plugin



Whenever I spawn. I'm aware of where the issue is, but don't understand why it happens:



I have the validation checks. That message in the console is more sort of the warning for me than a critical since it doesn't crash anything or something.

OnPlayerLookAt is in SetTimerEx called in OnPlayerSpawn (ONCE).
__________________
Riddick94 is offline   Reply With Quote
Old 06/05/2017, 12:21 PM   #5616
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,251
Reputation: 326
Default Re: Streamer Plugin

E_STREAMER_EXTRA_ID is integer not array
AbyssMorgan is offline   Reply With Quote
Old 06/05/2017, 12:31 PM   #5617
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,962
Reputation: 197
Default Re: Streamer Plugin

Quote:
Originally Posted by AbyssMorgan View Post
E_STREAMER_EXTRA_ID is integer not array
Elaborate. What would you do instead?
__________________
Riddick94 is offline   Reply With Quote
Old 06/05/2017, 01:10 PM   #5618
ball
Huge Clucker
 
ball's Avatar
 
Join Date: Jul 2012
Location: Poznan, Poland
Posts: 288
Reputation: 33
Default Re: Streamer Plugin

E_STREAMER_EXTRA_ID could be array, could be integer. Are you sure it happens in that function? Add some debug, print the object's id and ensure that this object exist.
ball is offline   Reply With Quote
Old 06/05/2017, 01:25 PM   #5619
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,962
Reputation: 197
Default Re: Streamer Plugin

Quote:
Originally Posted by ball View Post
E_STREAMER_EXTRA_ID could be array, could be integer. Are you sure it happens in that function? Add some debug, print the object's id and ensure that this object exist.
Of course the object MAY or may NOT exist. The function is being called every some time using SetPlayerTimerEx - the timer is being called JUST ONCE player is spawned (not every respawn though).

So, I have commented the line where the timer is being called for player in OnPlayerSpawn and the warning message doesn't appear in the console.

So, the issue appears to be in the "OnPlayerLookAt" code. As I have said before, I have added IF statement validations to check if the object exists or not for the player so it SHOULDN'T come up with anything like that in the console.

Some more code, if you'd like:
native
pawn Code:
stock GetPlayerCameraDynamicObject(playerid)return Streamer_GetItemStreamerID(playerid, STREAMER_TYPE_OBJECT, GetPlayerCameraTargetObject(playerid));

OnPlayerLookAt
pawn Code:
new lookingat_objectid = GetPlayerCameraDynamicObject(playerid);
    if(IsValidDynamicObject(lookingat_objectid))
    {
        if(PlayerData[playerid][E_PLAYER_LOOKING_AT_ITEMID] == INVALID_OBJECT_ID)
        {
            new object_data[10];
            Streamer_GetArrayData(STREAMER_TYPE_OBJECT, lookingat_objectid, E_STREAMER_EXTRA_ID, object_data, sizeof(object_data));

            new itemid = object_data[0];
            if(ItemData[itemid][E_ITEM_TYPE] != ITEM_TYPE_NONE)
            {
                if(Streamer_IsInArrayData(STREAMER_TYPE_OBJECT, lookingat_objectid, E_STREAMER_EXTRA_ID, INVALID_3DTEXT_ID))
                {
                    PlayerData[playerid][E_PLAYER_LOOKING_AT_ITEMID] = lookingat_objectid;

                    object_data[9] = _:CreateDynamic3DTextLabel(ItemData[itemid][E_ITEM_NAME], COLOR_NICK, Float:object_data[3], Float:object_data[4], Float:object_data[5], 2.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, false, object_data[6], object_data[7], playerid, 5.0);
                    Streamer_SetArrayData(STREAMER_TYPE_OBJECT, lookingat_objectid, E_STREAMER_EXTRA_ID, object_data, sizeof(object_data));

                    Streamer_Update(playerid, STREAMER_TYPE_3D_TEXT_LABEL);
                }
            }
        }
    }

    else
    {
        if(PlayerData[playerid][E_PLAYER_LOOKING_AT_ITEMID] != INVALID_OBJECT_ID)
        {
            new object_data[10];
            Streamer_GetArrayData(STREAMER_TYPE_OBJECT, PlayerData[playerid][E_PLAYER_LOOKING_AT_ITEMID], E_STREAMER_EXTRA_ID, object_data, sizeof(object_data));

            if(Streamer_IsInArrayData(STREAMER_TYPE_OBJECT, PlayerData[playerid][E_PLAYER_LOOKING_AT_ITEMID], E_STREAMER_EXTRA_ID, object_data[9]))
            {
                DestroyDynamic3DTextLabel(Text3D:object_data[9]);
                Streamer_Update(playerid, STREAMER_TYPE_3D_TEXT_LABEL);

                object_data[9] = INVALID_3DTEXT_ID;
                Streamer_SetArrayData(STREAMER_TYPE_OBJECT, PlayerData[playerid][E_PLAYER_LOOKING_AT_ITEMID], E_STREAMER_EXTRA_ID, object_data, sizeof(object_data));
            }
            PlayerData[playerid][E_PLAYER_LOOKING_AT_ITEMID] = INVALID_OBJECT_ID;
        }
    }
__________________
Riddick94 is offline   Reply With Quote
Old 07/05/2017, 01:28 PM   #5620
rt-2
Huge Clucker
 
rt-2's Avatar
 
Join Date: Jun 2011
Location: Montréal, Québec, Canada
Posts: 283
Reputation: 24
Default Re: Streamer Plugin

Quote:
Originally Posted by Crayder View Post
It is in the wiki, the streamer wiki. It's on GitHub.
No it's not in the wiki (like I said), the function is in the native list, but no parameters description is given, but on this page it was given before. So the information was available but is not anymore.
__________________
rt-2
My hardcore first person 1994 simulation in development:
SA Advance Roleplay
rt-2 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Checkpoint / Area sub-streamer for incognito's streamer plugin Pottus Includes 11 21/03/2014 06:31 PM
Need 3dtextlabel Streamer And Gangzone Streamer !! Please Help . Not streamer plugin . jame42 Scripting Help 4 30/05/2012 07:33 AM
Streamer plugin 0.3d rt-2 Plugin Development 7 05/12/2011 06:17 PM
Streamer Plugin Help! ColdXX Everything and Nothing 2 21/08/2010 10:28 PM
Streamer Plugin! ColdXX Help Archive 10 18/07/2010 12:47 PM


All times are GMT. The time now is 11:35 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.