Raised This Month: $51 Target: $400
 12% 

Complete Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
NooTy
Member
Join Date: Sep 2019
Old 11-08-2019 , 12:28   Complete Problem
Reply With Quote #1

Quote:
number of argument doesn't match definition
Problem at this line :
Quote:
cs_set_user_model(player, "%s", reason);
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, reason [ 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, reason, 31 );
	remove_quotes ( reason );
	if( is_user_connected( player ) )
	cs_set_user_model(player, "%s", reason);
	log_to_file (LOGFILE, "Admin (%s) Made amx_model On: (%s)", name, name2 )
	
	return 1;
}

Last edited by NooTy; 11-08-2019 at 12:30.
NooTy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:59.


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