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

Resetscore Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lantimilan
Senior Member
Join Date: May 2016
Old 01-17-2018 , 09:20   Resetscore Problem
Reply With Quote #1

Hello i have one problem with resetscore when somebody trust N or /rs message show for all i dont know why i like to make just to show one person who reset score ?
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <colorchat>

static const resetCmd[][] = {
    
"say_team /resetscore",
    
"say /resetscore",
    
"say_team /rs",
    
"say /rs",
    
"nightvision"
}

new 
pCvar[2];

public 
plugin_init()
{
    
register_plugin("Restarto Rezultatin""1.0""blackwing");
    
    for(new 
c=0;c<sizeof(resetCmd);c++)
        
register_clcmd(resetCmd[c], "cmdResetScore");
    
    
pCvar[0] = register_cvar("fast_rs_hud""1");
    
    
set_task(200.0"message"___"b");
}

public 
plugin_cfg()
{
    
pCvar[1] = get_pcvar_num(pCvar[0]);
}

public 
cmdResetScore(id)
{
    if(
is_user_connected(id))
    {
        
set_user_frags(id0);
        
cs_set_user_deaths(id0);

        
ColorChat(0GREEN"^3[^4LS^3]^1: ^3Ju sapo restartuat rezultatin tuaj ne ^4 0^1. ");
        
        return 
1;
    }
    
    return 
0;
}

public 
message()
    
ColorChat(0GREEN"^3[^4LS ResetScore^3]^1: ^3Per te restartuar shpejt rezultatin tuaj shtyp ^4N ^1, ^3ose shkruaj ^4/rs"); 
lantimilan is offline
Send a message via MSN to lantimilan
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-17-2018 , 09:38   Re: Resetscore Problem
Reply With Quote #2

Just change

ColorChat(0, GREEN,
to
ColorChat(id, GREEN,

Last edited by raizo11; 01-17-2018 at 09:43.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
lantimilan
Senior Member
Join Date: May 2016
Old 01-17-2018 , 09:45   Re: Resetscore Problem
Reply With Quote #3

can you sent all edit what you suggest because when i change not compile ?
lantimilan is offline
Send a message via MSN to lantimilan
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 01-17-2018 , 09:46   Re: Resetscore Problem
Reply With Quote #4

Quote:
Originally Posted by lantimilan View Post
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <colorchat>

static const resetCmd[][] = {
    
"say_team /resetscore",
    
"say /resetscore",
    
"say_team /rs",
    
"say /rs",
    
"nightvision"
}

new 
pCvar[2];

public 
plugin_init()
{
    
register_plugin("Restarto Rezultatin""1.0""blackwing");
    
    for(new 
c=0;c<sizeof(resetCmd);c++)
        
register_clcmd(resetCmd[c], "cmdResetScore");
    
    
pCvar[0] = register_cvar("fast_rs_hud""1");
    
    
set_task(200.0"message"___"b");
}

public 
plugin_cfg()
{
    
pCvar[1] = get_pcvar_num(pCvar[0]);
}

public 
cmdResetScore(id)
{
    if(
is_user_connected(id))
    {
        
set_user_frags(id0);
        
cs_set_user_deaths(id0);

        
ColorChat(idGREEN"^3[^4LS^3]^1: ^3Ju sapo restartuat rezultatin tuaj ne ^4 0^1. ");
        
        return 
1;
    }
    
    return 
0;
}

public 
message()
    
ColorChat(0GREEN"^3[^4LS ResetScore^3]^1: ^3Per te restartuar shpejt rezultatin tuaj shtyp ^4N ^1, ^3ose shkruaj ^4/rs"); 
__________________
Relaxing is offline
lantimilan
Senior Member
Join Date: May 2016
Old 01-17-2018 , 09:49   Re: Resetscore Problem
Reply With Quote #5

AMX Mod X Compiler 1.8.3-manual
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Modified for www.Freakz.ro / amx.freakz.ro

resetscore-edit.sma(50) : error 010: invalid function or declaration

1 Error.
Compile failed!
lantimilan is offline
Send a message via MSN to lantimilan
lantimilan
Senior Member
Join Date: May 2016
Old 01-17-2018 , 09:55   Re: Resetscore Problem
Reply With Quote #6

Its okey thanks all ;)
lantimilan is offline
Send a message via MSN to lantimilan
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 08:11.


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