The Come Up RP
Welcome Back
And enjoy ur return on The Come Up RP Forums!

Join the forum, it's quick and easy

The Come Up RP
Welcome Back
And enjoy ur return on The Come Up RP Forums!
The Come Up RP
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Moderator Rank

3 posters

Go down

Moderator Rank Empty Moderator Rank

Post by Martinerrr Sun Jan 03, 2010 4:54 pm

Okay, we got Assmod and i want to know if we can add like a rank to Assmod?
I want to change Temp Admin to Moderator but i have no clue how to do it...
So if anyone knows please?



Please
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Anita Sun Jan 03, 2010 5:42 pm

In the ass_shared.lua where you see this:
if (TIME) then return "Admin for " .. TIME else return "Temp Admin" end
change to return "Moderator";

And you also need to check out the ass_client.lua but i dont know what to do there... sorry
Making another group would be easier i think.


Last edited by Anita on Sun Jan 03, 2010 5:52 pm; edited 1 time in total

Anita
Newbie
Newbie

Posts : 15
Points : 18
Reputation : -1
Join date : 2009-12-31

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Sun Jan 03, 2010 5:45 pm

Thanks, alot.
I will try this out when i finished the Radio.
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by TheBlacklightX Sun Jan 03, 2010 7:22 pm

Anita do you know a bit of Lua or do you now alot of lua i need another person to help me doing my own RP gamemode if you want contact me.

Yeah i know martinerrr off topic Very Happy
TheBlacklightX
TheBlacklightX
Poster
Poster

Posts : 124
Points : 165
Reputation : 2
Join date : 2009-12-24
Age : 31
Location : Stuttgart - Germany

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by TheBlacklightX Thu Jan 07, 2010 1:03 am

Ok Martinerrr

What you also need to do is in the ass_shared.lua

You need to replace the code

Code:
ASS_LVL_SERVER_OWNER   = 0
ASS_LVL_SUPER_ADMIN   = 1
ASS_LVL_ADMIN      = 2
ASS_LVL_TEMPADMIN   = 3
ASS_LVL_RESPECTED   = 4
ASS_LVL_GUEST      = 5
ASS_LVL_BANNED      = 255

with this one

Code:
ASS_LVL_SERVER_OWNER   = 0
ASS_LVL_SUPER_ADMIN   = 1
ASS_LVL_ADMIN      = 2
ASS_LVL_TEMPADMIN   = 3
ASS_LVL_MODERATOR  = 4
ASS_LVL_RESPECTED   = 5
ASS_LVL_GUEST      = 6
ASS_LVL_BANNED      = 255

This have to be because we need to set the Moderator a Level so the Moderator is higher then a respected one but lower then tempadmins and above.

If this would not be coded a Moderator cannot kick Guests or Respected because it would say

This Player got a higher Access Level than you

You also have to replace the code

Code:
   local PLAYER = FindMetaTable("Player")
   function PLAYER:IsSuperAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_SUPER_ADMIN   end
   function PLAYER:IsAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_ADMIN      end
   function PLAYER:IsTempAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_TEMPADMIN   end
   function PLAYER:IsRespected()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_RESPECTED   end

with this one

Code:
   local PLAYER = FindMetaTable("Player")
   function PLAYER:IsSuperAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_SUPER_ADMIN   end
   function PLAYER:IsAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_ADMIN      end
   function PLAYER:IsTempAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_TEMPADMIN   end
      function PLAYER:IsModerator()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_MODERATOR   end
   function PLAYER:IsRespected()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_RESPECTED   end

And you need to add a line at the code part

Code:

function LevelToString( LEVEL, TIME )

   if (LEVEL <= ASS_LVL_SERVER_OWNER) then               return "Owner";
   elseif (LEVEL <= ASS_LVL_SUPER_ADMIN) then            return "Super Admin";
   elseif (LEVEL <= ASS_LVL_ADMIN) then               return "Admin";
   elseif (LEVEL <= ASS_LVL_TEMPADMIN) then            if (TIME) then return "Admin for " .. TIME else return "Temp Admin" end
   elseif (LEVEL <= ASS_LVL_RESPECTED) then            return "Respected"
   elseif (LEVEL >= ASS_LVL_GUEST && LEVEL < ASS_LVL_BANNED) then      return "Guest"
   else
      return "Banned";   
   end
end

between the line of the level TEMP ADMIN and LVL RESPECTED you got to add this code

Code:

      elseif (LEVEL <= ASS_LVL_MODERATOR) then            return "Moderator"

As far as i know lua this part is done well the ass_shared.lua is done with Moderator rank .

the ass_client.lua i will look later and maybe post the needed codes here

Anita check again this post and look for mistake only to make sure but i am sure that this lua part is fine.

Regards

Blacklight
TheBlacklightX
TheBlacklightX
Poster
Poster

Posts : 124
Points : 165
Reputation : 2
Join date : 2009-12-24
Age : 31
Location : Stuttgart - Germany

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Anita Thu Jan 07, 2010 4:29 pm

TheBlacklightX wrote:Anita do you know a bit of Lua or do you now alot of lua i need another person to help me doing my own RP gamemode if you want contact me.

Yeah i know martinerrr off topic Very Happy

Uhm idk because i have very little time for coding. But if you need help just contact me. My steam is czmate10

Anita
Newbie
Newbie

Posts : 15
Points : 18
Reputation : -1
Join date : 2009-12-31

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by TheBlacklightX Thu Jan 07, 2010 6:27 pm

well i got pacsteam so i can play gmod since i dont buyed it yet and i cannot chat with u as the cracked steam still thinks i didnt buy anything which is true so i cant add friends etc only to other pacsteam users and i can get invited and can be contacted


my steam ID is TheLightX
TheBlacklightX
TheBlacklightX
Poster
Poster

Posts : 124
Points : 165
Reputation : 2
Join date : 2009-12-24
Age : 31
Location : Stuttgart - Germany

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Anita Thu Jan 07, 2010 6:28 pm

i didnt buy either :/

Anita
Newbie
Newbie

Posts : 15
Points : 18
Reputation : -1
Join date : 2009-12-31

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Thu Jan 07, 2010 6:46 pm

TheBlacklightX wrote:well i got pacsteam so i can play gmod since i dont buyed it yet and i cannot chat with u as the cracked steam still thinks i didnt buy anything which is true so i cant add friends etc only to other pacsteam users and i can get invited and can be contacted


my steam ID is TheLightX
Get ZeroGear free and makes steam think you bought it.
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Thu Jan 07, 2010 6:47 pm

TheBlacklightX wrote:Ok Martinerrr

What you also need to do is in the ass_shared.lua

You need to replace the code

Code:
ASS_LVL_SERVER_OWNER   = 0
ASS_LVL_SUPER_ADMIN   = 1
ASS_LVL_ADMIN      = 2
ASS_LVL_TEMPADMIN   = 3
ASS_LVL_RESPECTED   = 4
ASS_LVL_GUEST      = 5
ASS_LVL_BANNED      = 255

with this one

Code:
ASS_LVL_SERVER_OWNER   = 0
ASS_LVL_SUPER_ADMIN   = 1
ASS_LVL_ADMIN      = 2
ASS_LVL_TEMPADMIN   = 3
ASS_LVL_MODERATOR  = 4
ASS_LVL_RESPECTED   = 5
ASS_LVL_GUEST      = 6
ASS_LVL_BANNED      = 255

This have to be because we need to set the Moderator a Level so the Moderator is higher then a respected one but lower then tempadmins and above.

If this would not be coded a Moderator cannot kick Guests or Respected because it would say

This Player got a higher Access Level than you

You also have to replace the code

Code:
   local PLAYER = FindMetaTable("Player")
   function PLAYER:IsSuperAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_SUPER_ADMIN   end
   function PLAYER:IsAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_ADMIN      end
   function PLAYER:IsTempAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_TEMPADMIN   end
   function PLAYER:IsRespected()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_RESPECTED   end

with this one

Code:
   local PLAYER = FindMetaTable("Player")
   function PLAYER:IsSuperAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_SUPER_ADMIN   end
   function PLAYER:IsAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_ADMIN      end
   function PLAYER:IsTempAdmin()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_TEMPADMIN   end
      function PLAYER:IsModerator()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_MODERATOR   end
   function PLAYER:IsRespected()   return self:GetNetworkedInt("ASS_isAdmin") <= ASS_LVL_RESPECTED   end

And you need to add a line at the code part

Code:

function LevelToString( LEVEL, TIME )

   if (LEVEL <= ASS_LVL_SERVER_OWNER) then               return "Owner";
   elseif (LEVEL <= ASS_LVL_SUPER_ADMIN) then            return "Super Admin";
   elseif (LEVEL <= ASS_LVL_ADMIN) then               return "Admin";
   elseif (LEVEL <= ASS_LVL_TEMPADMIN) then            if (TIME) then return "Admin for " .. TIME else return "Temp Admin" end
   elseif (LEVEL <= ASS_LVL_RESPECTED) then            return "Respected"
   elseif (LEVEL >= ASS_LVL_GUEST && LEVEL < ASS_LVL_BANNED) then      return "Guest"
   else
      return "Banned";   
   end
end

between the line of the level TEMP ADMIN and LVL RESPECTED you got to add this code

Code:

      elseif (LEVEL <= ASS_LVL_MODERATOR) then            return "Moderator"

As far as i know lua this part is done well the ass_shared.lua is done with Moderator rank .

the ass_client.lua i will look later and maybe post the needed codes here

Anita check again this post and look for mistake only to make sure but i am sure that this lua part is fine.

Regards

Blacklight
This is really great, but why dont u upload the file which u made?
Ass_Client.lua and Ass_Shared.lua both needs some codings and its not cool that i need to code so much lua's...
So please, can you make it?
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by TheBlacklightX Thu Jan 07, 2010 7:11 pm

OK

Download this file [You must be registered and logged in to see this link.]

Put it in the assmod/lua/ folder

NOTICE : Make a Backup of the current and orginal ass_shared.lua and rename it to whatever u want just rename it.

Then rename the downloaded file from ass_sharedmodifed.lua to ass_shared.lua

yes i know typing mistake xD in modifed nvm

the client i will try to look at now.


Regards

Blacklight
TheBlacklightX
TheBlacklightX
Poster
Poster

Posts : 124
Points : 165
Reputation : 2
Join date : 2009-12-24
Age : 31
Location : Stuttgart - Germany

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Thu Jan 07, 2010 7:23 pm

Nice, but.

ASS_LVL_DONATER = 5
ASS_LVL_RESPECTED = 5
This isn't what i ment with the same.
I ment respected and donater should have the same options.
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Thu Jan 07, 2010 7:26 pm

Yah, and i found some bugs already.
One definately*fixed*
One, may cause casualties*fixed*
And another with casualties*fixed*
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Thu Jan 07, 2010 7:29 pm

And Anita,
IncludeSharedFile("ass_plugins.lua")
IncludeSharedFile("ass_debug.lua")
IncludeSharedFile("ass_config.lua")

Anything of them needed?
Not right?
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by TheBlacklightX Thu Jan 07, 2010 7:40 pm

Oh and do the same stuff renaming etc. with this file the modified ass_client.lua

[You must be registered and logged in to see this link.]

Regards

Blacklight
TheBlacklightX
TheBlacklightX
Poster
Poster

Posts : 124
Points : 165
Reputation : 2
Join date : 2009-12-24
Age : 31
Location : Stuttgart - Germany

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Anita Thu Jan 07, 2010 8:10 pm

Martinerrr wrote:And Anita,
IncludeSharedFile("ass_plugins.lua")
IncludeSharedFile("ass_debug.lua")
IncludeSharedFile("ass_config.lua")

Anything of them needed?
Not right?

Hmm... I think you need them.

Anita
Newbie
Newbie

Posts : 15
Points : 18
Reputation : -1
Join date : 2009-12-31

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Thu Jan 07, 2010 10:43 pm

A Lazy Bastard wrote:Possible but i dont want to...
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Martinerrr Fri Jan 08, 2010 1:30 am

TheBlacklightX wrote:A Lazy Bastard is Martinerrr since he said he was too lazy and yeah you didnt do anything i coded it xDD lol adn anita answered an looked also some stuff at code.
----

TheBlackLightX wrote:you didnt do anything i coded it xDD
The Angry Lazy Bastard wrote:U didn't do shit! U just fucking copied the fucking respected to the fucking donater and what the Truck did you do with the ass_client.lau oh wait its not done?
Oh, boy... u made him angry.... Arrow FAIL
Martinerrr
Martinerrr
Original Poster
Original Poster

Posts : 204
Points : 728
Reputation : -2
Join date : 2009-12-23

https://tcurp.all-up.com

Back to top Go down

Moderator Rank Empty Re: Moderator Rank

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum