SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Plugin Development (https://forum.sa-mp.com/forumdisplay.php?f=18)
-   -   [Plugin] Streamer Plugin (https://forum.sa-mp.com/showthread.php?t=102865)

Sergei 11/06/2010 02:53 PM

Re: [REL] Streamer Plugin v2.3.8
 
Quote:

Originally Posted by Luka�
Quote:

Originally Posted by $�#1071;Ģ
Code:

new myIcon[99];
So 98 + 1 = 99, you can't have 100 icon IDs stored in that array.

Wut?
You have 100 cells there.. 0, 1, 2, 3 -> 99 = 100 cells

You joking? I hope you do.

[03]Garsino 11/06/2010 02:55 PM

Re: [REL] Streamer Plugin v2.3.8
 
pawn Code:
new myicon[100]; // Create the variable wich consists of 100 cells.
pawn Code:
// When you're using myicon after creating it, only the cells 0 -> 99 can be used, 100 can NOT be used.
// 0..99 = 100

dcmd_crash 11/06/2010 02:58 PM

Re: [REL] Streamer Plugin v2.3.8
 
Quote:

Originally Posted by Luka™
pawn Code:
DestroyAllDynamicMapIcons();

Tut, ok ... say I have 50 and want to delete 49 of them -.-

Luka P. 11/06/2010 03:05 PM

Re: [REL] Streamer Plugin v2.3.8
 
Quote:

Originally Posted by [03
Garsino ]
pawn Code:
new myicon[100]; // Create the variable wich consists of 100 cells.
pawn Code:
// When you're using myicon after creating it, only the cells 0 -> 99 can be used, 100 can NOT be used.
// 0..99 = 100

Of course it can't be used, it goes out of array bounds -.-
But lets take some lower number like 10, you do

pawn Code:
new myIcon[9]; // 10 cells!

Now you are able to create 10 icons

pawn Code:
myIcon[0], myIcon[1], myIcon[2], myIcon[3], myIcon[4], myIcon[5], myIcon[6], myIcon[7], myIcon[8], myIcon[9]

Whats the problem?

Luka P. 11/06/2010 03:08 PM

Re: [REL] Streamer Plugin v2.3.8
 
Quote:

Originally Posted by _❼_
Quote:

Originally Posted by Luka™
pawn Code:
DestroyAllDynamicMapIcons();

Tut, ok ... say I have 50 and want to delete 49 of them -.-

I made this (not sure if it is going to work)

pawn Code:
stock DestroyDynamicMapIconRange(start, end);
{
    for(new i=start; i < end; i++)
    {
        DestoryDynamicObject(myIcons[i]);
    }
}

EDIT : Sorry for DP

Hiddos 11/06/2010 03:08 PM

Re: [REL] Streamer Plugin v2.3.8
 
Quote:

Originally Posted by _❼_
Quote:

Originally Posted by Luka™
pawn Code:
DestroyAllDynamicMapIcons();

Tut, ok ... say I have 50 and want to delete 49 of them -.-

Loop through all of them and make an exception for that last remaining one?

Downloading now, plugins are fer kewl peoplez. Which makes me wonder why I didn't download this before.

dcmd_crash 11/06/2010 03:10 PM

Re: [REL] Streamer Plugin v2.3.8
 
Quote:

Originally Posted by Luka™
Quote:

Originally Posted by _❼_
Quote:

Originally Posted by Luka™
pawn Code:
DestroyAllDynamicMapIcons();

Tut, ok ... say I have 50 and want to delete 49 of them -.-

I made this (not sure if it is going to work)

pawn Code:
stock DestroyDynamicMapIconRange(start, end);
{
    for(new i=start; i < end; i++)
    {
        DestoryDynamicObject(myIcons[i]);
    }
}

EDIT : Sorry for DP

Hmm, I never think of the things so simple lol. Thanks dude :)


dmstealth 11/06/2010 05:02 PM

Re: [REL] Streamer Plugin v2.3.8
 
Thanks! It's really nice!

TheInnocentOne 11/06/2010 11:55 PM

Re: [REL] Streamer Plugin v2.3.8
 
Great Release Incognito :)

Using it in my script now

DarkPower 12/06/2010 01:10 PM

Re: [REL] Streamer Plugin v2.3.8
 
How much objects can hold this streamer ?


All times are GMT. The time now is 04:16 AM.

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