Raised This Month: $ Target: $400
 0% 

[SOLVED] scoreboard


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 08-11-2009 , 08:29   [SOLVED] scoreboard
Reply With Quote #1

hey,

i searched & searched for a tut how to edit the scoreboard.

i need for first to block death points. ( if player is dead , he become nothing.)
after this i want to add xx points to a player.after the player become xx points, i want to give other players -points. need just a mini part to give the points & blocks. i think i can do other things alone.

ty in adv.
__________________

Last edited by One; 08-11-2009 at 11:03.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-11-2009 , 09:57   Re: scoreboard
Reply With Quote #2

This should be enough to get you started:
PHP Code:
register_event"ScoreInfo" "fw_EvScoreInfo" "a" );
register_event"DeathMsg" "fw_EvDeathMsg" "a" );

//ScoreInfo: Updates the scoreboard with the given player's Frags and Deaths.
public fw_EvScoreInfo()
{
    static 
idid read_data);
    static 
iFragsiFrags read_data);
    static 
iDeathsiDeaths read_data);
    
    
//if ( iFrags == 10 )
    //    set_user_frags( id , 30 );
}

//DeathMsg: Called when a player dies
public fw_EvDeathMsg()
{
    static 
iKilleriKiller read_data);
    static 
iVictimiVictim read_data);
    
    
//set_user_frags( iVictim , 0 );
    //set_user_deaths( iVictim , 0 );

__________________

Last edited by Bugsy; 08-11-2009 at 10:31.
Bugsy is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 08-11-2009 , 10:49   Re: scoreboard
Reply With Quote #3

WTF ???

set_user_deaths needs amxmodx right?

my includes :

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <fakemeta>
#include <cstrike>
#include <chr_engine>
#include <hamsandwich>
#include <screenfade_util>

error :

Error: Undefined symbol "set_user_deaths" on line 1478

ty ill try for test cs_set_user_deaths.


__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-11-2009 , 10:49   Re: scoreboard
Reply With Quote #4

Sorry, use cs_set_user_deaths..

all you need for above is amxmodx, fun, cstrike
__________________
Bugsy is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 08-11-2009 , 10:55   Re: scoreboard
Reply With Quote #5

yup but why this not works ?

http://amxmodx.org/funcwiki.php?go=func&id=151

i mean this should be defined by amxmodx or not?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-11-2009 , 10:58   Re: scoreboard
Reply With Quote #6

"This native is DEPRECATED and no longer available for use. "

There are fakemeta equivalents for both frags\deaths. fm_set_user_frags is already defined in fakemeta_util IIRC
__________________
Bugsy is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 08-11-2009 , 11:03   Re: scoreboard
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
"This native is DEPRECATED and no longer available for use. "

There are fakemeta equivalents for both frags\deaths. fm_set_user_frags is already defined in fakemeta_util IIRC
yay. ty.

this is perfect now. i wanted to :


Code:
    message_begin(MSG_ALL,get_user_msgid("ScoreInfo"))
    write_byte(id)
    write_short(score[id][0]+(score[id-1][3]+3))
    write_short(score[id][2])
    write_short(0)
    write_short(get_user_team(id))
    message_end()
or somthing like this SOLVED.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-11-2009 , 11:20   Re: [SOLVED] scoreboard
Reply With Quote #8

Easier to just set users frags\deaths IMO.

This can be a problem if id = 1. 0 is an invalid player id.
PHP Code:
write_short(score[id][0]+(score[id-1][3]+3)) 
__________________
Bugsy is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 08-11-2009 , 11:48   Re: [SOLVED] scoreboard
Reply With Quote #9

haha i think thats why my code not worked ) ty again
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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:18.


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