AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with mine script. (https://forums.alliedmods.net/showthread.php?t=82578)

ianglowz 12-26-2008 02:50

Help with mine script.
 
Please check my code.Because I try to compile.Have error.

This is my code

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Score Checker"
#define VERSION "1.0"
#define AUTHOR "IanGlowz"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /myscore","cmd_get_score",ADMIN_USER,"")
}

public 
cmd_get_score(id,level,cid)  
        new 
score get_score()
        
client_print(id,print_chat,"[ Score ] Your score is %d",score)
     
        return 
PLUGIN_HANDLED 



steve139 12-26-2008 03:30

Re: Help with mine script.
 
:)

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Score Checker"
#define VERSION "1.0"
#define AUTHOR "IanGlowz"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /myscore","cmd_get_score")
}

public 
cmd_get_score(id)  
        new 
score get_user_frags(id)
        
client_print(id,print_chat,"[ Score ] Your score is %i",score)
     
        return 
PLUGIN_HANDLED 



ianglowz 12-26-2008 03:48

Re: Help with mine script.
 
Wrong in my coding.Need to fix it~

steve139 12-26-2008 03:50

Re: Help with mine script.
 
are you blind :mrgreen:?

Quote:

Originally Posted by steve139 (Post 733277)
:)

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Score Checker"
#define VERSION "1.0"
#define AUTHOR "IanGlowz"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /myscore","cmd_get_score")
}

public 
cmd_get_score(id)  
        new 
score get_user_frags(id)
        
client_print(id,print_chat,"[ Score ] Your score is %i",score)
     
        return 
PLUGIN_HANDLED 




ianglowz 12-26-2008 03:53

Re: Help with mine script.
 
Show me the error please..

*EDIT*SORRY..I think that was my code.Thanks

ianglowz 12-26-2008 03:56

Re: Help with mine script.
 
I have error on compile.

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Symbol already defined: "register_clcmd" on line 13
Error: Declaration of a local variable must appear in a compound block on line 17
Error: Invalid function or declaration on line 20

3 Errors.

steve139 12-26-2008 04:11

Re: Help with mine script.
 
-.- you forgot a { and i didnt checked that ...

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Score Checker"
#define VERSION "1.0"
#define AUTHOR "IanGlowz"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /myscore","cmd_get_score")
}

public 
cmd_get_score(id)  {
    new 
score get_user_frags(id)
    
    
client_print(id,print_chat,"[ Score ] Your score is %i",score)
     
    return 
PLUGIN_HANDLED



ianglowz 12-26-2008 06:56

Re: Help with mine script.
 
It now can be compile.Now I will test it.If it works,I post it which have your name at credit.:)

ianglowz 12-26-2008 07:35

Re: Help with mine script.
 
Now this plugin work GREATLY!!Thanks for your help.Now I credit you in this plugin.

xPaw 12-26-2008 08:49

Re: Help with mine script.
 
if this plugin is good kill me -_-


All times are GMT -4. The time now is 09:17.

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