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

[HELP] Cant under stand


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 06-15-2018 , 05:32   [HELP] Cant under stand
Reply With Quote #1

i cant under stand this plugin
PHP Code:
#include <amxmodx>
#include <reapi>

#define PLUGIN     "resetscore(ReAPI)"
#define VERSION "1.0"
#define AUTHOR  "Phantom"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_clcmd("say /rs""resetscore"); register_clcmd("say_team /rs""resetscore");
}

public 
resetscore(id) {
    if(!
is_user_connected(id)) return;

    
set_entvar(idvar_frags0.0);
    
set_member(idm_iDeaths0);

    
message_begin(MSG_ONE_UNRELIABLE76, .player id);
    
write_byte(id);
    
write_string("^1Счет обнулен");
    
message_end();

    
message_begin(MSG_ALL85);
    
write_byte(id);
    
write_short(0); write_short(0); write_short(0); write_short(0);
    
message_end();

this part
PHP Code:
message_begin(MSG_ONE_UNRELIABLE76, .player id);
    
write_byte(id);
    
write_string("^1Счет обнулен");
    
message_end();

    
message_begin(MSG_ALL85);
    
write_byte(id);
    
write_short(0); write_short(0); write_short(0); write_short(0);
    
message_end(); 
what is the work of this ^
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 06-15-2018 , 06:41   Re: [HELP] Cant under stand
Reply With Quote #2

You can do this via client_print_color too
This part is just writing a string
instinctpt1 is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 06-15-2018 , 07:22   Re: [HELP] Cant under stand
Reply With Quote #3

tis parta
PHP Code:
message_begin(MSG_ALL85); 
    
write_byte(id); 
    
write_short(0); write_short(0); write_short(0); write_short(0); 
    
message_end(); 
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
E1_531G
Senior Member
Join Date: Dec 2017
Old 06-15-2018 , 07:41   Re: [HELP] Cant under stand
Reply With Quote #4

It seems to be the ScoreInfo message.
__________________
My English is A0
E1_531G is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-15-2018 , 08:34   Re: [HELP] Cant under stand
Reply With Quote #5

Poorly indented. You did something wrong, since the "85" doesn't exists in message_const.inc and in Half-Life 1 Game Events it means "ItemStatus" event.
https://wiki.alliedmods.net/Half-Lif...nts#ItemStatus

If you want to update the Scoreboard, better work with user message "ScoreInfo".
https://wiki.alliedmods.net/Half-Lif...ents#ScoreInfo
__________________









Last edited by CrazY.; 06-15-2018 at 08:37.
CrazY. 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 06:07.


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