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

Admin Model


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
Sanji
Member
Join Date: Mar 2004
Old 03-31-2004 , 10:13   Admin Model
Reply With Quote #1

This Plugin allows you to add access levels to models.

Example: you have a mod called svencoop and a model named kermit. now you can add access level b and every admin with level b can use this model, all without this level cant use it.

install:
make a file named models.ini in addons/amxx/
add this example code and edit it for your needs:

Code:
						;dont use the basic model in this file!!!
;model		admin flags	flags		;flags can bee:
						;a = admin flags are requiered level
						;b = admin flags are password
						;c = admin flags are authid (steamid/wonid)
"kermit"	"ab"		"a"		;admin need level a OR level b to use this model
"gina"		"test"		"b"		;only users can use this model
"robo"		"az"		"a"		;only users and admins with level a can use this model
"gman"		"STEAM_0:0:0"	"c"		;only this user or
"gman"		"STEAM_0:0:1"	"c"		;this user cane use this model
this will work with all mods, witch supports the model command (so no counter-strike)

now with password support!
Attached Files
File Type: sma Get Plugin or Get Source (adminmodel.sma - 1722 views - 3.6 KB)
Sanji is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 03-31-2004 , 17:45  
Reply With Quote #2

w00t i hope sniperbeamer moves cs_get_user_model to engine module..
__________________
QwertyAccess is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-01-2004 , 04:32  
Reply With Quote #3

Why?? That will never happen.
Johnny got his gun is offline
BAILOPAN
Join Date: Jan 2004
Old 04-01-2004 , 04:33  
Reply With Quote #4

the reason is that supposedly it's not modspecific. I think the function should be mimiced or moved into core as:
get_model_info or something.

I dunno
__________________
egg
BAILOPAN is offline
Sanji
Member
Join Date: Mar 2004
Old 04-01-2004 , 15:58  
Reply With Quote #5

password support is done

@BAILOPAN
can you add the ini and cfg extension for file attachment
Sanji is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-02-2004 , 01:45  
Reply With Quote #6

You can get CS model of a player with current natives (without CS module)...

Code:
/* Gets info from player. */ native get_user_info(index,const info[],output[],len);

Code:
    new model[64]     get_user_info(index, "model", model, 63)
Johnny got his gun is offline
BAILOPAN
Join Date: Jan 2004
Old 04-02-2004 , 01:47  
Reply With Quote #7

good point
__________________
egg
BAILOPAN is offline
Sanji
Member
Join Date: Mar 2004
Old 04-02-2004 , 14:09  
Reply With Quote #8

ah cool *changed*

can everyone add config file support to file attachments? like ini, inf and cfg?
Sanji is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 04-03-2004 , 15:31  
Reply With Quote #9

well you could always zip it up :O
also i dont understand the password support :X
__________________
QwertyAccess is offline
Sanji
Member
Join Date: Mar 2004
Old 04-04-2004 , 22:08  
Reply With Quote #10

ok an example:

you have this line:

"gina" "test" "b" ;only users can use this model

so, now, to use this model, you need to set the password to "test" (setinfo _model_password "test") and type "model gina"

second example:

"kermit" "kermit only" "b" ;only users can use this model

so, now, to use this model, you need to set the password to "kermit only" (setinfo _model_password "kermit only") and type "model kermit"

done!
Sanji 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 06:23.


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