AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=43)
-   -   Why Model Not Work ? (https://forums.alliedmods.net/showthread.php?t=319578)

NooTy 11-09-2019 01:40

Why Model Not Work ?
 
Quote:

number of argument doesn't match definition
Problem at this line :
Quote:

cs_set_user_model(player, "%s", model);
Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "amx_set_model"
#define VERSION "1.0"
#define AUTHOR "NooTy"

#define LOGFILE                "amx_cmd.log"

public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)

        register_concmd("amx_set_model","skin",ADMIN_IMMUNITY,"<Nick> <Model>")
}

public skin ( id, level, cid )
{

        if ( !cmd_access ( id, level, cid, 3 ) )
                return 1;
       
        new arg [ 33 ];
        read_argv ( 1, arg, charsmax ( arg ) );
        new player = cmd_target ( id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS );
       
        if ( !player )
        {
                console_print ( id, "[CMD] Player Is Not Online" );
                return 1;
        }
       
        new authid [ 33 ], authid2 [ 33 ],
        name2 [ 33 ], name [ 33 ],
        userid2, model[ 32 ], userip [ 33 ];
       
        get_user_authid ( id, authid, charsmax ( authid ) );
        get_user_authid ( player, authid2, charsmax ( authid2 ) );
        get_user_name ( player, name2, charsmax ( name2 ) );
        get_user_name ( id, name, charsmax ( name ) );
        get_user_ip ( player, userip, charsmax ( userip ) );
       
        userid2 = get_user_userid ( player )

        read_argv ( 2, model, 31 );
        remove_quotes ( model );
        if( is_user_connected( player ) )
        cs_set_user_model(player, "%s", model);
        log_to_file (LOGFILE, "Admin (%s) Made amx_model On: (%s)", name, name2 )
       
        return 1;
}



All times are GMT -4. The time now is 12:37.

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