SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/05/2017, 06:30 PM   #5631
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,929
Reputation: 185
Default Re: Streamer Plugin

IsPlayerInDynamicArea - capable of recognizing only PLAYER. Is this possible to get it to work on NPCs too?

response:// @down,
You are probably mad. I'm not gonna use timer for that.
__________________
The Last of Us (SA-MP) is a conversion of ideas from The Last of Us PS3® to San Andreas - Multi Player. Click at the image above, for more information or just click HERE.

__________________________________
Feel free to join Discord channel for TLoU (SA-MP) project (click on the Discord image below)

Last edited by Riddick94; 12/05/2017 at 02:10 PM.
Riddick94 is offline   Reply With Quote
Old 10/05/2017, 07:43 PM   #5632
ForT
Gangsta
 
ForT's Avatar
 
Join Date: Sep 2012
Location: Brasil - Florianópolis
Posts: 616
Reputation: 220
Default Re: Streamer Plugin

Quote:
Originally Posted by Riddick94 View Post
IsPlayerInDynamicArea - capable of recognizing only PLAYER. Is this possible to get it to work on NPCs too?
Take the position of the NPC and use IsPointInDynamicArea
__________________
ForT is offline   Reply With Quote
Old 18/05/2017, 07:52 AM   #5633
iLearner
Banned
 
Join Date: Apr 2017
Posts: 450
Reputation: 89
Default Re: Streamer Plugin

Is there any function like CreateDynamicPlayer3DTextLabel ? (per player labels)
iLearner is offline   Reply With Quote
Old 18/05/2017, 07:55 AM   #5634
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,187
Reputation: 277
Default Re: Streamer Plugin

a_samp.inc
PHP Code:
CreatePlayer3DTextLabel(playeridtext[], colorFloat:XFloat:YFloat:ZFloat:DrawDistanceattachedplayer=INVALID_PLAYER_IDattachedvehicle=INVALID_VEHICLE_IDtestLOS=0); 
streamer.inc
Code:
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance,
attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0,
worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);
AbyssMorgan is offline   Reply With Quote
Old 28/05/2017, 09:37 AM   #5635
Logic_
High-roller
 
Logic_'s Avatar
 
Join Date: Jun 2015
Location: Hunter's Palace
Posts: 1,173
Reputation: 135
Default Re: Streamer Plugin

Quote:
Originally Posted by AbyssMorgan View Post
a_samp.inc
PHP Code:
CreatePlayer3DTextLabel(playeridtext[], colorFloat:XFloat:YFloat:ZFloat:DrawDistanceattachedplayer=INVALID_PLAYER_IDattachedvehicle=INVALID_VEHICLE_IDtestLOS=0); 
streamer.inc
Code:
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance,
attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0,
worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);
I've worked with dynamic labels per player but for some reason they get attached to wrong player when the player disconnects/ dies/ spectates, while I also destroy label on OnPlayerDeath, OPDisconnect and in such other places.
__________________
SA-MP, G-MOD and Web hosting @ https://www.prestigesteve.com.
Logic_ is offline   Reply With Quote
Old 09/06/2017, 02:34 PM   #5636
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,929
Reputation: 185
Default Re: Streamer Plugin

This is my function, when admin creates an item on the server:

Code:
PublicEx OnAdminCreateItem(playerid, objectid, itemid, modelid, quantity, Float:x, Float:y, Float:z)
{
Streamer_UpdateEx(playerid, x, y, z, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));

new object_data[10];
object_data[0] = itemid;
SerwerData[E_SERWER_LAST_ITEM_UID] = object_data[1] = cache_insert_id();
object_data[2] = modelid;
object_data[3] = _:x;
object_data[4] = _:y;
object_data[5] = _:z;
object_data[6] = GetPlayerVirtualWorld(playerid);
object_data[7] = GetPlayerInterior(playerid);
object_data[8] = quantity;
object_data[9] = INVALID_3DTEXT_ID;

Streamer_SetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, object_data, sizeof(object_data));

I want to add an extra array 'object_data[10]' but it has to be a string which can hold 64 characters.

Code:
strmid(object_data[10][......], "My text has 64 chars or whatever", 0, 64, 64);

object_data[10] and then it needs to know the amount of chars which is [64]... I can't figure it out and dunno how to do it.

Anyone?
__________________
The Last of Us (SA-MP) is a conversion of ideas from The Last of Us PS3® to San Andreas - Multi Player. Click at the image above, for more information or just click HERE.

__________________________________
Feel free to join Discord channel for TLoU (SA-MP) project (click on the Discord image below)
Riddick94 is offline   Reply With Quote
Old 09/06/2017, 07:05 PM   #5637
ball
Huge Clucker
 
ball's Avatar
 
Join Date: Jul 2012
Location: Poznan, Poland
Posts: 269
Reputation: 30
Default Re: Streamer Plugin

Create enum

Code:
enum myEnum
{
data_model,
...
data_string[64]
}

new object_data[myEnum];
strmid(object_data[data_string], ...);
ball is offline   Reply With Quote
Old 04/07/2017, 11:56 AM   #5638
WASD
Little Clucker
 
Join Date: Feb 2014
Posts: 17
Reputation: 1
Default Re: Streamer Plugin

delll.
WASD is offline   Reply With Quote
Old 14/07/2017, 10:40 PM   #5639
Paulice
Huge Clucker
 
Paulice's Avatar
 
Join Date: Jul 2017
Posts: 481
Reputation: 42
Default Re: Streamer Plugin

Will there ever be support for gang zones?
Paulice is offline   Reply With Quote
Old 05/08/2017, 06:17 PM   #5640
Salik
Big Clucker
 
Salik's Avatar
 
Join Date: Aug 2015
Location: Russia
Posts: 66
Reputation: 0
Default Re: Streamer Plugin

Dear Incognito, could you simplify the function 'Streamer_GetNearbyItems', I almost did not understand how it works, how to determine the number of Objects in a given position, could make it something to return a count of objects or to show an example.
Salik 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:50 PM.


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