Advertisement
Guest User

Untitled

a guest
Feb 7th, 2012
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.17 KB | None | 0 0
  1. //by skorm Ver1.1
  2. -   script  GMPROTECT   -1,{
  3.     OnPCLoginEvent:
  4.         setarray $@Password$[1], "Level10+password", "Level20+password", "Level30+password", "Level40+password", "Level50+password", "Level60+password", "Level70+password", "Level80+password", "Level90+password";
  5.         for( set .@a,10; .@a < (getarraysize($@Password$)*10); set .@a,.@a + 10){
  6.             if(getgmlevel()>=.@a){ set .@p,(.@a / 10);}
  7.         }
  8.         if(getgmlevel() >= 10 && getgmlevel() <= 99) {
  9.             initnpctimer;
  10.             if($player$[0]!=""){
  11.                 for(set .@a,0; .@a < getarraysize($player$); set .@a,.@a + 1) {
  12.                     set .@b,.@a + 1;
  13.                     setarray $player$[.@a],$player$[.@b];
  14.                     setarray $playerinfo$[.@a],$playerinfo$[.@b];
  15.                 }
  16.             }
  17.             setarray $player$[0],strcharinfo(0);
  18.             setarray $playerinfo$[0],getcharid(3);
  19.             atcommand "@hide";
  20.             atcommand "@mute 100 "+strcharinfo(0);
  21.             mes "Please input your password, before 60 seconds are up.";
  22.             input(@input$);
  23.             if(@input$ == $@Password$[.@p]) {
  24.                 mes "Welcome to our Server.";
  25.                 close2;
  26.                 stopnpctimer;
  27.                 for( set .@a,0; .@a < getarraysize($player$); set .@a,.@a + 1){
  28.                     attachrid($playerinfo$[.@a]);
  29.                     if(playerattached()){
  30.                         if($player$[.@a]==strcharinfo(0)) { set .@g,1; callfunc "unlocker",$player$[.@a],$playerinfo$[.@a],.@g; }
  31.                     }
  32.                 }
  33.             } else {
  34.                 mes "Incorrect!";
  35.                 close2;
  36.                 for( set .@a,0; .@a < getarraysize($player$); set .@a,.@a + 1){
  37.                     attachrid($playerinfo$[.@a]);
  38.                     if(playerattached()){
  39.                         if($player$[.@a]==strcharinfo(0)) { callfunc "unlocker",$player$[.@a],$playerinfo$[.@a],.@g; }
  40.                     }
  41.                 }
  42.             }
  43.         }
  44.     end;
  45.     OnTimer60000:
  46.         for( set $a,0; $a < getarraysize($player$); set $a,$a + 1){
  47.             attachrid($playerinfo$[$a]);
  48.             if(playerattached()){
  49.                 if($player$[$a]==strcharinfo(0)) { callfunc "unlocker",$player$[$a],$playerinfo$[$a],.@g; }
  50.             }
  51.         }
  52.         end;
  53.     OnInterIfInit:
  54.         setarray $player$[0],"","","","","","";
  55.         setarray $playerinfo$[0],"","","","","","";
  56.         end;
  57. }
  58.  
  59. function    script  unlocker    {
  60. detachrid;
  61. if(getarg(2)){
  62. atcommand "@unmute "+getarg(0);
  63. attachrid(getarg(1));
  64. atcommand "@hide";
  65. close;
  66. } else
  67. atcommand "@unmute "+getarg(0);
  68. attachrid(getarg(1));
  69. atcommand "@kick "+strcharinfo(0);
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement