SA-MP Forums Archive
How can i Make an IP Log ? for my server - 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 can i Make an IP Log ? for my server (/showthread.php?tid=77295)



How can i Make an IP Log ? for my server - will_92 - 10.05.2009

O.k i want everyone to know who signed in into my server so for example:
will_92 has joined
Bravo has joined the server

....
Someting like that and that shows on the chat box or like somewhere where you can see?? and also if they like log out. such as

will_92 has Left
Bravo has left the server
,,,
you get what i am saying right ??
what would be the script forthat


Re: How can i Make an IP Log ? for my server - gpclan - 10.05.2009


person joining

public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the server.", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}


person leaving

public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME], string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pName);
case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pName);
case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pName);
}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}



Re: How can i Make an IP Log ? for my server - will_92 - 10.05.2009


Not working



C:\Documents and Settings\Owner\Desktop\SAMP\pawno\include\utils.in c(1) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(76) : error 001: expected token: ";", but found "forward"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(234 ) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(304 ) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(305 ) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(311 ) : error 021: symbol already defined: "SetWeather"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(314 ) : error 021: symbol already defined: "GetPlayerName"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(316 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(320 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(322 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(329 ) : error 021: symbol already defined: "GetPlayerName"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(333 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(344 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(349 ) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(349 ) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(353 ) : error 001: expected token: "{", but found "case"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(357 ) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(357 ) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(358 ) : error 079: inconsistent return types (array & non-array)


Re: How can i Make an IP Log ? for my server - gpclan - 10.05.2009

erase ur whole section of

OnPlayerConnect and add this

public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the server.", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}



and do same in OnPlayerDissconnect

public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME], string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pName);
case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pName);
case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pName);
}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}





u a beginer scirpter?


Re: How can i Make an IP Log ? for my server - gpclan - 10.05.2009

here a pastebin code

http://pastebin.com/m6252986e


Re: How can i Make an IP Log ? for my server - will_92 - 10.05.2009

still not working.....
are you sure that script wrk ,, because it's not working on mine , maybe if you told me the instruction more clearly i'd maybe b wron g WHO KNOWs


Re: How can i Make an IP Log ? for my server - gpclan - 10.05.2009

on my works

want me to make u a software like make a joing leaving command

)


Re: How can i Make an IP Log ? for my server - will_92 - 10.05.2009

sure .,,, and also do you know how to make like vans a checkpoint for players to go and if they get it they win and the gamemode restards?


Re: How can i Make an IP Log ? for my server - JoeDaDude - 10.05.2009

( i aint read any another post except his first )
But search! theres a tutorial on how to do this at wiki.sa-mp.com