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

Custom Model Menu, and admin model changing


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 08-01-2004 , 22:39   Custom Model Menu, and admin model changing
Reply With Quote #1

This plugin blocks the client side "fullupdate" command
Cstrike, engine, and fun modules required
0256 Changes the config file slightly
Example config:
Code:
//"Model Name" 	"Sound"	"Weapon"							"Health" 	"Armor" 	"Money" 	"Speed" "Gravity" 	"Footsteps"
"arctic" 		""		"abcdefghijklmnopqrstuvwxyz"		"144" 		"98" 		"16000" 	"-1" 	"-1" 		"1"
"gign" 			""		"xdrsf"									"10" 		"0" 		"10" 		"-1" 	"-1" 		"1"
Note: You need to put the models in models\player\modelname\modelname.mdl for it to work.

Config file will be auto-created if it cant find it.

amx_setmodel - Users will not get hp/armor/etc changes with this

amx_ct_model - Model to set for ct players
amx_t_model - Model to set for t players
amx_all_model - Model for all players to use
amx_admin_model - ...Model for admins to use.. default access is ADMIN_ADMIN
Set it to the description of the model, the one you see in the menu. If it isnt valid, it gets set to "" (Best to do this and change the map, after setting amx_savetype to 3)
Settings for amx_savetype (Use the number)
Code:
#define SAVE_NONE	1		//Saves no models
#define SAVE_ALIVE	2		//Saves alive players models
#define SAVE_ALL	3		//Saves everyones models
That wont work for amx_setmodel, atm, just the client menu, and it will reset hp/armor/etc
Here are the flags you need for weapons, combine them however you want, and put them in the weapon field of the config file
Code:
//Weapon flags!
#define defender    	(1<<0)  	// a -	weapon_galil 		-IDF Defender
#define cv47        	(1<<1)  	// b -	weapon_ak47			-CV 47
#define scout       	(1<<2)  	// c -	weapon_scout		-Schmidt Scout
#define krieg552		(1<<3)  	// d -	weapon_sg552 		-Krieg 552
#define awp       	 	(1<<4)  	// e -	weapon_awp			-Magnum Sniper Rifle
#define d3au1      		(1<<5)  	// f -	weapon_g3sg1		-D3 AU1
#define clarion    		(1<<6)  	// g -	weapon_famas		-Clarion 5.56
#define m4a1       		(1<<7)  	// h -	weapon_m4a1			-Maverick M4A1 Carbine
#define bullpup    		(1<<8)  	// i -	weapon_aug			-Bullpup
#define krieg550     	(1<<9)  	// j -	weapon_sg550		-Krieg 550 Commando
#define glock        	(1<<10)  	// k -	weapon_glock18		-9x19mm Sidearm
#define usp          	(1<<11)  	// l -	weapon_usp			-KM .45 Tactical
#define compact   		(1<<12)  	// m -	weapon_p228			-228 Compact
#define deagle       	(1<<13)  	// n -	weapon_deagle		-Night Hawk .50C
#define elites       	(1<<14)  	// o -	weapon_elite		-.40 Dual Elites
#define fiveseven    	(1<<15)  	// p - 	weapon_fiveseven	-ES FiveSeven
#define twelvegauge    	(1<<16)  	// q -	weapon_m3			-Leone 12 Gauge Super
#define autoshotgun  	(1<<17)  	// r -	weapon_xm1014		-Leone YG1265 Auto Shotgun
#define mac10        	(1<<18)  	// s -	weapon_mac10		-Ingram MAC10
#define tmp          	(1<<19)  	// t -	weapon_tmp			-Schmidt Machine Pistol
#define mp5          	(1<<20)  	// u -	weapon_mp5navy		-KM Sub Machine Gun
#define ump45        	(1<<21)  	// v -	weapon_ump45		-KM UMP45
#define p90          	(1<<22)  	// w -	weapon_p90			-ES C90
#define m249         	(1<<23)  	// x -	weapon_m249			-M249
#define vesthelm    	(1<<24)  	// y -	item_kevlar			-Kevlar+Helmet
#define	fullnades		(1<<25)  	// z -	weapon_flashbang	-All nades
									//		weapon_hegrenade
									//		weapon_smokegrenade
Default access is ADMIN_KICK, and use amx_modelmenu to access this
New in 0.25.7 amx_admin_model
TODO:
*Enable weapon stripping/giving
Attached Files
File Type: sma Get Plugin or Get Source (modelset.sma - 3772 views - 18.9 KB)
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 08-02-2004 , 12:41  
Reply With Quote #2

good job
givin this 1 a 5/5
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
tron73
Senior Member
Join Date: Apr 2004
Location: Schulzendorf / germany
Old 08-02-2004 , 15:04  
Reply With Quote #3

I installed the plugin and some models without any errors. When connecting to the server, the models will be downloaded, but I cant open the menu with amx_modelmenu in console, what do I have to do?
__________________


Debian LAMP
AMD 64 3700+
2xCS:S
tron73 is offline
Send a message via ICQ to tron73
Burnzy
Veteran Member
Join Date: Apr 2004
Old 08-02-2004 , 15:13  
Reply With Quote #4

its a client command, not console. U must type in the chat thing.
__________________
Burnzy is offline
Send a message via AIM to Burnzy
tron73
Senior Member
Join Date: Apr 2004
Location: Schulzendorf / germany
Old 08-02-2004 , 15:20  
Reply With Quote #5

what do I have to type in the chat?

say: /amx_modelmenu



say: amx_modelmenu


???
__________________


Debian LAMP
AMD 64 3700+
2xCS:S
tron73 is offline
Send a message via ICQ to tron73
Burnzy
Veteran Member
Join Date: Apr 2004
Old 08-02-2004 , 15:29  
Reply With Quote #6

say: amx_modelmenu
__________________
Burnzy is offline
Send a message via AIM to Burnzy
tron73
Senior Member
Join Date: Apr 2004
Location: Schulzendorf / germany
Old 08-02-2004 , 15:32  
Reply With Quote #7

nope, works not for czero, it seems. I have all admin rights!
__________________


Debian LAMP
AMD 64 3700+
2xCS:S
tron73 is offline
Send a message via ICQ to tron73
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 08-02-2004 , 21:47  
Reply With Quote #8

Heh, theres a minor bug with access checking, by default it has "0" access needed, and get_user_flags(id)&0 will always result in 0, the quick fix is change the minimum access to ADMIN_something, and recompile. The next version is almost done, which will have better multi-mod support (cstrike module isnt needed anymore). Multi mod wont be happening for awhile, sorry

Line 45, change the 0 to ADMIN_USER or ADMIN_KICK, or whatever.. I need to rethink this access

Edit: New version, you dont need to edit it anymore
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 08-03-2004 , 02:24  
Reply With Quote #9

sweet plugin . Can you add weapons too please that would be cool .
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 08-03-2004 , 13:57  
Reply With Quote #10

Yea, I was thinking of giving weapons, I just gotta get the code to do it.. It wouldn't be that hard to add, let me finish with amx_setmodel first

Question to everyone, do you want me to add the ability to keep models from round to round?
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
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 22:32.


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