restricting spawning in certain maps AND certain ranks

Posts 112 of 12 · Page 1 of 1
restricting spawning in certain maps AND certain ranks
k so there was tut on restricting spawning in certain places, well, this is for certain ranks as well, so donors cant spawn in nexus for example, but staff can :P

lets use, well, nexus for example, and rank 5 (or below) as the ranks not allowed to spawn there

this goes in the spawn command btw (admincommands.cs)

Code:
            if (player.Owner.Name == "Nexus")
            {
                if (player.Client.Account.Rank <= 5)
                {
                    player.SendError("Not high enough rank to spawn in Nexus");
                    return false;
                }
you get the idea, if you want to change the ranks (or below) that can(t) spawn there, and the map.
map = case sensitive, just to be safe, havent tried any other way:P
another example just 2 be sure

Code:
            if (player.Owner.Name == "Vault")
            {
                if (player.Client.Account.Rank <= 8)
                {
                    player.SendError("Not high enough rank to spawn in Vault");
                    return false;
                }
anyone rank 8 or below, cannot spawn in their vault
get it?
good.

im using SD, any other source idk this should work or be some what very similar

creds: Kithio i think it was who was helping me with the player.Client.Account part thingy


edit: this ofc works for other commands as well
example: dont want donors using eff or addeff or whatever its called command in lets say wine cellar (so they cant just cheat and ruin pub wc's for others, if they wanna do that, they can spawn somewhere else, ex: t&s in sd)


just paste that in the god or eff command or whatever its called on the source ur using, and change map to (go to worlds to see wine cellar name, idk if it is WineCellar or Wine Cellar) and then make the desired ranks that cant use that command there and boom done and just change message to This command cannot be used in this map at your rank or whatever you want
To save some code and loading time you could just write

If (Player.Owner.Name == "Vault" && Player.Client.Account.Rank <= 8)

Anyways, good tut
Y just copy and paste a tutorial?
and add something like I did...
Quote Originally Posted by Organized Chaos View Post
Y just copy and paste a tutorial?
and add something like I did...
Yours was different
I was adding onto a previous tutorial lol, you just change a line in another tut and called it your own;P
Quote Originally Posted by Riigged View Post


Yours was different
I was adding onto a previous tutorial lol, you just change a line in another tut and called it your own;P
Lol I didn't even copy+paste anything
it was all completely different wording
Simple to do. If someone wanted people who can use godmode to not be able to do it in multiple worlds except the Vault, the code is ^ except it would be

if (player.Owner.Name != "Vault" && player.Client.Account.Rank => 8)
{
}
I believe this was originally my tutorial, I like how you added the rank tho good work
[FONT="Arial Narrow"]
Quote Originally Posted by retrorealm View Post
I believe this was originally my tutorial, I like how you added the rank tho good work
Quote Originally Posted by Riigged View Post
k so there was tut on restricting spawning in certain places, well, this is for certain ranks as well, so donors cant spawn in nexus for example, but staff can :P

..............Nobodyreadsdothey?
Nice tutorial, never seen for determined ranks. +1
Everything works perfectly on Fabiano's except that it allows you to spawn 1 at a time! You can't spawn multiple which is good. Any ideas?
Quote Originally Posted by B3CLAWED View Post
Everything works perfectly on Fabiano's except that it allows you to spawn 1 at a time! You can't spawn multiple which is good. Any ideas?
You can add multiple spawning in Fab and then just add another code that restricts the amount

e.g.

if (amount => 50 && player.Account.Rank <= 10)
{
player.SendError("You cannot spawn more than 50")
return false;
}
Quote Originally Posted by Ahl View Post
You can add multiple spawning in Fab and then just add another code that restricts the amount

e.g.

if (amount => 50 && player.Account.Rank <= 10)
{
player.SendError("You cannot spawn more than 50")
return false;
}
That's not what I meant. Sorry I explained it bad.
Posts 112 of 12 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?