Jump to content
  • 0

Question

Posted

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

3 answers to this question

Recommended Posts

  • 0
Posted

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
  • 0
Posted (edited)
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
  • 0
Posted
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

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