Raised This Month: $ Target: $400
 0% 

Easy help! addadmin/Ban


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 02-23-2013 , 06:28   Easy help! addadmin/Ban
Reply With Quote #1

Okay so how can i addadmin

I tried this but it didnt work
Code:
server_cmd("amx_addadmin %s ah", UserID)
Code:
Usage:  amx_addadmin <playername|auth> <accessflags> [password] [authtype] - add specified player as an admin to users.ini
How should i do?

And i try to kick a player but it doesnt work
Code:
server_cmd( "kick #%d  You've been kicked out! by %s",name2,name)
And i try to Ban a player and it doesnt work
Code:
server_cmd("amx_ban #%i %i ^"%s^"", szAuthID, BanTime[g_BanTime[id]], Reason[id])


ALL szAuthID, BanTime[g_BanTime[id], Reason[id], name2, name is right!
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
MadwiX
Junior Member
Join Date: Jan 2012
Old 02-23-2013 , 14:55   Re: Easy help! addadmin/Ban
Reply With Quote #2

Code:
server_cmd("amx_addadmin ^"%s^" flags", szSteamID)

Last edited by MadwiX; 02-23-2013 at 15:00.
MadwiX is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 02-24-2013 , 08:14   Re: Easy help! addadmin/Ban
Reply With Quote #3

Quote:
Originally Posted by MadwiX View Post
Code:
server_cmd("amx_addadmin ^"%s^" flags", szSteamID)

Why wont this work then?
Code:
public GiveHead(id)
{
 new GiveHeadAdmin = menu_create ("Server name !!!!", "HandleGiveHeadAdmin")
 
 new num, players[32], tempid, szTempID [10], tempname [32]
 get_players (players, num, "a")
 
 for (new i = 0; i < num; i++)
 {
  tempid = players [ i ]
 
  get_user_name(tempid, tempname, 31)
  num_to_str(tempid, szTempID, 9)
  menu_additem(GiveHeadAdmin, tempname, szTempID, 0)
 }
 
 menu_display (id, GiveHeadAdmin)
 return PLUGIN_HANDLED
}
public HandleGiveHeadAdmin(id, menu, item)
{
 if(item == MENU_EXIT)
 {
  menu_destroy(menu)
  return PLUGIN_HANDLED
 }
 
 new data[6], name[64]
 new access, callback
 
 menu_item_getinfo (menu, item, access, data, 5, name, 63, callback)
 new tempid = str_to_num(data)
 new szName[32]
 new szPlayerName[32]
 
 get_user_name(id, szName, 32)
 get_user_name(tempid, szPlayerName, 32)
 UserID = get_user_userid(tempid)
 
 ColorChat(0, GREEN, "[%s] ^4%s^3 Just added ^4%s^3 as Headadmin", prefix2, szName, szPlayerName)
 
 server_cmd("amx_addadmin ^"%s^" abcdefghijklmnopqrstu", UserID)
 
 
 return PLUGIN_CONTINUE
}
it dont give any flags
how can i overwrite current flags with new flags?
it print this:
Code:
[AMX Mod X] STEAM_0:0:38415370 already exists!
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 02-24-2013 at 08:14.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Reply


Thread Tools
Display Modes

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 21:43.


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