SA-MP Forums Archive
[REQUEST] Telling the admins when the players logs in - 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: [REQUEST] Telling the admins when the players logs in (/showthread.php?tid=377037)



[REQUEST] Telling the admins when the players logs in - Stanford - 12.09.2012

Hello, I just want a script that tells the admins when the player logs in, and also it ip when he logs in..


Thanks, Help me and get a reputation


Re: [REQUEST] Telling the admins when the players logs in - [FAT]Klabauter[LST] - 13.09.2012

just add this to your /login command or if you want it to show when a player joins put it under OnPlayerConnect.

Код:
new pip[128], str[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerIp(playerid,pip,128);
format(str, sizeof(str), "%s has logged in, IP: %s", pname, pip);
for(new i = 0; i <MAX_PLAYERS; i++)
if(padmin[i] > 0) //or however you check for your admin level
{
    SendClientMessage(i,0xA500FFC5,str);
}



Re: [REQUEST] Telling the admins when the players logs in - Stanford - 13.09.2012

You were +REP'ed I guess lol


Re: [REQUEST] Telling the admins when the players logs in - Stanford - 13.09.2012

But wait, some errors showed up:

Quote:

C:\Users\TSC\Desktop\FIXED\UPGRADED AND FIXED\gamemodes\NE-RP.pwn(18250) : error 028: invalid subscript (not an array or too many subscripts): "pAdmin"
C:\Users\TSC\Desktop\FIXED\UPGRADED AND FIXED\gamemodes\NE-RP.pwn(18250) : warning 215: expression has no effect
C:\Users\TSC\Desktop\FIXED\UPGRADED AND FIXED\gamemodes\NE-RP.pwn(18250) : error 001: expected token: ";", but found "]"
C:\Users\TSC\Desktop\FIXED\UPGRADED AND FIXED\gamemodes\NE-RP.pwn(18250) : error 029: invalid expression, assumed zero
C:\Users\TSC\Desktop\FIXED\UPGRADED AND FIXED\gamemodes\NE-RP.pwn(18250) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.




Re: [REQUEST] Telling the admins when the players logs in - yLuSsSIoN - 13.09.2012

Show us the line 18249-18251


Re: [REQUEST] Telling the admins when the players logs in - Stanford - 13.09.2012

Quote:

GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "%s.ini", plname);
if(fexist(string))
{
gPlayerAccount[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "Welcome Back to {00FFEE}Next Evolution RP {F3FF02}- Login and Enjoy your Stay.");
return 1;
}
else
{

Here u go


Re: [REQUEST] Telling the admins when the players logs in - [FAT]Klabauter[LST] - 14.09.2012

Quote:
Originally Posted by Edmund_Kavel
Посмотреть сообщение
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "%s.ini", plname);
if(fexist(string))
{
gPlayerAccount[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "Welcome Back to {00FFEE}Next Evolution RP {F3FF02}- Login and Enjoy your Stay.");
return 1;
}
else
{

Here u go
looks like these lines have nothing to do with the errors you got or with the code i sent you ??
can you send the correct lines?


Re: [REQUEST] Telling the admins when the players logs in - Slaykler - 14.09.2012

All you have to do, is send a Prox detector Message to pAdmin= 'Level', Its very simple


Re: [REQUEST] Telling the admins when the players logs in - Stanford - 16.09.2012

How to do it then please help


Re: [REQUEST] Telling the admins when the players logs in - Danyal - 16.09.2012

Quote:
Originally Posted by Edmund_Kavel
Посмотреть сообщение
How to do it then please help
Pm'ed You....

Check It...