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

SM Addadmin


Post New Thread Reply   
 
Thread Tools Display Modes
mikkelmaj
Member
Join Date: Apr 2008
Old 12-04-2008 , 03:28   Re: SM Addadmin
Reply With Quote #21

Hi are this working?
Code:
#pragma semicolon 1
Code:
/*
 * SM Addadmin
 * by MaTTe (mateo10)
 */
#define VERSION "1.0"
public Plugin:myinfo = 
{
 name = "SM Addadmin",
 author = "MaTTe",
 description = "Add an admin during the game with sm_addadmin",
 version = VERSION,
 url = "http://www.sourcemod.net/"
};
public OnPluginStart()
{
 CreateConVar("smaddadmin_version", VERSION, "SM Addadmin Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
 RegAdminCmd("sm_addadmin", Command_AddAdmin, ADMFLAG_RCON, "Adds an admin to adminlist.txt.old");
}
public Action:Command_AddAdmin(client, args)
{
 if(args < 1)
 {
  ReplyToCommand(client, "[SM] Usage: sm_addadmin <name or #userid> <flags> <password>");
  return Plugin_Handled;
 }
 new String:szTarget[64], String:szFlags[20], String:szPassword[32];
 GetCmdArg(1, szTarget, sizeof(szTarget));
 GetCmdArg(2, szFlags, sizeof(szFlags));
 GetCmdArg(3, szPassword, sizeof(szPassword));
 new String:szFile[256];
 BuildPath(Path_SM, szFile, sizeof(szFile), "cfg/mani_admin_plugin/adminlist.txt.old");
 new Handle:hFile = OpenFile(szFile, "at");
 WriteFileLine(hFile, "\"%s\" \"%s\" \"%s\"", szTarget, szFlags, szPassword);
 CloseHandle(hFile);
 return Plugin_Handled;
}
mikkelmaj is offline
madmonkey
Junior Member
Join Date: Nov 2008
Old 12-07-2008 , 19:32   Re: SM Addadmin
Reply With Quote #22

need help...i´ve install the plugin and make this in the custommenu :
Quote:
"Add Admin"
{
"cmd" "sm_addadmin #1 #2"
"execute" "player"
"1"
{
"type" "teamplayer"
"method" "steamid"
"title" "Player:"
}
"2"
{
"type" "list"
"title" "Welche Flag"
"1" "bz"
"1." "Root"
"2" "abcdegkop"
"2." "Major"
"3" "abgo"
"3." "Mapchange&Sounds"
"4" "abg"
"4." "Mapchange Only"
"5" "a"
"5." "Reserve Slot"
}
}
it works great an writes in the admin_simple :
Quote:
"STEAM_0:1:********" "bz" ""
but i want :
Quote:
"STEAM_0:1:********" "bz" "" // Playername
is this possible to write the id - flag - // Playername ?

i dont want :
Quote:
Quote:
"playername" "bz" ""
becouse, if change the player his name, the admin function is disabled
__________________
madmonkey is offline
MaximReapage
Member
Join Date: Jun 2008
Old 12-08-2008 , 07:42   Re: SM Addadmin
Reply With Quote #23

Just do this instead

sm_addadmin Playername
sm_addadmin STEAMID flags

That way, you'll have his name directly above his permissions
MaximReapage is offline
Send a message via AIM to MaximReapage
madmonkey
Junior Member
Join Date: Nov 2008
Old 12-08-2008 , 16:02   Re: SM Addadmin
Reply With Quote #24

how did you mean exactly ?

Quote:
"Add Admin"
{
"cmd" "sm_playername sm_addadmin #1 #2"
"execute" "player"
"1"
........
__________________
madmonkey is offline
{7~11} TROLL
Senior Member
Join Date: Oct 2008
Location: Atlanta,Georgia
Old 12-08-2008 , 18:07   Re: SM Addadmin
Reply With Quote #25

Quote:
Originally Posted by madmonkey View Post
how did you mean exactly ?
i think he was meaning the following

sm_addadmin <ADMIN NAME>

then so that the admins name is above the access flags and steam id type..

sm_addadmin <steam id> <flags>
__________________
{7~11} TROLL is offline
sLuGo
Member
Join Date: Mar 2008
Old 12-08-2008 , 18:34   Re: SM Addadmin
Reply With Quote #26

what about just sm_addadmin steam:id flags //stinkfist(name)
__________________
sLuGo is offline
madmonkey
Junior Member
Join Date: Nov 2008
Old 12-10-2008 , 05:47   Re: SM Addadmin
Reply With Quote #27

but how can realize that in the custom menu ?

Now it is:

Server Commands
1. Add Addmin
2....
3....

--- Which Player
--- 1. Player1
--- 2. Player2
--- 3....

------ Flags
------ 1. Root
------ 2. Major (abcdefgop)
------ 3. Mapchange............
------ 4......
and it writes in the admin_simple.ini
"STEAMID 0:1:2492879" "z" ""


I want :
"STEAMID 0:1:2492879" "z" "" // Playername
or :
Playername "z" ""
"STEAMID 0:1:2492879" "z" ""
or :
Playername
"STEAMID 0:1:2492879" "z" ""

The Text in the adminmenu_custom.txt is in my post above
But how must the adminmenu_custom.txt shown to realize the playername too ?
I dont want to set the admin only by the name, becouse, the names in our clans very often changed, and the adminright is away.
__________________

Last edited by madmonkey; 12-10-2008 at 10:10.
madmonkey is offline
amohanlall32
SourceMod Donor
Join Date: Sep 2009
Location: Female
Old 12-03-2009 , 22:02   Re: SM Addadmin
Reply With Quote #28

Are you able to add admins to a group with this plugin?
amohanlall32 is offline
Acecombat2
Senior Member
Join Date: Nov 2009
Old 01-21-2010 , 04:42   Re: SM Addadmin
Reply With Quote #29

can you add in admin menu and have removeadmin command?(specificly for l4d and l4d2)
__________________
I'm Noob So Please Don't Criticise me (Fail In Engglish)
Acecombat2 is offline
mr t
Member
Join Date: Aug 2009
Location: New Zealand
Old 04-24-2010 , 03:00   Re: SM Addadmin
Reply With Quote #30

Ive installed the smx file and the sp file in correctly but still no add admin menu in server commands??
Can anyone help plse?
mr t 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 00:40.


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