AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Quit CS (https://forums.alliedmods.net/showthread.php?t=121129)

Perfect Team 03-11-2010 23:37

Quit CS
 
Hi,
I have problem with my code
Code:

#include <amxmodx>
#include <amxmisc>

new activity_cvar

public plugin_init() {
    activity_cvar = register_cvar("exec_activity", "2")
    register_plugin("Exec/Shell","1.00","ESTcobs")
    register_clcmd("exec_quitcs","quitCS",ADMIN_LEVEL_G,"<nick> - wylacz CS graczowi")
}

public quitCS(id, level, cid) {
    if (!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    new activity = get_pcvar_num(activity_cvar)
    new admin[32]
    get_user_name(id,admin,31)

        switch(activity) {
            case 1: {
                client_print(0,print_chat,"[SHELL] Administrator wylaczyl gre graczowi ^"%s^" !")
                server_print("[SHELL] Administrator wylaczyl gre graczowi ^"%s^" na wszystkich !")
            }
            case 2: {
                client_print(0,print_chat,"[SHELL] ADMIN %s wylaczyl gre graczowi ^"%s^" !",admin)
                server_print("[SHELL] ADMIN %s wylaczyl gre graczowi ^"%s^" !",admin)
            }
        default: return PLUGIN_CONTINUE
        }
    return PLUGIN_HANDLED
}

3 x Loose Identification + i don't know where put a
Code:

client_cmd("quit")
I need this plugin to quiting CS players per amxmodmenu -> clcmds [.ini]

TNX4HELP
ESTcobs

wrecked_ 03-12-2010 00:05

Re: Quit CS
 
client_cmd( id, "quit" )

Use the Indent Tool for loose indentation errors. Most text editors have them.

Perfect Team 03-12-2010 00:12

Re: Quit CS
 
*crap*
thank you :=)

wrecked_ 03-12-2010 00:20

Re: Quit CS
 
That warning means you have an inconsistency in spaces/tabs or you have blatently incorrect indentation/tabbing. Go to the line and fix it yourself, it's not difficult.


All times are GMT -4. The time now is 08:39.

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