[Include] Graphic Functions! v.0.1A
#1

graphfunc v.0.1A

__________________________________________________


Introduction:
Very simple include, where you can easily add some nice graphs (as textdraws) to your server.
While I'm going to write this topic, I'll also be using some parts of a graph example code.

Functions:
pawn Код:
-
    native Graph:GRAPHIC::Create(Float:x, Float:y, Float:x_min, Float:y_min, Float:x_max, Float:y_max);
    native GRAPHIC::XYAxisColor(Graph:_id, _x_color, _y_color);
    native GRAPHIC::UseBackground(Graph:_id, use);
    native GRAPHIC::BackgroundColor(Graph:_id, color);
    native GRAPHIC::GRAPHIC::AddPoint(Graph:_id, Float:x, Float:y, color);
    native GRAPHIC::ShowForPlayer(playerid, Graph:_id);
    native GRAPHIC::HideForPlayer(playerid, Graph:_id);
    native GRAPHIC::ShowForAll(Graph:_id);
    native GRAPHIC::HideForAll(Graph:_id);
    native GRAPHIC::Update(Graph:_id, playerid = INVALID_PLAYER_ID);
    native GRAPHIC::Destroy(Graph:_id);
    native GRAPHIC::OtherXYAxis(oper, playerid, Graph:_id, xAxis, yAxis);
Callbacks:
forward GRAPHIC::Init()

This callback should be use to create each graph, for example:
pawn Код:
new
        Graph:MY_GRAPH;

    public
        GRAPHIC::Init()
    {
        MY_GRAPH = GRAPHIC::Create(200.0, 250.0, -50, -50, 50, 50);
        GRAPHIC::XYAxisColor(MY_GRAPH, 0xFFFFFF55, 0xFFFFFF55);

        GRAPHIC::UseBackground(MY_GRAPH, 1);
        GRAPHIC::BackgroundColor(MY_GRAPH, 0x00000033);

        GRAPHIC::AddPoint(MY_GRAPH, 50,  50, 0x25478588);

        // other graphic creations..               

        return 1;
    }
Restrictions:
There are some sense restrictions when creating a graphic. (at least with this script)
You'll NOT be able to create graphs in this terms:
  • x-Min, y-Min, x-Max and y-Max all equal to 0
  • x-Min and x-Max both equal to 0
  • y-Min and y-Max both equal to 0
Example with screenshot:
Screenshot here!
Pastebin code here!

Download:
Want to download it? Click here! THANKS TO KAR!!

Request:
When replying in order to report a bug, please keep the following form structure: (including the bbcode: code)
Код:
» bug report:
  • Information here..
_script_version, 0x01A.

- © PLAYMAKER 2011
Reply


Messages In This Thread
Graphic Functions! v.0.1A - by pmkrz - 07.05.2011, 22:59
Re: Graphic Functions! v.0.1A - by black_dota - 07.05.2011, 23:04
Re: Graphic Functions! v.0.1A - by Skylar Paul - 07.05.2011, 23:04
Re: Graphic Functions! v.0.1A - by MrDeath537 - 07.05.2011, 23:09
Re: Graphic Functions! v.0.1A - by pmkrz - 07.05.2011, 23:11
Re: Graphic Functions! v.0.1A - by RyDeR` - 07.05.2011, 23:11
Re: Graphic Functions! v.0.1A - by Joe Staff - 07.05.2011, 23:33
Re: Graphic Functions! v.0.1A - by Lorenc_ - 08.05.2011, 00:16
Re: Graphic Functions! v.0.1A - by pmkrz - 08.05.2011, 11:09
Re: Graphic Functions! v.0.1A - by BASITJALIL - 08.05.2011, 12:49
Re: Graphic Functions! v.0.1A - by Swiftz - 08.05.2011, 13:23
Re: Graphic Functions! v.0.1A - by pmkrz - 08.05.2011, 16:50
Re: Graphic Functions! v.0.1A - by Trooper[Y] - 08.05.2011, 17:14
Re: Graphic Functions! v.0.1A - by Naruto_Emilio - 08.05.2011, 17:50
Re: Graphic Functions! v.0.1A - by pmkrz - 08.05.2011, 18:08
Re: Graphic Functions! v.0.1A - by Donya - 08.05.2011, 18:08
Re: Graphic Functions! v.0.1A - by pmkrz - 08.05.2011, 18:12
Re: Graphic Functions! v.0.1A - by Donya - 08.05.2011, 18:13
Re: Graphic Functions! v.0.1A - by pmkrz - 08.05.2011, 18:22
Re: Graphic Functions! v.0.1A - by Bumbis - 08.05.2011, 18:39
Re: Graphic Functions! v.0.1A - by Donya - 08.05.2011, 18:48
Respuesta: Graphic Functions! v.0.1A - by Code8976Man - 08.05.2011, 18:54
Re: Graphic Functions! v.0.1A - by pmkrz - 09.05.2011, 23:01
Re: Graphic Functions! v.0.1A - by Donya - 15.05.2011, 16:02
Re: Graphic Functions! v.0.1A - by pmkrz - 20.05.2011, 13:31
Re: Graphic Functions! v.0.1A - by Jay_ - 20.05.2011, 17:37
Re: Graphic Functions! v.0.1A - by pmkrz - 20.05.2011, 20:46
Re: Graphic Functions! v.0.1A - by BlackG - 20.05.2011, 21:06
Re: Graphic Functions! v.0.1A - by titanak - 21.05.2011, 06:31
Re: Graphic Functions! v.0.1A - by Ricop522 - 10.07.2011, 15:56
Re: Graphic Functions! v.0.1A - by Reynolds - 13.07.2014, 11:16
Re: Graphic Functions! v.0.1A - by Kar - 13.07.2014, 15:34
Re: Graphic Functions! v.0.1A - by ScripteRNaBEEL - 13.07.2014, 15:58
Re: Graphic Functions! v.0.1A - by Reynolds - 14.07.2014, 22:36
Re: Graphic Functions! v.0.1A - by GreenS - 06.09.2014, 08:32
Re: Graphic Functions! v.0.1A - by Fernado Samuel - 06.09.2014, 08:57
Re: Graphic Functions! v.0.1A - by Rudy_ - 02.10.2014, 08:34
Re: Graphic Functions! v.0.1A - by Kar - 13.04.2015, 11:11
Re: Graphic Functions! v.0.1A - by Kar - 12.12.2017, 06:19

Forum Jump:


Users browsing this thread: 2 Guest(s)