Jump to content
  • 0

kick account id not working


tenziekhai

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   5
  • Joined:  03/09/17
  • Last Seen:  

heres my script it gives me error please check picture attached 

-       script  Sample  -1,{

 

OnInit:

setarray .ID,200001,200002;

 

OnPCLoginEvent:

for( set .@i,0; .@i < getarraysize( .ID ); set .@i,.@i + 1 )

        if( getcharid(3) == .ID[.@i] )

                atcommand "@Kick "+strcharinfo(0);

end;

}

 

kickaccountid.jpg

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

You're not ending the script after The initialization of array ".ID". meaning the script falls through to the next command where player attachment is required:
Essentially:
Change:

OnInit:
setarray .ID,200001,200002;

To

OnInit:
setarray .ID,200001,200002;
end;
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

2 hours ago, tenziekhai said:

heres my script it gives me error please check picture attached 


-       script  Sample  -1,{

 

OnInit:

setarray .ID,200001,200002;

 

OnPCLoginEvent:

for( set .@i,0; .@i < getarraysize( .ID ); set .@i,.@i + 1 )

        if( getcharid(3) == .ID[.@i] )

                atcommand "@Kick "+strcharinfo(0);

end;

}

 

kickaccountid.jpg

 
 
 

Hi, please try this one.

-	script	gm_autokick_	-1,{

OnPCLoginEvent:
	.@size = getarraysize(.gm_List);
	for( .@i = 0; .@i < .@size; .@i++ ) {
		if( getcharid(3) == .gm_List[.@i] ) {
			announce "[ System ]: You have been rejected by the Server.",bc_self;
			addtimer 500,strnpcinfo(0)+"::OnKick";
		}
	}
	end;

OnKick:
	atcommand "@kick "+strcharinfo(0);
	end;

OnInit:
	setarray .gm_List, 2000000,2000001,2000002;
	end;
}



Raw Link:
http://immortalsro.com/rAScripts/gm_autokick.txt

Edited by Kaze
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   5
  • Joined:  03/09/17
  • Last Seen:  

5 minutes ago, Jeroen said:

You're not ending the script after The initialization of array ".ID". meaning the script falls through to the next command where player attachment is required:
Essentially:
Change:


OnInit:
setarray .ID,200001,200002;

To


OnInit:
setarray .ID,200001,200002;
end;

solved thanks :D

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...