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

Resetscore System [1.0]


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2020 , 08:02   Re: Resetscore System [1.0]
Reply With Quote #11

Why would a say command be blocked?
You can call the resetscore function directly from the plugin using the "callfunc" method.

Code:
callfunc_begin("pluginname.amxx", "functionname") callfunc_push_int(id) callfunc_end()

On my phone right now so I can't check what the function name is. If I remember correcty, it should be Cmd_Resstscore.

Or if you're using my Menu Builder plugin, there's an option to call functions in the .ini file.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xonfire
Member
Join Date: Sep 2020
Old 12-27-2020 , 13:07   Re: Resetscore System [1.0]
Reply With Quote #12

What I get is that message on the client console server tried to send invalid command i am using client_cmd.

Using client_cmd (id, "cmd_resetscore") appears in console Unknown command: cmd_resetscore

Last edited by xonfire; 12-27-2020 at 13:17.
xonfire is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2020 , 14:23   Re: Resetscore System [1.0]
Reply With Quote #13

Where did you see me mention "client_cmd"? I literally wrote an entire code block for you to use instead of "client_cmd".

Code:
callfunc_begin("crx_resetscore.amxx", "cmd_resetscore") callfunc_push_int(id) callfunc_end()

?

And you shouldn't even get such a message for this command. Your game is either non-Steam or you have some additional protection added inside it. This is a problem only with your game.
__________________

Last edited by OciXCrom; 12-27-2020 at 14:24.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xonfire
Member
Join Date: Sep 2020
Old 12-27-2020 , 15:34   Re: Resetscore System [1.0]
Reply With Quote #14

That's what I was using before you sent me that code, where I add the code?, I'm new at this.

pd_ By the way, I don't use "NO STEAM".

Last edited by xonfire; 12-27-2020 at 15:44.
xonfire is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2020 , 16:02   Re: Resetscore System [1.0]
Reply With Quote #15

Use that instead of "client_cmd".
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xonfire
Member
Join Date: Sep 2020
Old 12-27-2020 , 19:41   Re: Sistema resetscore [1.0]
Reply With Quote #16

What to do in this case?

PHP Code:
callfunc_push_xxx called without callfunc_begin
[AMXXDisplaying debug trace (plugin "menu.amxx"version "unknown")
[
AMXXRun time error 10native error (native "callfunc_push_int")
[
AMXX]    [0menu.sma::handMenu (line 31
xonfire is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2020 , 21:24   Re: Resetscore System [1.0]
Reply With Quote #17

Post your code...
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xonfire
Member
Join Date: Sep 2020
Old 12-27-2020 , 21:44   Re: Resetscore System [1.0]
Reply With Quote #18

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init( )
    
register_clcmd"nightvision""OpenMenu" );
    
public 
OpenMenuid )
{
    new 
iMenu menu_create"\y[Menu]\w Menú CTF""handMenu" );
    
    
menu_additemiMenu"\wONE""1" );
    
menu_additemiMenu"\wTWO""2" );
    
menu_additemiMenu"\wTHREE""3" );
    
menu_additemiMenu"\wFOUR""4" );
    
menu_additemiMenu"\wFIVE""5" );
    
menu_additemiMenu"\wSIX""6" );
    if( 
is_user_adminid ) ) menu_additemiMenu"\wAdmin Menu""7" );
    else 
menu_additemiMenu"\dAdmin Menu""7" );
    if( 
is_user_adminid ) ) menu_additemiMenu"\wWeapons( Only Admin )""8" );
    else 
menu_additemiMenu"\dWeapons( Only Admin )""8" );
    
    
menu_displayidiMenu);
}
public 
handMenuidmenuitem )
{
    switch( 
item )
    {
        case 
0:
        {
            
callfunc_begin("crx_resetscore.amxx""cmd_resetscore")
            
callfunc_push_int(id)
            
callfunc_end()
        }
        case 
1:
        {
            
// Code
        
}
        case 
2:
        {
            
// Code
        
}
        case 
3:
        {
            
// Code
        
}
        case 
4:
        {
            
// Code
        
}
        case 
5:
        {
            
// Code
        
}
        case 
6:
        {
            if( 
is_user_adminid ) )
            {
                
// Code
            
}
            else
                
OpenMenuid );
        }
        case 
7:
        {
            if( 
is_user_adminid ) )
            {
                
// Code
            
}
            else
                
OpenMenuid );
        }
        case 
MENU_EXIT:
        {
            
menu_destroymenu );
            return 
PLUGIN_HANDLED;
        }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;


Last edited by xonfire; 12-27-2020 at 21:45.
xonfire is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-27-2020 , 22:42   Re: Resetscore System [1.0]
Reply With Quote #19

why not just use

Code:
client_cmd(id, "say /rs");

lmao ?
__________________
@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
xonfire
Member
Join Date: Sep 2020
Old 12-27-2020 , 23:36   Re: Resetscore System [1.0]
Reply With Quote #20

Quote:
Originally Posted by Natsheh View Post
why not just use

Code:
client_cmd(id, "say /rs");

lmao ?
server tried to send invalid command lmao
xonfire 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 14:05.


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