[How to] Check /rcon login - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [How to] Check /rcon login (
/showthread.php?tid=154371)
[How to] Check /rcon login -
Thrarod - 13.06.2010
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
Re: [How to] Check /rcon login -
Niixie - 13.06.2010
Код:
OnRconLoginAttempt(something)
{
if(succes == true)
{
Job[playerid] = 1337;
}
return 1;
}
I guess this will work
Re: [How to] Check /rcon login -
Thrarod - 13.06.2010
It won't work, I thought the same but OnRconLoginAttempt doesn't give which playerid tried to login, only IP...
Re: [How to] Check /rcon login -
Niixie - 13.06.2010
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;
}
Re: [How to] Check /rcon login -
Thrarod - 13.06.2010
Werid, but testing, will tell result in a min
Re: [How to] Check /rcon login -
Thrarod - 13.06.2010
Hmm... Worked but I think it makes everyone's job admin
Another replies?
Re: [How to] Check /rcon login -
Hiddos - 13.06.2010
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.
Re: [How to] Check /rcon login -
Jefff - 13.06.2010
Look here & modify
http://forum.sa-mp.com/index.php?topic=179392.0
Re: [How to] Check /rcon login -
Jakku - 13.06.2010
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;
}
}
}
Re: [How to] Check /rcon login -
Carlton - 13.06.2010
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