Raised This Month: $32 Target: $400
 8% 

write_short money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 10-27-2022 , 08:38   write_short money
Reply With Quote #1

I'm using this
PHP Code:
public UpdateFrags(id){
    if(!
is_user_connected(id)){
        return;
    }      
    
set_pev(idpev_fragsgKillerPointsid ]);
    
message_begin(MSG_BROADCASTget_user_msgid("ScoreInfo"));
    
write_byte(id);
    
write_short(gKillerPointsid ]);
    
write_short(cs_get_user_deaths(id));
    
write_short(0);
    
write_short(1);
    
message_end();
}

public 
Event_ScoreInfo(){
    
UpdateFrags(read_data(1));

to change the kills into points, what i want to do is edit this and change the "Money" into points (in scoreboard) i searched but didnt found, i'd like the frags to be back and move the points to "Money" (in scoreboard)!
anyone? thanks
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-27-2022 , 18:05   Re: write_short money
Reply With Quote #2

PHP Code:

public plugin_init()
{
    
register_message(get_user_msgid("Account"), "fw_message_account");
}

public 
fw_message_account(msgiddestid)
{
    const 
ARG_USER_ACCOUNT 1;
    const 
ARG_ACCOUNT_VALUE 2;
    const 
MSGID_ACCOUNT_MAX_ARGS 2;
    if(
get_msg_args() >= MSGID_ACCOUNT_MAX_ARGS)
    {
        if(
get_msg_argtype(ARG_ACCOUNT_VALUE) == ARG_LONG)
        {
            if(
get_msg_arg_int(ARG_ACCOUNT_VALUE) > -1set_msg_arg_int(ARG_ACCOUNT_VALUEARG_LONGgKillerPoints[clamp(get_msg_arg_int(ARG_USER_ACCOUNT), 1MAX_PLAYERS)]);
        }
    }

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 10-28-2022 , 10:03   Re: write_short money
Reply With Quote #3

thanks, it works!
__________________
a simple act of caring creates an endless ripple.
Nutu_ 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:56.


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