AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] My Code Not Working Fine :( (https://forums.alliedmods.net/showthread.php?t=252896)

priyojit 12-11-2014 07:16

[HELP] My Code Not Working Fine :(
 
Check It Not Working :(

PHP Code:

#include <amxmodx>
#include <dhudmessage> 

#define PLUGIN        "KGC TagMe"
#define VERSION        "1.2"
#define AUTHOR        "XYZ"

#define cm(%1)        (sizeof(%1)-1)

new pCvar_Tag;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
// Hook For the Cmd
    
register_clcmd("say""Handle");
    
register_clcmd("say_team""Handle");
    
    
// Cvar
    
pCvar_Tag register_cvar("amx_sv_tag""-=|[K[G]C]|=- | ");
    
    
set_task(60.0,"Adv",_,_,_,"b");
    
}

public 
Handle(id)
{
    static 
szName[33], szTag[16];
    new 
Msg[32]
    
read_args(Msgcharsmax(Msg))
    
remove_quotes(Msg)
    
get_user_name(idszNamecm(szName));
    
get_pcvar_string(pCvar_TagszTagcm(szTag));
          
    
// Make Tag
    
if(equali(Msg"/tagme")) {
        
format(szNamecm(szName), "%s%s"szTagszName);
        
set_user_info(id"name"szName);
       
set_dhudmessage(016000.200.6026.012.0)
       
show_dhudmessage(id"You Got Our Server Tag")
         }
    
// Untag    
    
if(equali(Msg"/untag")) {
        
replace_allszNamecm(szName), szTag"" );
        
set_user_infoid"name"szName );
        
set_dhudmessage(016000.200.6026.012.0)
        
show_dhudmessage(id"You Remove Our Server Tag")
      }
      
    
// Alredy Tag
    
if(containi(szNameszTag) != -1) {
        
set_dhudmessage(016000.200.6026.012.0)
        
show_dhudmessage(id"You Already Have Our Server Tag")
        }
        
    return 
PLUGIN_CONTINUE;
}  

public 
Adv(id
{
        
set_dhudmessage(016000.700.7021.014.0
        
show_dhudmessage(id"To Get Our Server Tag^nType /tagme")



wickedd 12-11-2014 07:19

Re: [HELP] My TagMe New Code Not Working Fine :(
 
Don't start multiple threads for the same issue, here's your first one.

priyojit 12-11-2014 07:21

Re: [HELP] My TagMe New Code Not Working Fine :(
 
Quote:

Originally Posted by wickedd (Post 2233815)
Don't start multiple threads for the same issue, here's your first one.

bro check it its new code not the old one first check it then say -_- :nono: :nono:

HamletEagle 12-11-2014 07:43

Re: [HELP] My Code Not Working Fine :(
 
After 14 minutes you start complaining that you get no help ?

priyojit 12-11-2014 07:56

Re: [HELP] My Code Not Working Fine :(
 
Quote:

Originally Posted by HamletEagle (Post 2233843)
After 14 minutes you start complaining that you get no help ?

Bro Check my code and tell me wht to do ??? :(

priyojit 12-11-2014 08:52

Re: [HELP] My Code Not Working Fine :(
 
anyone pls tell me my code not working please resolve my error :(

tousif 12-11-2014 09:05

Re: [HELP] My Code Not Working Fine :(
 
what is the error it showing when compiling

priyojit 12-11-2014 09:46

Re: [HELP] My Code Not Working Fine :(
 
Quote:

Originally Posted by tousif (Post 2233885)
what is the error it showing when compiling

its not compile error

its error this section


PHP Code:

public Handle(id

    static 
szName[33], szTag[16]; 
    new 
Msg[32
    
read_args(Msgcharsmax(Msg)) 
    
remove_quotes(Msg
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
           
    
// Make Tag 
    
if(equali(Msg"/tagme")) { 
        
format(szNamecm(szName), "%s%s"szTagszName); 
        
set_user_info(id"name"szName); 
       
set_dhudmessage(016000.200.6026.012.0
       
show_dhudmessage(id"You Got Our Server Tag"
         } 
    
// Untag     
    
if(equali(Msg"/untag")) { 
        
replace_allszNamecm(szName), szTag"" ); 
        
set_user_infoid"name"szName ); 
        
set_dhudmessage(016000.200.6026.012.0
        
show_dhudmessage(id"You Remove Our Server Tag"
      } 
       
    
// Alredy Tag 
    
if(containi(szNameszTag) != -1) { 
        
set_dhudmessage(016000.200.6026.012.0
        
show_dhudmessage(id"You Already Have Our Server Tag"
        } 
         
    return 
PLUGIN_CONTINUE


when i type /tagme Both "You Already Have Our Server Tag" and "You Got Our Server Tag" coming plz correct it :(

indraraj striker 12-11-2014 10:08

Re: [HELP] My Code Not Working Fine :(
 
Quote:

Originally Posted by priyojit (Post 2233900)
its not compile error

its error this section


PHP Code:

public Handle(id

    static 
szName[33], szTag[16]; 
    new 
Msg[32
    
read_args(Msgcharsmax(Msg)) 
    
remove_quotes(Msg
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
           
    
// Make Tag 
    
if(equali(Msg"/tagme")) { 
        
format(szNamecm(szName), "%s%s"szTagszName); 
        
set_user_info(id"name"szName); 
       
set_dhudmessage(016000.200.6026.012.0
       
show_dhudmessage(id"You Got Our Server Tag"
         } 
    
// Untag     
    
if(equali(Msg"/untag")) { 
        
replace_allszNamecm(szName), szTag"" ); 
        
set_user_infoid"name"szName ); 
        
set_dhudmessage(016000.200.6026.012.0
        
show_dhudmessage(id"You Remove Our Server Tag"
      } 
       
    
// Alredy Tag 
    
if(containi(szNameszTag) != -1) { 
        
set_dhudmessage(016000.200.6026.012.0
        
show_dhudmessage(id"You Already Have Our Server Tag"
        } 
         
    return 
PLUGIN_CONTINUE


when i type /tagme Both "You Already Have Our Server Tag" and "You Got Our Server Tag" coming plz correct it :(

Tested and working :)

--->>>>
PHP Code:


#include <amxmodx> 
#include <dhudmessage> 

#define PLUGIN        "KGC TagMe" 
#define VERSION        "2.0" 
#define AUTHOR        "KGC" 

#define cm(%1)        (sizeof(%1)-1) 

new pCvar_Tag
new 
HudSync;

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR); 
     
    
pCvar_Tag register_cvar("amx_sv_tag""-=|[K[G]C]|=- |"); 
             

    
register_clcmd("say_team /tagme""cmdTagMe");
    
register_clcmd("say /tagme""cmdTagMe");
    
register_clcmd("say_team /untag""cmdunTag");
    
register_clcmd("say /untag""cmdunTag");
    
    
set_task(60.0,"Adv",_,_,_,"b");
    
HudSyncCreateHudSyncObj();
     


public 
plugin_precache()
{
HudSyncCreateHudSyncObj();
}

public 
cmdTagMe(id

    new 
szArg[192]; 
    
read_args(szArgcharsmax(szArg)); 
    
remove_quotes(szArg); 
     
    static 
szName[33], szTag[16]; 
     
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
     
    if(
containi(szNameszTag) != -1
    { 
        
set_dhudmessage(016000.200.6026.012.0
        
ShowSyncHudMsg(id,HudSync,"You Already Have Our Server Tag"
        return 
PLUGIN_CONTINUE
    } 
   
    
format(szNamecm(szName), "%s %s"szTagszName); 
    
set_user_info(id"name"szName); 
    
set_dhudmessage(016000.200.6026.012.0
    
ShowSyncHudMsg(id,HudSync,"You Got Our Server Tag")
    
    return(
szArg[0] == '/'); 


public 
cmdunTag(id

    new 
szArg[192]; 
    
read_args(szArgcharsmax(szArg)); 
    
remove_quotes(szArg); 
     
    static 
szName[33], szTag[16]; 
     
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
  
   
     
replace_allszNamecm(szName), szTag"" ); 
     
set_user_infoid"name"szName ); 
     
set_dhudmessage(016000.200.6026.012.0
     
ShowSyncHudMsg(id,HudSync"You Remove Our Server Tag"
    
    return(
szArg[0] == '/'); 



public 
Adv(id

    
set_dhudmessage(016000.01.001.08.00.20.3false 
    
ShowSyncHudMsg(id,HudSync,"To get -=|[K[G]C]|=- tag^nType /tagme")



tousif 12-11-2014 11:08

Re: [HELP] My Code Not Working Fine :(
 
No errors in the plugin u posted its compiling but indraraj has posted it working


All times are GMT -4. The time now is 15:19.

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