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

No Score [2013] [0.0.2]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-22-2013 , 02:58   No Score [2013] [0.0.2]
Reply With Quote #1

No Score


0.0.2b LordOfNothing


Description : This plugin block having score , always having 0-0 score !

Original idea : http://forums.alliedmods.net/showthread.php?t=15712

Cvars : mp_noscore 1/0 ( 1 = enabled )

Modules:
Core
FakeMeta
HamSandWich
Cstrike


Game support this software:
Counter-Strike 1.6
Counter-Strike Condition Zero


Severs using this plugin : Link


Changelog :

Code:
0.0.1 - realease
0.0.2 - Code Optimization

Last edited by LordOfNothing; 11-01-2013 at 02:09.
LordOfNothing is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 10-22-2013 , 03:26   Re: No Score [2013] [0.0.1]
Reply With Quote #2

Hmmm, block scoring seems like useless for me. By the way here some better code:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <cstrike>

new const PLUGIN [] = "No Score";
new const 
VERSION [] = "0.0.1";
new const 
AUTHOR [] = "LordOfNothing";

new 
g_Enabled;

public 
plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR);
    
RegisterHam(Ham_Killed"player""C_Player_Die"1);
    
g_Enabled register_cvar("mp_noscore","1");
}

public 
C_Player_Die(victimattacker)
{
    if(!
get_pcvar_num(g_Enabled)) return;
    
    
cs_set_user_deaths(victim0)
    
    if(
is_user_connected(attacker)) set_user_frags(attacker0);

yokomo is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-22-2013 , 03:28   Re: No Score [2013] [0.0.1]
Reply With Quote #3

Quote:
Originally Posted by yokomo View Post
Hmmm, block scoring seems like useless for me. By the way here some better code:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <cstrike>

new const PLUGIN [] = "No Score";
new const 
VERSION [] = "0.0.1";
new const 
AUTHOR [] = "LordOfNothing";

new 
g_Enabled;

public 
plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR);
    
RegisterHam(Ham_Killed"player""C_Player_Die"1);
    
g_Enabled register_cvar("mp_noscore","1");
}

public 
C_Player_Die(victimattacker)
{
    if(!
get_pcvar_num(g_Enabled)) return;
    
    
cs_set_user_deaths(victim0)
    
    if(
is_user_connected(attacker)) set_user_frags(attacker0);


Poorly coded ,
Is not useles , maybe for you , but if sombary need this plugin now will have
Can tell me please (beceause im idiot ) why should use your code and not my code ?? , thanks !

Last edited by LordOfNothing; 10-22-2013 at 03:29.
LordOfNothing is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-22-2013 , 03:53   Re: No Score [2013] [0.0.1]
Reply With Quote #4

get_user_attacker is pointless as Ham_Killed passes the attacker's index.
No need to cache the value of the cvar since you only use it once.
You should check that both the attacker and victim are valid clients before you set the deaths and frags.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-22-2013 , 04:01   Re: No Score [2013] [0.0.1]
Reply With Quote #5

UPDATE 0.0.2 :
  • Check first post

Last edited by LordOfNothing; 10-22-2013 at 04:16.
LordOfNothing is offline
Old 10-22-2013, 04:02
LordOfNothing
This message has been deleted by LordOfNothing. Reason: sorry :)) loo k up
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 10-22-2013 , 04:19   Re: No Score [2013] [0.0.1]
Reply With Quote #6

Quote:
Originally Posted by YamiKaitou View Post
get_user_attacker is pointless as Ham_Killed passes the attacker's index.
No need to cache the value of the cvar since you only use it once.
You should check that both the attacker and victim are valid clients before you set the deaths and frags.
As far as i know there is no need to check is victim connected/valid in Ham_Kill, since we already use "player" entity. Check connected/valid is for attacker only.
yokomo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-22-2013 , 04:19   Re: No Score [2013] [0.0.2]
Reply With Quote #7

Quote:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>


new const PLUGIN [] = "No Score";
new const 
VERSION [] = "0.0.2";
new const 
AUTHOR [] = "LordOfNothing";

#pragma semicolon 1

new g_Enabled;

public 
plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR);
    
RegisterHam(Ham_Killed"player""C_Player_Die"1);
    
g_Enabled register_cvar("mp_noscore","1");
}

public 
C_Player_Die(iVictimiAttacker)
{
    if(
get_pcvar_num(g_Enabled) && is_user_connected(iAttacker && iVictim))
    {
        
set_pev(iAttackerpev_frags0);
        
cs_set_user_deaths(iVictim0);
    }

You clearly proved that you don't have enough knowledge in order to code and release a simple plugin, and to support it which is more important.
Unaproved.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 10-22-2013 at 04:19.
ConnorMcLeod is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-22-2013 , 04:21   Re: No Score [2013] [0.0.2]
Reply With Quote #8

You right , i will work more hardly
LordOfNothing is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 10-22-2013 , 04:25   Re: No Score [2013] [0.0.2]
Reply With Quote #9

Quote:
Originally Posted by LordOfNothing View Post
You right , i will work more hardly
Well you can get/learn more info here http://www.amxmodx.org/doc/index.html and read all .inc files for it descriptions.
yokomo is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-22-2013 , 04:29   Re: No Score [2013] [0.0.2]
Reply With Quote #10

Quote:
Originally Posted by yokomo View Post
Well you can get/learn more info here http://www.amxmodx.org/doc/index.html and read all .inc files for it descriptions.
already read this files and all hg.alliedmods.net amxmodx-central all file , and many tutorials from forum , other ideas ??
LordOfNothing 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 17:03.


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