SA-MP Forums Archive
RconLoginAttempt - 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)
+--- Thread: RconLoginAttempt (/showthread.php?tid=552507)



RconLoginAttempt - vassilis - 24.12.2014

solved


Re: RconLoginAttempt - Abagail - 24.12.2014

You cannot find the exact playerID. This seems like something you'd want to take a look at:
https://sampforum.blast.hk/showthread.php?tid=491835


Re: RconLoginAttempt - Glossy42O - 24.12.2014

All the playerid try to convert/change to "i"


Re: RconLoginAttempt - SilentSoul - 24.12.2014

There is no parameter called "playerid" on this function, you can only detect the player who logged in by his ip as it is mentioned in the wiki. you should use this.
pawn Код:
if(success)
    {
        new pip[16];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
            {

                        TextDrawShowForPlayer(i,drawrcon0);
                        TextDrawShowForPlayer(i,drawrcon1);
                        TextDrawShowForPlayer(i,drawrcon2);
                        TextDrawShowForPlayer(i,drawrcon3);
                        TextDrawShowForPlayer(i,drawrcon4);
                        TextDrawShowForPlayer(i,drawrcon5);
                        TextDrawShowForPlayer(i,drawrcon6);
                        TextDrawShowForPlayer(i,drawrcon7);
                        TextDrawShowForPlayer(i,drawrcon8);
                        TextDrawShowForPlayer(i,drawrcon9);
                        TextDrawShowForPlayer(i,drawrcon10);
                        TextDrawShowForPlayer(i,drawrcon11);
                        TextDrawShowForPlayer(i,drawrcon14);
                        TextDrawShowForPlayer(i,drawrcon15);
                        SelectTextDraw(i,COLOR_RED);
              }
        }
    }



Re: RconLoginAttempt - vassilis - 24.12.2014

Aha so i get the ip of the player to show him the textdraw right?


Re: RconLoginAttempt - SilentSoul - 24.12.2014

Yes, try the code i wrote above, it should work fine.


Re: RconLoginAttempt - vassilis - 24.12.2014

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
Yes, try the code i wrote above, it should work fine.
It works..Thanks fellah!(friend)


Re: RconLoginAttempt - Abagail - 24.12.2014

I would highly de-recommend using that method. What if there are multiple people on the same IP playing? Then this will show to allow of them.

That's why I recommened that he sees this:
https://sampforum.blast.hk/showthread.php?tid=491835

As it gets the EXACT playerid that logged in.