Huge problem
#1

Hello, I have a big problem

If someone goes on a persons account who has an admin level, and doesn't login, they can use admin commands. I'm using dini, what can I put on OnPlayerConnect to disable this from happening?
Reply
#2

Do something like:

pawn Код:
if(Loggedin[playerid] == 0)
{
  SendCleintMessage(playerid, COLOUR, "LOG THE **** IN!");
  Adminlevel[playerid] = 0;
}
Change Loggedin to your variable which checks if they are logged in, and change Adminlevel to the admin variable.
Reply
#3

Quote:
Originally Posted by [HiC
TheKiller ]
Do something like:

pawn Код:
if(Loggedin[playerid] == 0)
{
  SendCleintMessage(playerid, COLOUR, "LOG THE **** IN!");
  Adminlevel[playerid] = 0;
}
Change Loggedin to your variable which checks if they are logged in, and change Adminlevel to the admin variable.
Where would I put this?
Reply
#4

If you are using a dini saving system, you must have a loader, and a saver.

You put the loader when player logs in, it will give all stuff to him.
And the saver when player disconnects.

Show us your dini saving system, if you need help i can give you mine
Reply
#5

Quote:
Originally Posted by [B
Vortex ]
Quote:
Originally Posted by [HiC
TheKiller ]
Do something like:

pawn Код:
if(Loggedin[playerid] == 0)
{
  SendCleintMessage(playerid, COLOUR, "LOG THE **** IN!");
  Adminlevel[playerid] = 0;
}
Change Loggedin to your variable which checks if they are logged in, and change Adminlevel to the admin variable.
Where would I put this?
You could really put that anywhere. A better way would probably be to give the admin level after they login, not when they connect.
Reply
#6

Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by [B
Vortex ]
Quote:
Originally Posted by [HiC
TheKiller ]
Do something like:

pawn Код:
if(Loggedin[playerid] == 0)
{
  SendCleintMessage(playerid, COLOUR, "LOG THE **** IN!");
  Adminlevel[playerid] = 0;
}
Change Loggedin to your variable which checks if they are logged in, and change Adminlevel to the admin variable.
Where would I put this?
You could really put that anywhere. A better way would probably be to give the admin level after they login, not when they connect.
I've tried to put pInfo[playerid][Level] = 0 on onplayerconnect, but that just sets their level to 0, making it so if the real admin connects and logs in, they're level is gone.
Reply
#7

Quote:
Originally Posted by [B
Vortex ]
Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by [B
Vortex ]
Quote:
Originally Posted by [HiC
TheKiller ]
Do something like:

pawn Код:
if(Loggedin[playerid] == 0)
{
  SendCleintMessage(playerid, COLOUR, "LOG THE **** IN!");
  Adminlevel[playerid] = 0;
}
I've tried to put pInfo[playerid][Level] = 0 on onplayerconnect, but that just sets their level to 0, making it so if the real admin connects and logs in, they're level is gone.

Change Loggedin to your variable which checks if they are logged in, and change Adminlevel to the admin variable.
Where would I put this?
You could really put that anywhere. A better way would probably be to give the admin level after they login, not when they connect.
What about it? If you want to know where to post the code, the best place would be OnPlayerSpawn and disable admin commands before spawn.
Reply
#8

Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by [B
Vortex ]
Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by [B
Vortex ]
Quote:
Originally Posted by [HiC
TheKiller ]
Do something like:

pawn Код:
if(Loggedin[playerid] == 0)
{
  SendCleintMessage(playerid, COLOUR, "LOG THE **** IN!");
  Adminlevel[playerid] = 0;
}
I've tried to put pInfo[playerid][Level] = 0 on onplayerconnect, but that just sets their level to 0, making it so if the real admin connects and logs in, they're level is gone.

Change Loggedin to your variable which checks if they are logged in, and change Adminlevel to the admin variable.
Where would I put this?
You could really put that anywhere. A better way would probably be to give the admin level after they login, not when they connect.
What about it? If you want to know where to post the code, the best place would be OnPlayerSpawn and disable admin commands before spawn.
Oh sorry, I posted my reply witin your quote.

I've tried to put pInfo[playerid][Level] = 0 on onplayerconnect, but that just sets their level to 0, making it so if the real admin connects and logs in, they're level is gone.
Reply
#9

Give them there level when they login. When they use the /login command and it is successful then pInfo[playerid][Level] = 5 or whatever their admin level is.
Reply
#10

Quote:
Originally Posted by [HiC
TheKiller ]
Give them there level when they login. When they use the /login command and it is successful then pInfo[playerid][Level] = 5 or whatever their admin level is.
Yes but the level still needs to be saved somewhere.. So I cant just set their level to whatever, it needs to be the level i assign to them.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)