HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Can New Ranks Have Admin Powers?

View previous topic View next topic Go down 
AuthorMessage
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 67
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Can New Ranks Have Admin Powers?   Tue Jan 12, 2016 1:53 am

I have created new ranks for my game such as Sentinel, beta, and Gamma. I was curious if it was possible to make them have admin powers. I know it's probably easier to just give them the Admin powers using 'okay' I just want the names to be displayed in the chat like (Admin)Furrest: text here usually shows in the chatterbox in i think general. I have regular mods too so it's not like I was going to give each rank admin powers it's mostly because I have co-server master, co-forum master, and GMod.

Thank you for helping me out if you do!
Back to top Go down
http://mythical-realms.freeforums.net
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 67
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Re: Can New Ranks Have Admin Powers?   Thu Jan 21, 2016 6:25 pm

bump
Back to top Go down
http://mythical-realms.freeforums.net
Delete me.
Coder
Coder


Male Posts : 353
Join date : 2011-07-25
Age : 22

PostSubject: Re: Can New Ranks Have Admin Powers?   Thu Jan 21, 2016 10:47 pm

Pretty much just look for conditional statements involving isAdmin, like these in MagixGUI.cpp:
Code:
else if (tParam == COMMAND_KICK && (mDef->isAdmin || mDef->isMod))mNetworkManager->sendKick(tCaption);
 else if (tParam == COMMAND_ROLL)doRoll(tCaption);
 else if (tParam == COMMAND_CREATEITEM && mDef->isAdmin)checkItemEquippable(tCaption, true, true);
 else if (tParam == COMMAND_SPAWNITEM && (mDef->isAdmin))checkItemEquippable(tCaption, true, true, true);
 else if (tParam == COMMAND_GODSPEAK && mDef->isAdmin)mNetworkManager->sendGodSpeak(tCaption);
add another set of () to group them, and after mDef->isAdmin, add || to separate them, and mDef->isBeta, or whatever it is you set the other ranks to.
Ex:
Code:
else if (tParam == COMMAND_CREATEITEM && (mDef->isAdmin || mDef->isBeta))checkItemEquippable(tCaption, true, true);
Back to top Go down
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 67
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Re: Can New Ranks Have Admin Powers?   Thu Jan 21, 2016 11:01 pm

xRubyx wrote:
Pretty much just look for conditional statements involving isAdmin, like these in MagixGUI.cpp:
Code:
else if (tParam == COMMAND_KICK && (mDef->isAdmin || mDef->isMod))mNetworkManager->sendKick(tCaption);
 else if (tParam == COMMAND_ROLL)doRoll(tCaption);
 else if (tParam == COMMAND_CREATEITEM && mDef->isAdmin)checkItemEquippable(tCaption, true, true);
 else if (tParam == COMMAND_SPAWNITEM && (mDef->isAdmin))checkItemEquippable(tCaption, true, true, true);
 else if (tParam == COMMAND_GODSPEAK && mDef->isAdmin)mNetworkManager->sendGodSpeak(tCaption);
add another set of () to group them, and after mDef->isAdmin, add || to separate them, and mDef->isBeta, or whatever it is you set the other ranks to.
Ex:
Code:
else if (tParam == COMMAND_CREATEITEM && (mDef->isAdmin || mDef->isBeta))checkItemEquippable(tCaption, true, true);

Oh I see,thank you Ruby I really appreciate it! Sorry I have one more question, but how would I add in a new aura to this rank.
Back to top Go down
http://mythical-realms.freeforums.net
Delete me.
Coder
Coder


Male Posts : 353
Join date : 2011-07-25
Age : 22

PostSubject: Re: Can New Ranks Have Admin Powers?   Fri Jan 22, 2016 1:17 am

That's a very long process, but you should be able to figure it out by searching around for things like "createAdminAura" and "adminAuraColour" and "Aureola" as well as finding:
Code:
if (tUnit->isAdmin)
 {
 tAddMessage = " (" USER_ADMIN_TEXT ")";
 tUnit->isHidden = false;
 tUnit->isBlocked = false;
 char tAdminColour[16];
 stringCompressor->DecodeString(tAdminColour, 16, &tBitStream);
 mUnitManager->createAdminAura(tUnit, StringConverter::parseColourValue(String(tAdminColour)));
 }
and just adjusting all the attributes to match the new rank.
Except your new rank doesn't have admin text, so delete that line.
Pretty much just keep searching for keywords that have to do with the admin aura, and create a matching code for the new rank.
But certain things, like ADMIN_TEXT should not be applied to new ranks if they are not administrators.
Back to top Go down
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 67
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Re: Can New Ranks Have Admin Powers?   Fri Jan 22, 2016 1:35 am

xRubyx wrote:
That's a very long process, but you should be able to figure it out by searching around for things like "createAdminAura" and "adminAuraColour" and "Aureola" as well as finding:
Code:
if (tUnit->isAdmin)
 {
 tAddMessage = " (" USER_ADMIN_TEXT ")";
 tUnit->isHidden = false;
 tUnit->isBlocked = false;
 char tAdminColour[16];
 stringCompressor->DecodeString(tAdminColour, 16, &tBitStream);
 mUnitManager->createAdminAura(tUnit, StringConverter::parseColourValue(String(tAdminColour)));
 }
and just adjusting all the attributes to match the new rank.
Except your new rank doesn't have admin text, so delete that line.
Pretty much just keep searching for keywords that have to do with the admin aura, and create a matching code for the new rank.
But certain things, like ADMIN_TEXT should not be applied to new ranks if they are not administrators.

Ruby did I do this correctly? thanks for all your help, and I think I get how I can actually add the auras in.

Code:
else if (tParam == COMMAND_KICK && (mDef->isAdmin || mDef->isSentinel))mNetworkManager->sendKick(tCaption);
                else if (tParam) == COMMAND_CREATEITEM && (mDef->isAdmin) | | mDef->isSentinel))checkItemEquippable(tCaption, true, true);
                else if (tParam) == COMMAND_SPAWNITEM && (mDef->Admin) | | mDef->isSentinel))checkItemEquippable(tCaption), true, true, true);
                else if (tParam) == COMMAND_GODSPEAK && (mDef->Admin) | | mDef->isSentinel))mNetworkManager->sendGodSpeak(tCaption);
                else if (tParam) == COMMAND_KICK && (mDef->Admin) | | mDef->isBeta))mNetworkManager->sendKick(tCaption);
                else if (tParam) == COMMAND_CREATEITEM && (mDef->isAdmin) | | mDef->Beta))checkItemEquippable(tCaption, true, true);
                else if (tParam) == COMMAND_SPAWNITEM && (mDef->isAdmin) | | mDef->Beta))checkItemEquippable(tCaption, true, true, true);
                else if (tParam) -- COMMAND_GODSPEAK && (mDef->Admin) | | mDef->Beta))mNetWorkManager->sendGodSpeak(tCaption);
Back to top Go down
http://mythical-realms.freeforums.net
Delete me.
Coder
Coder


Male Posts : 353
Join date : 2011-07-25
Age : 22

PostSubject: Re: Can New Ranks Have Admin Powers?   Fri Jan 22, 2016 2:06 am

Code:
                else if (tParam) == COMMAND_CREATEITEM && (mDef->isAdmin) | | mDef->isSentinel))checkItemEquippable(tCaption, true, true);
to
Code:
               else if (tParam == COMMAND_CREATEITEM && (mDef->isAdmin || mDef->isSentinel))checkItemEquippable(tCaption, true, true);
don't need to space out the ||, and don't add a ) after mDef->isAdmin, or the tParam, otherwise the program thinks the expression is complete, when it's not.
You're trying to tell it that if the target is an Admin OR (||) Sentinel, then something happens.
That's why the isAdmin OR isSentinel need to be grouped with (), and then the whole expression outside of that is grouped as well.

You'll need to fix your other lines like that as well.
Otherwise that would be right, but I'd suggest not giving another rank the ability to godspeak, because as is, it will say they're an admin.

Changing godspeak to recognise ranks is a whoooole different thing. xD
Back to top Go down
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 67
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Re: Can New Ranks Have Admin Powers?   Fri Jan 22, 2016 3:49 am

xRubyx wrote:
Code:
                else if (tParam) == COMMAND_CREATEITEM && (mDef->isAdmin) | | mDef->isSentinel))checkItemEquippable(tCaption, true, true);
to
Code:
               else if (tParam == COMMAND_CREATEITEM && (mDef->isAdmin || mDef->isSentinel))checkItemEquippable(tCaption, true, true);
don't need to space out the ||, and don't add a ) after mDef->isAdmin, or the tParam, otherwise the program thinks the expression is complete, when it's not.
You're trying to tell it that if the target is an Admin OR (||) Sentinel, then something happens.
That's why the isAdmin OR isSentinel need to be grouped with (), and then the whole expression outside of that is grouped as well.

You'll need to fix your other lines like that as well.
Otherwise that would be right, but I'd suggest not giving another rank the ability to godspeak, because as is, it will say they're an admin.

Changing godspeak to recognise ranks is a whoooole different thing. xD

Oh my bad. thanks Ruby!
Back to top Go down
http://mythical-realms.freeforums.net
Sponsored content




PostSubject: Re: Can New Ranks Have Admin Powers?   

Back to top Go down
 
Can New Ranks Have Admin Powers?
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support :: Solved Support Issues-
Jump to: