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

Complete Problem


Post New Thread Reply   
 
Thread Tools Display Modes
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
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-08-2019 , 13:07   Re: Complete Problem
Reply With Quote #2

Well, what kind of "reason" do you expect to give in a function that sets the user's model? Remove that argument...
Why is this thread not in "Scripting Help"?
__________________

Last edited by OciXCrom; 11-08-2019 at 13:07.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply



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 15:09.


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