Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 337

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 339

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 341

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 343
class icon help ?

Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Member
    Join Date
    Apr 2006
    Posts
    30

    class icon help ?

    Code:
    void drawRadarPoint(float* origin,int r,int g,int b)
    {
    	for(int i=0; i<MAX_CLIENTS; i++)
    	{
    centity_t *cent = &cg->predictedPlayerEntity;
    	int screenx,screeny;
    	if(!calcRadarPoint(origin,screenx,screeny)) return;
    	vec4_t color = {r, g, b, 1};
    	trap_R_SetColor( color );
    	if(cgs->clientinfo[i].team!=cgs->clientinfo[cg->clientNum].team)
      CG_DrawPic( screenx, screeny, 15, 15, cgs->media.limboClassButtons[cgs->clientinfo[ i ].cls]);
      else
      CG_DrawPic( screenx, screeny,15, 15, cgs->media.limboClassButtons[cgs->clientinfo[ i ].cls]);
    		}
    }

    tryin to draw the class of the person so i can draw it in the radar thats sorta working lol
    but shows wrong icon ?

    any help on this would be great ..

    thanks in advance

    http://vpchat.org/example.jpg < example image of the bot

    credits to null/neg for etn open source release .. this bot is based on that release !
    credits to the sdk and cheatersutopia !
    credits to etpub

    anyone i missed

  2. #2
    VIP buffalo's Avatar
    Join Date
    Apr 2006
    Posts
    677

    Re: class icon help ?

    The only thing I do different in drawing the icons is setting it first before the draw which shouldn&#39;t really matter...

    Code:
    qhandle_t classIcon = cgs->media.limboClassButtons[cgs->clientinfo[i].cls];
    then you should know how to draw it from there..

    gl


  3. #3
    Member
    Join Date
    Apr 2006
    Posts
    30

    Re: class icon help ?

    doing samething :


    i thank you tho for ya help buff !

    this is negs code for radar maybe its because im calling that function ina different place ?
    that ive changed !

    it looks like in radar its drawing alot of icons on top of one another lol for one person lol
    so im gonna guess for(int i=0; i<MAX_CLIENTS; i++) has somethin to do with that problem .. shrugs

    Code:
    void drawRadarPoint(float* origin,int r,int g,int b)
    {
    	for(int i=0; i<MAX_CLIENTS; i++)
    	{
    	int screenx,screeny;
    	if(!calcRadarPoint(origin,screenx,screeny)) return;
    	vec4_t color = {r, g, b, 1};
    	trap_R_SetColor( color );
    	qhandle_t classIcon = cgs->media.limboClassButtons[cgs->clientinfo[i].cls];
      CG_DrawPic( screenx, screeny, 15, 15, classIcon);
    		}
    }
    
    void drawRadarFrame()
    {
    	int centerx = 570;
    	int centery = 70;
    	int size  = 70;
    	vec4_t col = {1, 1, 1, .2};
    	CG_FillRec(centerx-size, centery-1, size*2, 1, colorBlack);
    	CG_FillRec(centerx-1, centery-size, 1, size*2, colorBlack);
    }
    
    void doRadar()
    {
    	if(radarCvar.value==0) return;
    
    	drawRadarFrame(); //fixme? it sucks.
    	for(int i=0; i<MAX_CLIENTS; i++)
    	{
    		if(cg_entities[i].currentValid && !(cg_entities[i].currentState.eFlags & EF_DEAD))
    		{
    			if(cgs->clientinfo[i].team!=cgs->clientinfo[cg->clientNum].team)
    				drawRadarPoint(cg_entities[i].lerpOrigin, 1, 0, 0);
    			else
    				drawRadarPoint(cg_entities[i].lerpOrigin, 0, 0, 1);
    		}
    	}
    }

    http://vpchat.org/example.jpg < example image of the bot

    credits to null/neg for etn open source release .. this bot is based on that release !
    credits to the sdk and cheatersutopia !
    credits to etpub
    credits buffalo

    anyone i missed

  4. #4
    VIP buffalo's Avatar
    Join Date
    Apr 2006
    Posts
    677

    Re: class icon help ?

    weird it should draw it fine.. which compiler you using?

  5. #5
    Member
    Join Date
    Apr 2006
    Posts
    30

    Re: class icon help ?

    visual studio 6 c++

  6. #6
    Site Admin xHalt's Avatar
    Join Date
    May 2006
    Location
    Belgium
    Posts
    8,202

    Re: class icon help ?

    Nice going there defrag...
    Another talented coder in the making... 8)
    GL !

  7. #7
    VIP Terror's Avatar
    Join Date
    Sep 2006
    Posts
    1,262

    Re: class icon help ?

    Quote Originally Posted by Firecracker
    Nice going there defrag...
    Another talented coder in the making... 8)
    GL !
    definately looking good

  8. #8
    Coders chaplex's Avatar
    Join Date
    Apr 2006
    Location
    Croatia / Hrvatska
    Posts
    762

    Re: class icon help ?

    was that screenshot taken on 2.55 or 2.60
    The DJs took pills to stay awake and play for seven days
    www.chaplja.info | chaplja@gmail.com

  9. #9
    Member
    Join Date
    Apr 2006
    Posts
    30

    Re: class icon help ?

    Quote Originally Posted by chaplex
    was that screenshot taken on 2.55 or 2.60

    2.60 chap[br]: January 07, 2007, 05:52:23 AM_________________________________________________a nyone have an idea on this ? far as i can tell i need my own media&#39;s done like in nexus ?

    that would help most likely if im thinkin correctly lol :-\

  10. #10
    VIP
    Join Date
    Apr 2006
    Location
    AL, USA
    Posts
    185

    Re: class icon help ?

    Why are you looping through twice? That is the problem....
    Try this and see how it works for you:
    Code:
    void drawRadarPoint(float* origin,int r,int g,int b)
    {
    	int screenx,screeny;
    	if(!calcRadarPoint(origin,screenx,screeny)) return;
    	vec4_t color = {r, g, b, 1};
    	trap_R_SetColor( color );
    	qhandle_t classIcon = cgs->media.limboClassButtons[cgs->clientinfo[i].cls];
      CG_DrawPic( screenx, screeny, 15, 15, classIcon);
    }
    
    void drawRadarFrame()
    {
    	int centerx = 570;
    	int centery = 70;
    	int size  = 70;
    	vec4_t col = {1, 1, 1, .2};
    	CG_FillRec(centerx-size, centery-1, size*2, 1, colorBlack);
    	CG_FillRec(centerx-1, centery-size, 1, size*2, colorBlack);
    }
    
    void doRadar()
    {
    	if(radarCvar.value==0) return;
    
    	drawRadarFrame(); //fixme? it sucks.
    	for(int i=0; i<MAX_CLIENTS; i++)
    	{
    		if(cg_entities[i].currentValid && !(cg_entities[i].currentState.eFlags & EF_DEAD))
    		{
    			if(cgs->clientinfo[i].team!=cgs->clientinfo[cg->clientNum].team)
    				drawRadarPoint(cg_entities[i].lerpOrigin, 1, 0, 0);
    			else
    				drawRadarPoint(cg_entities[i].lerpOrigin, 0, 0, 1);
    		}
    	}
    }


    Also note that when the icons are drawn, they will be offcenter, as the drawpic does not work on radius when determining width, but instead works on diameter.

    From my old hack:
    Code:
     main.vis.CG_DrawPic(x-9, y-9, 14, 14, classIcon);

Page 1 of 3 123 LastLast

Similar Threads

  1. SOF2 1.03 Icon Esp
    By King-OrgY in forum Client Hooks
    Replies: 5
    Last Post: October 6th, 2008, 02:13
  2. Icon tut
    By rttnPIG in forum Creative Corner
    Replies: 2
    Last Post: January 10th, 2008, 20:39
  3. desktop icon(s)
    By Lone Wolf in forum Software
    Replies: 17
    Last Post: December 22nd, 2007, 04:01
  4. [cU's new look] cU Icon Contest
    By xHalt in forum Creative Corner
    Replies: 0
    Last Post: February 26th, 2007, 05:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •