AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Some lil bug (https://forums.alliedmods.net/showthread.php?t=5385)

ich bin #verpeilt?! 08-30-2004 16:31

Some lil bug
 
Hi guys,
a friend of mine is just working on a CS 1.5 server so he installed AMXX, WC3FT, Admin Mod to it...
well because of the crackfix to let us play CS 1.5 there are NO valid wonids..
all people got the same!

so i thought i shall make a little changes to admin.sma / .amx so that people dont be only admin when they have the "name" entered in users.ini..
well i thought when i let AMXX get informations from the client like the password. so i called it _adminid and changed this in the admin.sma

on the top to the other declarations:
Code:

  register_cvar("amx_id_field","_aid")
this i changed in AccessUser!

Code:

remove_user_flags(id)
  new userip[32],userauthid[32],password[32],passfield[32],adminid[32],idfield[32]
  get_user_ip(id,userip,31,1)
  get_user_authid(id,userauthid,31)
  //if ( name[0] ) copy( username , 31, name)
  //else get_user_name(id,username,31 )
  get_cvar_string("amx_id_field",idfield,31)
  get_user_info(id,idfield,adminid,31)
  get_cvar_string("amx_password_field",passfield,31)
  get_user_info(id,passfield,password,31)
  new result = getAccess(id,adminid,userauthid,userip,password)
  if (result & 1) client_cmd(id,"echo ^"* Invalid Password!^"")
  if (result & 2) {

awww well i changed the function name to "accessUser( id )"
because the compiler said the 2nd var wouldt cause an error...

as you can see it asks for "setinfo _aid" in clients config..
it works! but the flags for each users are the same! all got WHOLE admin rights! -> "bfghijklmnopqrstuy"

this is all i changed.. and i dont know why its not working...
could anybody help me please?!

ich bin #verpeilt?! 08-31-2004 15:12

noone knows?

plss help me

Votorx 08-31-2004 17:48

1. You should post the .sma if you want help with a plugin.
2. Admin.sma was just fine before. Instead of using a name to register admins you should have used their Steam Ids. In this case no body can become admin unless their steam id is registered in the user.ini.
3. Passwords worked fine, they didn't need to be edited.

ich bin #verpeilt?! 08-31-2004 18:00

HI VectorX
1. well, i posted all editing to original amxx admins.sma...
2. then as i wrote our server runs CS1.5 so there are no WONIDs or even SteamIDs...
3. i didnt changed the passwords...

Votorx 08-31-2004 18:13

No, you make your own passwords for the names in user.ini. And it shouldn’t make a difference if your using CS 1.5 or not, steam ids are independent of the mod.

My names not VectorX -.-

ich bin #verpeilt?! 08-31-2004 18:22

1 Attachment(s)
sorry VotorX, was just in a new game i fixed.. with a var called VectorX[]...

Well, i think i understand what you want to say...

facts:
1. we are running CS1.5
2. for running CS1.5 with WON (WON is down) it needs a patch.. this patch makes all WONids the same.. so you cant set an admin by his WONID... only by name!
But if you change this name he is not admin anymore.. so i thought i let amx get another "password" (i called it adminID).. it in users.ini ("testis" "password" "flags" "other") and in config.cfg (on client!!! as setinfo _aid "testid" and setinfo _pw "password") !

now i changed in admin.sma the lines as above.. so that it dont get the name of the wannaBe admin but the AdminID.. it compares the adminid on client with the amdinid in users.ini and then in compares the passwords!!!

shall work?!

but ok if you need the whole file:

Votorx 08-31-2004 18:47

Ahh I c. Well your on your own then. I would recommend rather than editing admin.sma you should just make your own. Really all you have to do is call the plugin when a player is authenticated to be admin, then se the flags to his id in the plugin and it should stay like that for as long as he plays no matter if he changes his name. Then when he disconnects reset the flags for the index.


All times are GMT -4. The time now is 17:14.

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