SA-MP Forums Archive
[Plugin] GVar Plugin - 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: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] GVar Plugin (/showthread.php?tid=151076)

Pages: 1 2 3 4 5 6


Re: [REL] GVar Plugin v1.0 - henry jiggy - 25.09.2011

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Hmm, haven't even thought that way, but it seems like a good solution.

----------------------------------------------------------------------
I made some tests now.

pawn Код:
COMMAND:test(playerid,params[])
{
    new tick = GetTickCount();
    for(new i=0; i<100000; i++)
    {
      SetPVarInt(playerid,"RandomID",i);
    }
    printf("tick #1: %d",GetTickCount() - tick);
   
    tick = GetTickCount();
    for(new i=0; i<100000; i++)
    {
      GetPVarInt(playerid,"RandomID");
    }
    printf("tick #2: %d",GetTickCount() - tick);
   
    tick = GetTickCount();
    for(new i=0; i<100000; i++)
    {
      SetGVarInt("RandomID",i);
    }
    printf("tick #3: %d",GetTickCount() - tick);
   
    tick = GetTickCount();
    for(new i=0; i<100000; i++)
    {
      GetGVarInt("RandomID");
    }
    printf("tick #4: %d",GetTickCount() - tick);
   
    tick = GetTickCount();
    for(new i=0; i<100000; i++)
    {
      SOMETHING[randomshit] = i;
    }
    printf("tick #5: %d",GetTickCount() - tick);
   
    tick = GetTickCount();
    for(new i=0; i<100000; i++)
    {
      i = SOMETHING[randomshit];
    }
    printf("tick #6: %d",GetTickCount() - tick);
    return 1;
}
Results:
[20:45:01] tick #1: 38
[20:45:01] tick #2: 33
[20:45:01] tick #3: 102
[20:45:01] tick #4: 100
[20:45:01] tick #5: 12
[20:45:01] tick #6: 2

I don't know anything about plugin programming, but could this be somehow speeded up a bit? GVars seem to be around three times slower than PVars.
Whoa so

i = SOMETHING[randomshit];

is like 5 times faster than

SOMETHING[randomshit] = i;


Whoa. i gotta go inverse my scripts now

EDIT: i ran a test to comfirm this and server made cp usage reach 100% with no result(epic crash) and then running further tests i discovered it doesnt work if its like
Код:
i = SOMETHING[5];
(i used an array of 50 size)

and if i put a number there instead pawno compiler gives an error, but like this: SOMETHING[5] = z; it works even if i put a number on it. I guess something went wrong >.>

EDIT2: i figured it lol im an ass --ґ first one tried to se i to the value of SOMETING[5] and second sets SOMETHING[5] to the value of z(i just replaced i by z).


Re: [REL] GVar Plugin v1.3 - NeyMar96 - 25.12.2011

Please update for 0.3d scripting!


Re: [REL] GVar Plugin v1.3 - kurta999 - 25.12.2011

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Why ?

It works without any problem with 0.3d!
4char


Re: [REL] GVar Plugin v1.3 - NeyMar96 - 26.12.2011

Quote:
Originally Posted by kurta999
Посмотреть сообщение
4char
It not work with Linux server


Re: [REL] GVar Plugin v1.3 - kurta999 - 26.12.2011

Quote:
Originally Posted by NeyMar96
Посмотреть сообщение
It not work with Linux server
For me works without any problem.
Try this.


Re: [REL] GVar Plugin v1.3 - RAEN - 18.02.2012

reapload please


Re: [REL] GVar Plugin v1.3 - [Diablo] - 18.02.2012

the "mirror" link works -> http://www.mediafire.com/?btghxl6jgbr4431


Re: [REL] GVar Plugin v1.3 - Ewwe - 24.05.2012

Please update for 0.3e. Plugin does not work on 0.3e...


Re: [REL] GVar Plugin v1.3 - kurta999 - 24.05.2012

Work without any problem with "all SA-MP versions".
I use this with 0.3e and no problems..


Re: [REL] GVar Plugin v1.3 - AndreT - 15.02.2013

Can't you take advantage of the ID parameter in the functions to simplify your code even more?


Re: [REL] GVar Plugin v1.3 - SDraw - 15.02.2013

Quote:
Originally Posted by AndreT
Посмотреть сообщение
Can't you take advantage of the ID parameter in the functions to simplify your code even more?
If that question was for me, I have already used index parameter (50 first things with 100 things included in every first thing :P)
PHP код:
format(str,64,"EventInfo[%d][PIDPlace][%d]",RaceStartZone[playerid],i);
apid GetGVarInt(str,JoinedJNum[playerid]); 



Re: GVar Plugin - SlonCHL - 24.11.2013

Why do we need a name if there's already an ID? It only makes me write more

Edit: Wait, is it optional?


Re: GVar Plugin - Quis - 15.01.2014

Link is dead, page can't be found after "Download"
Can somebody reupload this somewhere?

@EDIT
I found it, new link: https://www.dropbox.com/s/tjmtbwqjg2...lugin_v1_3.zip

@DOWN
For me solidfiles is still dead, mediafire now works.


Re: GVar Plugin - iZN - 15.01.2014

Quote:
Originally Posted by Quis
Посмотреть сообщение
Link is dead, page can't be found after "Download"
Can somebody reupload this somewhere?

@EDIT
I found it, new link: https://www.dropbox.com/s/tjmtbwqjg2...lugin_v1_3.zip
Both SolidFiles and Mediafire link works for me.


Re: GVar Plugin - SlonCHL - 02.06.2014

This plugin isn't working for me in 0.3z R2-2


Re: GVar Plugin - iZN - 02.06.2014

Quote:
Originally Posted by SlonCHL
Посмотреть сообщение
This plugin isn't working for me in 0.3z R2-2
How is it not working? It will work perfectly with any previous or future SA-MP releases.


Re: GVar Plugin - iFarbod - 02.06.2014

This plugin is awesome!


Re: GVar Plugin - SlonCHL - 02.06.2014

http://forum.sa-mp.com/showthread.ph...91#post3060991

Not sure why is it happening, can anyone help?


Re: GVar Plugin - kurta999 - 22.07.2014

Please add GetGVarIndexAtName.

Example: If I have gvar with MapName, i already added 500 elements into it, then I can't delete it with every elements. Because I can't get upper id from name.


Re: GVar Plugin - driftpower - 22.07.2014

Quote:
Originally Posted by SlonCHL
Посмотреть сообщение
http://forum.sa-mp.com/showthread.ph...91#post3060991

Not sure why is it happening, can anyone help?
it's the include dude.