Jump to content

Script


Guest [XSM]kiwi

Recommended Posts

Is it possible to create a script that forces people to login to play on the server i created, they'll have to ask me for a pass and login and then they must be registred in the "database" to access the server.

If there already is a script like this please post a working link to it :roll:

Link to comment

Look in the addons section, mtama grs thread, it includes a login system. You may also be able to find a snippet that deals solely with this if you dont require any of the other reatures. Again, addons section, mtama scripting thread.

Link to comment
  • MTA Team
on *:SIGNAL:mta.join:{
 if ($readini($grs.dir $+ options.ini,main,serverpassword) != $null) {
   mta.msg $1 $2 A gangwar is in progress, please enter the password by typing /msg gw . You will be kicked in 20seconds
   $+(!.timer,$1,.,$2) 1 30 mta.kick $1 $2
 }
}
on *:SIGNAL:mta.part:{
 $+(!.timer,$1,.,$2) off
}
on *:SIGNAL:mta.pm:{
 if ($3 == gw) {
   if ($4 == on) {
     if (($5 != $null) && ($5 != on) && ($5 != off)) {
       if ($mta.level($1,$2) >= 4) {
         mta.say $1 Server passworded
         !writeini " $+ $grs.dir $+ options.ini" main serverpassword $5-
       }
       else mta.msg $1 $2 Insufficent privileges
     }
     else mta.msg $1 $2 Invalid password
   }
   elseif ($4 == off) {
     if ($5 == $readini($grs.dir $+ options.ini,main,serverpassword)) {
       if ($mta.level($1,$2) >= 4) {
         mta.say $1 Server unpassworded
         !remini " $+ $grs.dir $+ options.ini" main serverpassword
       }
       else mta.msg $1 $2 Invalid password
     }
     else mta.msg $1 $2 Insufficent privileges
   }
   elseif ($4 == $readini($grs.dir $+ options.ini,main,serverpassword)) {
     mta.msg $1 $2 ' $+ $mta.name($1,$2) $+ ', you have logged into the gangwar
     $+(!.timer,$1,.,$2) off
   }
   else mta.msg $1 $2 Syntax: /msg gw 
 }
}

THere we go.. wrote that into the forum box.. and its untested.. but should be ok :)

Commands:

/msg gw on - Admin level 4+

/msg gw off - Admin level 4+

/msg gw - logs u in

Edit: Mike.. lol.. just beat me :P ... but ures wont work on more than 1 server at once very well :P

Link to comment
  • 2 weeks later...
lol forgot about that 1

LOL u can say that again LOL

and dude u cant force people to regiter on server LOL its not ethical but u can add apart where if the person is not registered it kicks him and than he would have to register, you know the login part where it says welcome and stuff and says to register your name in that part add a mta.kick if he doesnt login with 40 seconds that will teach people to register name LOL i might make such a small change and give it to u but right now these days busy so wont be working on scripts .. but ask FMJ oli or some other scripter they can add that part easily..

Link to comment
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...