Jump to content
  • 0

time check by ip


powkda

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

how do I make this verification be by ip and not by account?

	if( #HuntRoomDelay > gettimetick(2) ){
		set .last,#HuntRoomDelay - gettimetick(2);
		set .@min,  .last % ( 24 * 3600 ) % 3600 / (60);
		mes "Esperar por ^FF0000"+.@min+" Minutos^000000.";
		close;
	}else if( getarraysize( .Hunter ) >= .MaxPlayers ){
		mes "Atualmente a Sala está Cheia. Por favor, tente novamente mais tarde.";
		close;
	}else{
		warp .Map$,0,0;
		set .Hunter[getarraysize( .Hunter )],strcharinfo(0);
		set #HuntRoomDelay,gettimetick(2) + ( .DelayMin * 60 );
		set #FarmHunt,0;
		end;
		}

I'm having problems with players creating fake accounts to participate in the event

I don't know if it helps with some function, but I have gepard

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

use script command getcharip and create array of ip with permanent global variable, later on to check or set delay data, get the index of ip in array of ip with script command inarray if the ip exist you can check the delay data and set or update the delay data time.

if (getarraysize(.Hunter$) >= .MaxPlayers) {
	mes "Atualmente a Sala está Cheia. Por favor, tente novamente mais tarde.";
	close;
}
.@ip$ = getcharip();
.@size = getarraysize($HuntRoomDelayIP$);
if ((.@i = inarray($HuntRoomDelayIP$, .@ip$)) == -1)
	.@i = .@size;
else if ($HuntRoomDelay[.@i] > gettimetick(2)) {
	set .@last, $HuntRoomDelay[.@i] - gettimetick(2);
	set .@min,  .@last % ( 24 * 3600 ) % 3600 / (60);
	mes "Esperar por ^FF0000"+.@min+" Minutos^000000.";
	close;
}
$HuntRoomDelayIP$[.@i] = .@ip$;
$HuntRoomDelay[.@i] = gettimetick(2) + ( .DelayMin * 60 );
set .Hunter$[getarraysize( .Hunter$ )],strcharinfo(0);
set #FarmHunt,0;
warp .Map$,0,0;
end;	

 

Edited by Litro Endemic
Update script sample
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   21
  • Joined:  07/05/18
  • Last Seen:  

If u want to check them by IP, u can do *SQL_QUERY* to "last_ip"

in case u want to use gepard, u can simply use "last_unique_id"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...