SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 01/05/2017, 08: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, 08:53 AM   #5612
TommyB
Beta Tester
 
TommyB's Avatar
 
Join Date: Sep 2010
Location: Texas, USA.
Posts: 121
Reputation: 108
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 03:32 PM.
TommyB is online now   Reply With Quote
Old 05/05/2017, 11:34 PM   #5613
rt-2
Huge Clucker
 
rt-2's Avatar
 
Join Date: Jun 2011
Location: Montréal, Québec, Canada
Posts: 275
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, 05:06 AM   #5614
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,867
Reputation: 570
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, 12:47 PM   #5615
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,947
Reputation: 185
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).
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 06/05/2017, 01:21 PM   #5616
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,264
Reputation: 323
Default Re: Streamer Plugin

E_STREAMER_EXTRA_ID is integer not array
AbyssMorgan is offline   Reply With Quote
Old 06/05/2017, 01:31 PM   #5617
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,947
Reputation: 185
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?
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 06/05/2017, 02:10 PM   #5618
ball
Huge Clucker
 
ball's Avatar
 
Join Date: Jul 2012
Location: Poznan, Poland
Posts: 266
Reputation: 30
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, 02:25 PM   #5619
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,947
Reputation: 185
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
Code:
stock GetPlayerCameraDynamicObject(playerid)return Streamer_GetItemStreamerID(playerid, STREAMER_TYPE_OBJECT, GetPlayerCameraTargetObject(playerid));

OnPlayerLookAt
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;
		}
	}
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 07/05/2017, 02:28 PM   #5620
rt-2
Huge Clucker
 
rt-2's Avatar
 
Join Date: Jun 2011
Location: Montréal, Québec, Canada
Posts: 275
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 07:31 PM
Need 3dtextlabel Streamer And Gangzone Streamer !! Please Help . Not streamer plugin . jame42 Scripting Help 4 30/05/2012 08:33 AM
Streamer plugin 0.3d rt-2 Plugin Development 7 05/12/2011 07:17 PM
Streamer Plugin Help! ColdXX Everything and Nothing 2 21/08/2010 11:28 PM
Streamer Plugin! ColdXX Help Archive 10 18/07/2010 01:47 PM


All times are GMT. The time now is 06:32 AM.


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