GTA-Expert Forum: Visualizzare gli ip dei giocatori connessi - GTA-Expert Forum

Salta al contenuto

  • (2 Pagine)
  • +
  • 1
  • 2
  • Non puoi iniziare una nuova discussione
  • Questa discussione e' chiusa

Visualizzare gli ip dei giocatori connessi

#1 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 04 marzo 2009 - 13:34

mi potete speigare come posso visuallizzare l'ip dei player ke entrano nel mio server??
0

#2 L'utente è offline   OxiDe 

  • Sicario
  • Gruppo: Utenti
  • Messaggi: 2515
  • Iscritto il: 03/01/08
  • Provenienza:Imola
  • GTA Preferito:GTA: San Andreas

Inviato il 04 marzo 2009 - 13:56

public OnPlayerConnect(playerid)
{
	for (new i=0; i<MAX_PLAYERS; i++)
	{
 if(IsPlayerAdmin(i))
 {
   new ip[256];
 	GetPlayerIp(playerid,ip, sizeof(ip));
   GetPlayerName(playerid,name1,sizeof(name1));
 	format(string1,sizeof(string1),"%s (ID: %d) è entrato nel server. IP: %s",name1,playerid,ip);
 	SendClientMessage(i,COLOR_RED,string1);
 	return 1;
 }
 else
 {
 	GetPlayerName(playerid,name1,sizeof(name1));
 	format(string1,sizeof(string1),"%s è entrato nel server",name1);
 	SendClientMessageToAll(COLOR_RED,string1);
 	return 1;
 }
	}
return 0;
}

0

#3 L'utente è offline   g.tommys 

  • Criminale
  • Gruppo: Utenti
  • Messaggi: 833
  • Iscritto il: 19/10/08

Inviato il 04 marzo 2009 - 14:12

Se vuoi fare che quando un gicoatore entra ed esce (nome del player)è entrato nel server,uscito ecc.. devi fare come ha detto OxiDe
Se invece vuoi sapere l'id devi clicchare TAB(le due freccette sopra il tasto lock[della tastiera]).
Immagine Postata
0

#4 L'utente è offline   xcarminex 

  • Cleptomane
  • Gruppo: Utenti
  • Messaggi: 133
  • Iscritto il: 21/02/09

Inviato il 04 marzo 2009 - 14:55

Quote

Originally posted by g.tommys@04/03/09 - 14:09
Se vuoi fare che quando un gicoatore entra ed esce (nome del player)è entrato nel server,uscito ecc.. devi fare come ha detto OxiDe
Se invece vuoi sapere l'id devi clicchare TAB(le due freccette sopra il tasto lock[della tastiera]).

e se volessi visualizzare l'id davanti al nick in chat come devo fare ?? :ahsese:
Firma cancellata perchè fuori norma, leggi il regolamento. Il codice precedente è stato inviato per Messaggio Privato.
0

#5 L'utente è offline   SoeH 

  • Teppista
  • Gruppo: Utenti
  • Messaggi: 254
  • Iscritto il: 30/11/08

Inviato il 04 marzo 2009 - 15:04

Quote

Originally posted by xcarminex+04/03/09 - 14:52

Quote

(xcarminex @ 04/03/09 - 14:52)
-g.tommys
@04/03/09 - 14:09
Se vuoi fare che quando un gicoatore entra ed esce (nome del player)è entrato nel server,uscito ecc.. devi fare come ha detto OxiDe
Se invece vuoi sapere l'id devi clicchare TAB(le due freccette sopra il tasto lock[della tastiera]).

e se volessi visualizzare l'id davanti al nick in chat come devo fare ?? :ahsese: [/b]

E se volessi copiare il server RS come faccio?
Firma cancellata perchè fuori norma, leggi il regolamento. Il codice precedente è stato inviato per Messaggio Privato.
0

#6 L'utente è offline   OxiDe 

  • Sicario
  • Gruppo: Utenti
  • Messaggi: 2515
  • Iscritto il: 03/01/08
  • Provenienza:Imola
  • GTA Preferito:GTA: San Andreas

Inviato il 04 marzo 2009 - 15:07

Quote

Originally posted by xcarminex+04/03/09 - 14:52

Quote

(xcarminex @ 04/03/09 - 14:52)
-g.tommys
@04/03/09 - 14:09
Se vuoi fare che quando un gicoatore entra ed esce (nome del player)è entrato nel server,uscito ecc.. devi fare come ha detto OxiDe
Se invece vuoi sapere l'id devi clicchare TAB(le due freccette sopra il tasto lock[della tastiera]).

e se volessi visualizzare l'id davanti al nick in chat come devo fare ?? :ahsese: [/b]

ProxDetector credo, prova a vedere nella PEN
0

#7 L'utente è offline   SoeH 

  • Teppista
  • Gruppo: Utenti
  • Messaggi: 254
  • Iscritto il: 30/11/08

Inviato il 04 marzo 2009 - 15:14

Quote

Originally posted by OxiDe+04/03/09 - 15:04

Quote

(OxiDe @ 04/03/09 - 15:04)

Quote

Originally posted by xcarminex@04/03/09 - 14:52
-g.tommys
@04/03/09 - 14:09
Se vuoi fare che quando un gicoatore entra ed esce (nome del player)è entrato nel server,uscito ecc.. devi fare come ha detto OxiDe
Se invece vuoi sapere l'id devi clicchare TAB(le due freccette sopra il tasto lock[della tastiera]).

e se volessi visualizzare l'id davanti al nick in chat come devo fare ?? :ahsese:

ProxDetector credo, prova a vedere nella PEN [/b]

Quello serve per fare la real chat... Per fare quello che dice lui basta cambiare il nick nell'OnPlayerText e poi rimetterlo bene subito dopo...
Firma cancellata perchè fuori norma, leggi il regolamento. Il codice precedente è stato inviato per Messaggio Privato.
0

#8 L'utente è offline   OxiDe 

  • Sicario
  • Gruppo: Utenti
  • Messaggi: 2515
  • Iscritto il: 03/01/08
  • Provenienza:Imola
  • GTA Preferito:GTA: San Andreas

Inviato il 04 marzo 2009 - 16:54

Mi sembra sia anche usato per il /local, ora non ricordo bene non avendola mai usata.
Comunque fai come ha detto Soeh :ahsisi:
0

#9 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 04 marzo 2009 - 17:28

ì(2419) : error 029: invalid expression, assumed zero
ì(2420) : error 001: expected token: ";", but found "{"
ì(2427) : error 017: undefined symbol "name1"
ì(2427) : error 017: undefined symbol "name1"
ì(2427) : error 029: invalid expression, assumed zero
ì(2427) : fatal error 107: too many error messages on one line

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

#10 L'utente è offline   xcarminex 

  • Cleptomane
  • Gruppo: Utenti
  • Messaggi: 133
  • Iscritto il: 21/02/09

Inviato il 04 marzo 2009 - 17:31

Quote

Originally posted by SoeH+04/03/09 - 15:01

Quote

(SoeH @ 04/03/09 - 15:01)

Quote

Originally posted by xcarminex@04/03/09 - 14:52
-g.tommys
@04/03/09 - 14:09
Se vuoi fare che quando un gicoatore entra ed esce (nome del player)è entrato nel server,uscito ecc.. devi fare come ha detto OxiDe
Se invece vuoi sapere l'id devi clicchare TAB(le due freccette sopra il tasto lock[della tastiera]).

e se volessi visualizzare l'id davanti al nick in chat come devo fare ?? :ahsese:

E se volessi copiare il server RS come faccio? [/b]

non voglio copiare ti giuro e solo ke avendo l'id davanti al nick e molto utile per kickare molto piu infretta
Firma cancellata perchè fuori norma, leggi il regolamento. Il codice precedente è stato inviato per Messaggio Privato.
0

#11 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 04 marzo 2009 - 17:32

Quote

Originally posted by g.tommys@04/03/09 - 14:09
Se vuoi fare che quando un gicoatore entra ed esce (nome del player)è entrato nel server,uscito ecc.. devi fare come ha detto OxiDe
Se invece vuoi sapere l'id devi clicchare TAB(le due freccette sopra il tasto lock[della tastiera]).

voglio sapere l'ip con un comando... x esempio /ip id

Immagine Postata
0

#12 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 10 marzo 2009 - 20:50

Immagine Postata

sono passati 2 giorni...

c'è qualcuno ke puo aiutarmi??????????????????????????? :gh:
0

#13 L'utente è offline   Fabio206 

  • Padrino
  • Gruppo: Admin
  • Messaggi: 72430
  • Iscritto il: 05/12/05
  • GTA Preferito:GTA III

Inviato il 10 marzo 2009 - 20:51

Non mettere una gif a ogni messaggio grazie.
0

#14 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 10 marzo 2009 - 20:53

Quote

Originally posted by Fabio206@10/03/09 - 20:48
Non mettere una gif a ogni messaggio grazie.

ok ;)
0

#15 L'utente è offline   OxiDe 

  • Sicario
  • Gruppo: Utenti
  • Messaggi: 2515
  • Iscritto il: 03/01/08
  • Provenienza:Imola
  • GTA Preferito:GTA: San Andreas

Inviato il 10 marzo 2009 - 21:06

Prendendo spunto dallo script di skia

if(strcmp(cmd,"/ip",true) == 0) {
if(IsPlayerAdmin(playerid) == 1) {
new playername[MAX_PLAYER_NAME];
new pid,ip[24],name[256];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Utilizzo: /ip [playerid]");
return 1;
}
pid = strval(tmp);
if(!IsPlayerConnected(pid)) {
SendClientMessage(playerid,COLOR_RED,"Questo giocatore non e' connesso");
return 1;
}
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(pid,playername,sizeof(playername));
GetPlayerIp(pid,ip,sizeof(ip));
format(string,sizeof(string),"IP %s : %s.",playername,ip);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
} else {
SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");
}
}

0

#16 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 10 marzo 2009 - 22:22

Quote

Originally posted by OxiDe@10/03/09 - 21:03
Prendendo spunto dallo script di skia

if(strcmp(cmd,"/ip",true) == 0) {
if(IsPlayerAdmin(playerid) == 1) {
new playername[MAX_PLAYER_NAME];
new pid,ip[24],name[256];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Utilizzo: /ip [playerid]");
return 1;
}
pid = strval(tmp);
if(!IsPlayerConnected(pid)) {
SendClientMessage(playerid,COLOR_RED,"Questo giocatore non e' connesso");
return 1;
}
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(pid,playername,sizeof(playername));
GetPlayerIp(pid,ip,sizeof(ip));
format(string,sizeof(string),"IP %s : %s.",playername,ip);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
} else {
SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");
}
}

error 017: undefined symbol "cmd"
error 017: undefined symbol "tmp"
error 017: undefined symbol "idx"
error 017: undefined symbol "tmp"
error 017: undefined symbol "tmp"
error 017: undefined symbol "string"
error 017: undefined symbol "string"
error 029: invalid expression, assumed zero
E:\Server\gamemodes\penlstlk.pwn(8755) : fatal error 107: too many error messages on one line

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


9 Errors.


devo mettere

  new string[256]; 


dove?

al posto di cmd metto cmdtext?
0

#17 L'utente è offline   OxiDe 

  • Sicario
  • Gruppo: Utenti
  • Messaggi: 2515
  • Iscritto il: 03/01/08
  • Provenienza:Imola
  • GTA Preferito:GTA: San Andreas

Inviato il 10 marzo 2009 - 22:57

public OnPlayerCommandText(playerid, cmdtext[])//help
{
new string[256];
new cmd[256];
new idx;
new tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/ip",true) == 0) {
if(IsPlayerAdmin(playerid) == 1) {
new playername[MAX_PLAYER_NAME];
new pid,ip[24],name[256];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Utilizzo: /ip [playerid]");
return 1;
}
pid = strval(tmp);
if(!IsPlayerConnected(pid)) {
SendClientMessage(playerid,COLOR_RED,"Questo giocatore non e' connesso");
return 1;
}
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(pid,playername,sizeof(playername));
GetPlayerIp(pid,ip,sizeof(ip));
format(string,sizeof(string),"IP %s : %s.",playername,ip);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
} else {
SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");
}
}
return 0;
}

0

#18 L'utente è offline   xcarminex 

  • Cleptomane
  • Gruppo: Utenti
  • Messaggi: 133
  • Iscritto il: 21/02/09

Inviato il 13 marzo 2009 - 09:50

//------------------------------------[IP]----------------------------------------------
if(strcmp("/ip", cmd, true) == 0)
{
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USA: /ip [id] ");
if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_RED, "questo player non è connesso");
cmdid = strval(tmp);

SendClientMessage(playerid, COLOR_GREEN, "IP");
new ip[20];
GetPlayerIp(cmdid, ip, sizeof(ip));
format(string, sizeof(string), "%s ", ip);
SendClientMessage(playerid,COLOR_GREEN, string);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED, "Non sei autorizzato ad usare questo comando!");
}
return 1;
}


prova questo fammi sapere lo uso anke io e funge
Firma cancellata perchè fuori norma, leggi il regolamento. Il codice precedente è stato inviato per Messaggio Privato.
0

#19 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 13 marzo 2009 - 13:32

Quote



#include <a_samp>
#define COLOR_GREEN 0xAFAFAFAA

public OnPlayerCommandText(playerid, cmdtext[])

if(strcmp("/ip", cmd, true) == 0)
{
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USA: /ip [id] ");
if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_GREEN, "questo player non è connesso");
cmdid = strval(tmp);

SendClientMessage(playerid, COLOR_GREEN, "IP");
new ip[20];
GetPlayerIp(cmdid, ip, sizeof(ip));
format(string, sizeof(string), "%s ", ip);
SendClientMessage(playerid,COLOR_GREEN, string);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_GREEN, "Non sei autorizzato ad usare questo comando!");
}
return 1;
}




prova questo fammi sapere lo uso anke io e funge


ERRORI:
C:\Documents and Settings\Utente\Desktop\ip.pwn(6) : error 017: undefined symbol "cmd"
C:\Documents and Settings\Utente\Desktop\ip.pwn(8) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Utente\Desktop\ip.pwn(8) : warning 215: expression has no effect
C:\Documents and Settings\Utente\Desktop\ip.pwn(8) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Utente\Desktop\ip.pwn(8) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Utente\Desktop\ip.pwn(8) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664    	Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.


posso farne anke a meno ke sia solo x admin

Quote

if ((IsPlayerAdmin(playerid)) ||









Quote

#include
#define COLOR_GREEN 0xAFAFAFAA
public OnPlayerCommandText(playerid, cmdtext[])//help
{
new string[256];
new cmd[256];
new idx;
new tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/ip",true) == 0) {
if(IsPlayerAdmin(playerid) == 1) {
new playername[MAX_PLAYER_NAME];
new pid,ip[24],name[256];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_GREEN,"Utilizzo: /ip [playerid]");
return 1;
}
pid = strval(tmp);
if(!IsPlayerConnected(pid)) {
SendClientMessage(playerid,COLOR_GREEN,"Questo giocatore non e' connesso");
return 1;
}
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(pid,playername,sizeof(playername));
GetPlayerIp(pid,ip,sizeof(ip));
format(string,sizeof(string),"IP %s : %s.",playername,ip);
SendClientMessage(playerid,COLOR_GREEN,string);
return 1;
} else {
SendClientMessage(playerid,COLOR_GREEN,"Devi essere un admin");
}
}
return 0;
}


ERRORI:
#include <a_samp>
#define COLOR_GREEN 0xAFAFAFAA
public OnPlayerCommandText(playerid, cmdtext[])//help
{
new string[256];
new cmd[256];
new idx;
new tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/ip",true) == 0) {
if(IsPlayerAdmin(playerid) == 1) {
new playername[MAX_PLAYER_NAME];
new pid,ip[24],name[256];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_GREEN,"Utilizzo: /ip [playerid]");
return 1;
}
pid = strval(tmp);
if(!IsPlayerConnected(pid)) {
SendClientMessage(playerid,COLOR_GREEN,"Questo giocatore non e' connesso");
return 1;
}
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(pid,playername,sizeof(playername));
GetPlayerIp(pid,ip,sizeof(ip));
format(string,sizeof(string),"IP %s : %s.",playername,ip);
SendClientMessage(playerid,COLOR_GREEN,string);
return 1;
} else {
SendClientMessage(playerid,COLOR_GREEN,"Devi essere un admin");
}
}
return 0;
}

0

#20 L'utente è offline   StanleY 

  • Cacciatore di taglie
  • Gruppo: Utenti
  • Messaggi: 1033
  • Iscritto il: 22/02/09
  • Provenienza:Palermo
  • GTA Preferito:GTA: San Andreas

Inviato il 13 marzo 2009 - 13:39

cmq non funziona neanke il primo (quello ek appena si connette spunta in chat)
0

  • (2 Pagine)
  • +
  • 1
  • 2
  • Non puoi iniziare una nuova discussione
  • Questa discussione e' chiusa

1 utenti stanno leggendo questa discussione
0 utenti, 1 ospiti, 0 utenti anonimi