Raised This Month: $51 Target: $400
 12% 

Score


Post New Thread Reply   
 
Thread Tools Display Modes
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-28-2013 , 10:29   Re: Score
Reply With Quote #11

Sorry about that, I fixed the code.
I forgot to edit "testfunc" to "score" so the function was never called.
I also got the for-loop wrong. Instead of "i < iPlayersnum" I wrote "iPlayersnum", which made the loop infinite until it threw an error.
It worked fine for me with the new code. Allthough I'm only 1 player.
__________________

Last edited by Black Rose; 07-28-2013 at 10:30.
Black Rose is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 07-28-2013 , 10:35   Re: Score
Reply With Quote #12

The text only shows 1.
Did I need to write it like this?
PHP Code:
    acg_drawtext(id0.250.3text[0], 2552552552550.00.00.01TS_NONE001)
    
acg_drawtext(id0.250.3325text[1], 2552552552550.00.00.01TS_NONE002)
    
acg_drawtext(id0.250.365text[2], 2552552552550.00.00.01TS_NONE003)
    
acg_drawtext(id0.250.3975text[3], 2552552552550.00.00.01TS_NONE004)
    
acg_drawtext(id0.250.43text[4], 2552552552550.00.00.01TS_NONE005)
    
acg_drawtext(id0.250.4625text[5], 2552552552550.00.00.01TS_NONE006)
    
acg_drawtext(id0.250.495text[6], 2552552552550.00.00.01TS_NONE007)
    
acg_drawtext(id0.250.5275text[7], 2552552552550.00.00.01TS_NONE008
Randomize is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-28-2013 , 10:48   Re: Score
Reply With Quote #13

Quote:
Originally Posted by Randomize View Post
The text only shows 1.
Did I need to write it like this?
PHP Code:
    acg_drawtext(id0.250.3text[0], 2552552552550.00.00.01TS_NONE001)
    
acg_drawtext(id0.250.3325text[1], 2552552552550.00.00.01TS_NONE002)
    
acg_drawtext(id0.250.365text[2], 2552552552550.00.00.01TS_NONE003)
    
acg_drawtext(id0.250.3975text[3], 2552552552550.00.00.01TS_NONE004)
    
acg_drawtext(id0.250.43text[4], 2552552552550.00.00.01TS_NONE005)
    
acg_drawtext(id0.250.4625text[5], 2552552552550.00.00.01TS_NONE006)
    
acg_drawtext(id0.250.495text[6], 2552552552550.00.00.01TS_NONE007)
    
acg_drawtext(id0.250.5275text[7], 2552552552550.00.00.01TS_NONE008
No.
I tried with
client_print(id, print_chat, "%s", text);
instead of the acg way because I don't have that. That worked fine. Are you using acg for a reason?

My result:
__________________

Last edited by Black Rose; 07-28-2013 at 10:52.
Black Rose is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 07-29-2013 , 04:36   Re: Score
Reply With Quote #14

Yes, I'm using ACG because the font can be edited as I want.
Randomize is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 07-29-2013 , 06:41   Re: Score
Reply With Quote #15

I change the code to be like this:

Your code:
PHP Code:
    for ( new iPlayersnum i++ )
    {
        
get_user_name(iPlayers[i], name31)
        
        if (
get_user_team(iPlayers[i]) == 1//set the score for T at the left
        
{
            
formatex(line31"%s %i %i"nameget_user_frags(iPlayers[i]), get_user_deaths(iPlayers[i]))
            
acg_drawtext(id0.250.3line2552552552550.00.00.01TS_NONE001)
        }
        else if (
get_user_team(iPlayers[i]) == 2//set the score fore CT at the right
        
{
            
formatex(line31"%s %i %i"nameget_user_frags(iPlayers[i]), get_user_deaths(iPlayers[i]))
            
acg_drawtext(id0.650.3line2552552552550.00.00.01TS_NONE001)
        }
    } 
But what I want is like this
PHP Code:
if (get_user_team(iPlayers[i]) == 1//set the score for T at the left
{
    
acg_drawtga(id"gfx/hud/tabscore.tga"2552552552550.50.51FX_NONE0.00.00.00.0001)
    
acg_drawtext(id0.250.3line[0], 2552552552550.00.00.01TS_NONE001)
    
acg_drawtext(id0.250.3325line[1], 2552552552550.00.00.01TS_NONE002)
    
acg_drawtext(id0.250.365line[2], 2552552552550.00.00.01TS_NONE003)
    
acg_drawtext(id0.250.3975line[3], 2552552552550.00.00.01TS_NONE004)
    
acg_drawtext(id0.250.43line[4], 2552552552550.00.00.01TS_NONE005)
    
acg_drawtext(id0.250.4625line[5], 2552552552550.00.00.01TS_NONE006)
    
acg_drawtext(id0.250.495line[6], 2552552552550.00.00.01TS_NONE007)
    
acg_drawtext(id0.250.5275line[7], 2552552552550.00.00.01TS_NONE008)
else if (
get_user_team(iPlayers[i]) == 2//set the score fore CT at the right
{    
    
acg_drawtext(id0.650.3line[0], 2552552552550.00.00.01TS_NONE009)
    
acg_drawtext(id0.650.3325line[1], 2552552552550.00.00.01TS_NONE0010)
    
acg_drawtext(id0.650.365line[2], 2552552552550.00.00.01TS_NONE0011)
    
acg_drawtext(id0.650.3975line[3], 2552552552550.00.00.01TS_NONE0012)
    
acg_drawtext(id0.650.43line[4], 2552552552550.00.00.01TS_NONE0013)
    
acg_drawtext(id0.650.4625line[5], 2552552552550.00.00.01TS_NONE0014)
    
acg_drawtext(id0.650.495line[6], 2552552552550.00.00.01TS_NONE0015)
    
acg_drawtext(id0.650.5275line[7], 2552552552550.00.00.01TS_NONE0016)

EDIT: Here is the screenshoot
Your code:
[IMG]http://**************/photo/my-images/821/cdke.jpg/[/IMG]http://**************/photo/my-images/821/cdke.jpg/
Mine and what I want:
http://**************/photo/my-images/809/z6z2.jpg/
[IMG]http://**************/photo/my-images/809/z6z2.jpg/[/IMG]

Last edited by Randomize; 07-29-2013 at 06:46.
Randomize is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode