[How to] Check /rcon login
#1

I want to find out how to make a player's job admin (Job[playerid] = 1337 is the var for admin) auto when they /rcon login with right pass
Reply
#2

Код:
OnRconLoginAttempt(something)
{
if(succes == true)
{
Job[playerid] = 1337;
}
return 1;
}
I guess this will work
Reply
#3

It won't work, I thought the same but OnRconLoginAttempt doesn't give which playerid tried to login, only IP...
Reply
#4

mm, what about

OnPlayerRconAttempt(something)
{
if(succes == true)
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
SetTimerEx("RconAttemptTimer", 1000, false, "d", i);
}
}
return 1;
}

public RconAttemptTimer(playerid)
{
Job[playerid] = 1337;
}
Reply
#5

Werid, but testing, will tell result in a min
Reply
#6

Hmm... Worked but I think it makes everyone's job admin

Another replies?
Reply
#7

There isn't a playerid parameter/variable in the OnRconLogin thingy. You'd be best off looping through all players and compare all of their IP's.
Reply
#8

Look here & modify

http://forum.sa-mp.com/index.php?topic=179392.0
Reply
#9

If you just want to set "Job" - variable to 1337 for all RCON Admins, why not just do this?


pawn Код:
forward RCON();

SetTimer("RCON",2000,1);

public RCON()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerAdmin(i)) {
Job[i] = 1337;
}
}
}
Reply
#10

Quote:
Originally Posted by Jakku
If you just want to set "Job" - variable to 1337 for all RCON Admins, why not just do this?


pawn Код:
forward RCON();

SetTimer("RCON",2000,1);

public RCON()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
Job[i] = 1337;
}

}
You're forgetting something
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)