Streamer_IntSetData Question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Streamer_IntSetData Question (
/showthread.php?tid=600248)
Streamer_IntSetData Question -
FarTooBaked - 05.02.2016
pawn Код:
//THE AREA
BusinessInfo[b][bLandlineArea] = CreateDynamicArea(); <---- //EXAMPLE I KNOW IT'S MISSING INFORMATION
Streamer_SetIntData(STREAMER_TYPE_AREA, BusinessInfo[b][bLandlineArea], E_STREAMER_TYPE, BUSINESS_LANDLINE_AREA);//STORE AREA TYPE
Streamer_SetIntData(STREAMER_TYPE_AREA, BusinessInfo[b][bLandlineArea], E_STREAMER_EXTRA_ID, b);//STORE BUSINESS ID
public OnPlayerEnterDynamicArea(playerid, areaid);
{
if(Streamer_GetIntData(STREAMER_TYPE_AREA, areaid, E_STREAMER_TYPE) == BUSINESS_LANDLINE_AREA)//BUSINESS LANDLINE AREA
{
new businessid = Streamer_GetIntData(STREAMER_TYPE_AREA, areaid, E_STREAMER_EXTRA_ID);//GET THE BUSINESS ID STORED FOR THE AREA
LandlineInteraction[playerid] = 1;
LandlineNo[playerid] = BusinessInfo[businessid][bLandlineNo];//GET THE INFORMATION WE NEED TO INTERACT WITH THE LANDLINE
LandlineCode[playerid] = BusinessInfo[businessid][bLandlineCode];
}
}
I'd like to know if in this example E_STREAMER_EXTRA_ID and E_STREAMER_TYPE are unique to this areaid for example AreaInfo[areaid][E_STREAMER_EXTRA_ID] - OR - is it not unique and by that I mean am I simply setting E_STREAMER_EXTRA_ID to the business id and every areaid will be effected by this?
I hope I explained that right it's really important I understand this.
Re: Streamer_IntSetData Question -
Vince - 05.02.2016
You cannot make stuff up. Overwriting the TYPE is completely invalid as that stores the type of thing that is being created (checkpoint, pickup, area, etc). You can only use the EXTRA_ID. This value is unique to that specific element.
Re: Streamer_IntSetData Question -
FarTooBaked - 05.02.2016
Quote:
Originally Posted by Vince
You cannot make stuff up. Overwriting the TYPE is completely invalid as that stores the type of thing that is being created (checkpoint, pickup, area, etc). You can only use the EXTRA_ID. This value is unique to that specific element.
|
Thank you very much for clearing that up Vince!
EDIT: Is it possible to store more than 1 peace of information per area?