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

[HELP] Problem ResetScore


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-03-2015 , 06:22   [HELP] Problem ResetScore
Reply With Quote #1

Hello,
I'm new to Coding and I started building a plugin for mY Cs 1.6 server...
I'm building a ResetScore plugin, Here's the Code...

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ResetScore"
#define VERSION "1.0"
#define AUTHOR "Striker"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd("say /rs", "reset_score");
    register_clcmd("say rs", "reset_score");
    register_clcmd("say /resetscore" "reset_score");
}

public reset_score (id) {
    cs_set_user_death(id, 0)
    set_user_frag(id, 0)
    cs_set_user_death(id, 0)
    set_user_frag(id, 0)
    
    if(get_pcvar_num(pcvar_Display) == 1) {
        color_saytext(id, "You Have Just Reset Your Score and Deaths")
    }
}
I can't compile this file. I don't know what the problem is..
If anybody knows something about this, please help me..

Thank You.
VarmaRitik is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 02-03-2015 , 06:45   Re: [HELP] Problem ResetScore
Reply With Quote #2

Quote:
Originally Posted by VarmaRitik View Post
Hello,
I'm new to Coding and I started building a plugin for mY Cs 1.6 server...
I'm building a ResetScore plugin, Here's the Code...

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ResetScore"
#define VERSION "1.0"
#define AUTHOR "Striker"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd("say /rs", "reset_score");
    register_clcmd("say rs", "reset_score");
    register_clcmd("say /resetscore" "reset_score");
}

public reset_score (id) {
    cs_set_user_death(id, 0)
    set_user_frag(id, 0)
    cs_set_user_death(id, 0)
    set_user_frag(id, 0)
    
    if(get_pcvar_num(pcvar_Display) == 1) {
        color_saytext(id, "You Have Just Reset Your Score and Deaths")
    }
}
I can't compile this file. I don't know what the problem is..
If anybody knows something about this, please help me..

Thank You.
add this
PHP Code:
#include <cstrike>
#include <fun> 
PHP Code:
cs_set_user_death(id0)
set_user_frag(id0)
cs_set_user_death(id0)
set_user_frag(id0
to

PHP Code:
cs_set_user_deaths(id0)
set_user_frags(id0)
cs_set_user_deaths(id0)
set_user_frags(id0
remove this
PHP Code:
 if(get_pcvar_num(pcvar_Display) == 1
PHP Code:
 color_saytext(id"You Have Just Reset Your Score and Deaths"
to

PHP Code:
 client_print(id,print_chat,"You Have Just Reset Your Score and Deaths"
__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 02-03-2015 at 06:47.
indraraj striker is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-03-2015 , 08:51   Re: [HELP] Problem ResetScore
Reply With Quote #3

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "ResetScore"
#define VERSION "1.0"
#define AUTHOR "Striker"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd("say /rs", "reset_score");
    register_clcmd("say /resetscore", "reset_score");
    register_clcmd("say rs", "reset_score");
    register_clcmd("say .rs", "reset_score");
    register_clcmd("say resetscore", "reset_score");
}

public reset_score (id) {
    cs_set_user_death(id, 0)
    set_user_frags(id, 0)
    cs_set_user_death(id, 0)
    set_user_frags(id, 0)
    
    client_print(id,print_chat,"You Have Just Reset Your Score and Deaths")
}
Still can't Compile...
Tried Compiling from amxmodx's site but it's saying "You must upload a valid file"..
What should I do..?

Thank You.
VarmaRitik is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-03-2015 , 08:55   Re: [HELP] Problem ResetScore
Reply With Quote #4

I have changed the code from

Code:
    cs_set_user_death(id, 0)
    set_user_frags(id, 0)
    cs_set_user_death(id, 0)
    set_user_frags(id, 0)
to

Code:
    set_user_frags(id, 0)
    set_user_frags(id, 0)
After changing, I can compile it..What should I do..? please help me to solve this problem.

Thank You.
VarmaRitik is offline
Old 02-03-2015, 08:55
indraraj striker
This message has been deleted by indraraj striker. Reason: ^^
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 02-03-2015 , 08:58   Re: [HELP] Problem ResetScore
Reply With Quote #5

Quote:
Originally Posted by VarmaRitik View Post
I have changed the code from

Code:
    cs_set_user_death(id, 0)
    set_user_frags(id, 0)
    cs_set_user_death(id, 0)
    set_user_frags(id, 0)
to

Code:
    set_user_frags(id, 0)
    set_user_frags(id, 0)
After changing, I can compile it..What should I do..? please help me to solve this problem.

Thank You.
PHP Code:
cs_set_user_death(id0
set_user_frag(id0
cs_set_user_death(id0
set_user_frag(id0
change to
PHP Code:
cs_set_user_deaths(id0
set_user_frags(id0
cs_set_user_deaths(id0
set_user_frags(id0
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-03-2015 , 09:03   Re: [HELP] Problem ResetScore
Reply With Quote #6

Ahhh... Fuc** mistake..
"death" instead of "deaths"..
***
btw, thank you.. Compiled the plugin...

Thank You.
VarmaRitik is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-03-2015 , 09:13   Re: [HELP] Problem ResetScore
Reply With Quote #7

I want to add code for auto-advertising about this ResetScore..
I want to add this auto-advertise code in ResetScore plugin..

Thank You. hope you guys understand
VarmaRitik is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 02-03-2015 , 09:16   Re: [HELP] Problem ResetScore
Reply With Quote #8

Quote:
Originally Posted by VarmaRitik View Post
I want to add code for auto-advertising about this ResetScore..
I want to add this auto-advertise code in ResetScore plugin..

Thank You. hope you guys understand
PHP Code:
public client_putinserver(id)
{
 
set_task(15.0,"Show_rs",id)
}

public 
Show_rs(id)
{
    
client_print(id,print_chat,"say /rs to reset score")

__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 02-03-2015 at 09:17.
indraraj striker is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-03-2015 , 09:25   Re: [HELP] Problem ResetScore
Reply With Quote #9

Thank You so much.
VarmaRitik is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-03-2015 , 10:12   Re: [HELP] Problem ResetScore
Reply With Quote #10

I need a Code to Kick those players who Spam with Chat continuously by typing ResetScore plugin's Command..

Thank You.
VarmaRitik 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 05:54.


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