View Single Post
Author Message
NooTy
Member
Join Date: Sep 2019
Old 11-09-2019 , 01:40   Why Model Not Work ?
Reply With Quote #1

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;
}
NooTy is offline