Jump to content
  • 0

Question

Posted

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

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...