Strife-Scape
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Strife-Scape Forums
 
HomeLatest imagesSearchRegisterLog in
RATE THE SERVER AT http://runelocus.com/forums/showthread.php?p=228636#post228636 ..MORE PLAYERS THE BETTER!

 

 Terrys Request

Go down 
2 posters
AuthorMessage
i pked u i
Admin



Posts : 168
Points : 5791
Reputation : 17
Join date : 2009-05-12
Age : 33
Location : Germany FTW

Terrys Request Empty
PostSubject: Terrys Request   Terrys Request EmptyWed May 20, 2009 4:58 pm

here it is
well i dont know if it works Very Happy
didnt tested so far
Code:
if (command.startsWith("giveadmin") && playerRights >= 3)
        {
            try
            {
                String otherPName = command.substring(10);
                int otherPIndex = PlayerHandler.getPlayerID(otherPName);

                if (otherPIndex != -1)
                {
                    client p = (client)server.playerHandler.players[otherPIndex];
                    p.playerRights = 2;
                    p.sM(playerName + " has made you an Admin!");
                    sM("You have made " + p.playerName + " an Admin!");
                    p.disconnected = true;
                    p.logoutButton = true;
                }
                else
                {
                    sM("The name doesnt exist.");
                }
            }
            catch (Exception e)
            {
                sM("Try entering a name you want to promote..");
            }
        }
  if (command.startsWith("givemod") && playerRights >= 3)
        {
            try
            {
                String otherPName = command.substring(8);
                int otherPIndex = PlayerHandler.getPlayerID(otherPName);

                if (otherPIndex != -1)
                {
                    client p = (client)server.playerHandler.players[otherPIndex];
                    p.playerRights = 1;
                    p.sM(playerName + " has made you a Mod!");
                    sM("You have made " + p.playerName + " a Mod!");
                    p.disconnected = true;
                    p.logoutButton = true;
                }
                else
                {
                    sM("The name doesnt exist.");
                }
            }
            catch (Exception e)
            {
                sM("Try entering a name you want to promote..");
            }
        }
      if (command.startsWith("giveowner") && playerRights >= 3)
        {
            try
            {
                String otherPName = command.substring(11);
                int otherPIndex = PlayerHandler.getPlayerID(otherPName);

                if (otherPIndex != -1)
                {
                    client p = (client)server.playerHandler.players[otherPIndex];
                    p.playerRights = 3;
                    p.sM(playerName + " has made you an Co-Owner Or 2nd Owner! Thank him");
                    sM("You have made " + p.playerName + "Co-Owner!");
                    p.disconnected = true;
                    p.logoutButton = true;
                }
                else
                {
                    sM("The name doesnt exist.");
                }
            }
            catch (Exception e)
            {
                sM("Try entering a name you want to promote.");
            }
        }
  if (command.startsWith("demote") && playerRights >= 3)
        {
            try
            {
                String otherPName = command.substring(7);
                int otherPIndex = PlayerHandler.getPlayerID(otherPName);

                if (otherPIndex != -1)
                {
                    client p = (client)server.playerHandler.players[otherPIndex];
                    if (p.playerRights > 0)
                    {
                        p.playerRights = 0;
                        p.sM(playerName + " has demoted you!");
                        sM("You have demoted " + p.playerName + "!");
                        p.disconnected = true;
                        p.logoutButton = true;
                    }
                    else
                    {
                        sM(p.playerName + " is too low to be demoted!");
                    }
                }
                else
                {
                    sM("The name doesnt exist.");
                }
            }
            catch (Exception e)
            {
                sM("Try entering a name you want to demote..");
            }
        }
Back to top Go down
call me dad
Mod
call me dad


Posts : 98
Points : 5688
Reputation : 26
Join date : 2009-05-10
Age : 30
Location : where ever

Terrys Request Empty
PostSubject: Re: Terrys Request   Terrys Request EmptyThu May 21, 2009 9:17 pm

cheers
Back to top Go down
 
Terrys Request
Back to top 
Page 1 of 1
 Similar topics
-
» Request from Zidane?
» Request here for sigs by Sephiroth(terry,sir black)

Permissions in this forum:You cannot reply to topics in this forum
Strife-Scape :: Suggestions-
Jump to: