Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

how i load it then?

give me a manual or something :D

download MTAMA from the mtavc.com website, and read the textfiles in there.. should be enough for my 8-year old brother to understand, so it should be good enough for you

Link to comment

i have done that, and i cant connect to my server, everything is right, took my ip: 192.168.0.1 and pass and nick and port and stuff, but i cant cconnect :(

Link to comment
i have done that, and i cant connect to my server, everything is right, took my ip: 192.168.0.1 and pass and nick and port and stuff, but i cant cconnect :(

Hm.. if the server runs on the same pc as mIRC it should work. Did you enable the admin port on the server? And are you conencting to the right port (default 4003)

Link to comment

yes, i have it on the same computer.

i have the admin port 4003

and i have a pass

and i use 192.168.0.1 ip

# 0 - disabled

# 1 - enabled

AdminServer 1

#AdminPort 4003

#AdminPassword "****"

* Connecting to 192.168.0.1:4003...

* Disconnected: Timed out.

* Send: 15B | Recieved: 0B | Time: 10secs

Link to comment
Duffbeer, very easy to get it to pm you or even beep on a keyword or trigger, for instance under mta.txt

if (!admin isin $3-) {

/msg duffbeer admin required on server $1

}

Player types !admin youll get a message box appear saying you are required on server in whichever mtama slot

ok,i added something to this script.well i'm using this my self currently and didnt like the fact that if people typed !admin they got no confirmation if it actully worked so i added this.all credit still goes to whoever started it :D its real simply but hey it works.

if (!admin isin $3-) { 
   /msg triblade Admin request on game server $1 
   mta.say $1 Admin has been warned )
 }

Link to comment

hey there i have a request.

for 2 scripts that are kina simlair.

could a script be made so that if someone in an irc channel /msg to me that the mtama would connect to the specified server?

and could it be made that if someone msg something to me on irc that irc runs or quits the server?

Link to comment
hey there i have a request.

for 2 scripts that are kina simlair.

could a script be made so that if someone in an irc channel /msg to me that the mtama would connect to the specified server?

and could it be made that if someone msg something to me on irc that irc runs or quits the server?

on *:TEXT:!con*:#: mta.con $2
on *:TEXT:!dis*:#: mta.dis $2

Link to comment

thx aeron.

i've got another question if you dont mind 8)

its kinda n00bish but whatever

if i want to make it so that only admins can do the command?

let's say for the countdown down script, how could i make it so that if only the admins can use it,so normal members who typ !countdown will see nothing or maybe a message admin only function

Link to comment

i dont know why harry but you script doesnt see the names and than aks for a password,just nothing happend when a name which is registerd as an admin enters

Link to comment
  • 2 weeks later...

alias mta.join {
writeini -n kicker.ini $+(",$mta.name($1,$2),") id $2
}
}

alias mta.pm {
if (($3 == kick) && ($mta.name($1,$2) == me)) {
$readini(kicker.ini,$3-,id)
mta.kick $1 $
}
}

ok, when someone joins the server it takes their id number and puts it in an ini file (cos the id number in the client changes but the one in mtama doesnt....) then when i type '/msg kick username' i want it to read back there id number so it corresponds to the mtama id number anyone got any ideas?

Link to comment

alias mta.getid {
 var %a = 0
 while (%a <= $mta.maxplayers($1))  {
   if ($+(*,$2,*) iswm $mta.name($1,%a)) !return %a
   !inc %a
 }
}

This return the matching id of the name with use of part of the nick. Use it as $mta.getid(,)

Ex. $mta.getid(5,ero) return the first ID with "ero"in his nick. like in Aeron

If nothing matches it returns $null

Link to comment

alias mta.pm {
if ($3- == admin ) {
 mta.say $1 Admin rights given to $mta.name($1-2)
 writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1
}
}
alias mta.text {
if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) {
 if ($3 == !kick) mta.kick $1 $4
 if ($3 == !ban) mta.ban $1 $4

}
}

This is a sort of 'admin' script.

1. Replace with the password you want.

2. Join you server.

3. Type "/msg admin "

4. If the password is correct you see the msg: "Admin rights given to "

5. Now you can run the commands that are between the brackets. like "!kick " or "!ban " Normal user who didn't login can't do this.

Link to comment
alias mta.pm {
if ($3- == admin ) {
 mta.say $1 Admin rights given to $mta.name($1-2)
 writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1
}
}
alias mta.text {
if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) {
 if ($3 == !kick) mta.kick $1 $4
 if ($3 == !ban) mta.ban $1 $4

}
}

This is a sort of 'admin' script.

1. Replace with the password you want.

2. Join you server.

3. Type "/msg admin "

4. If the password is correct you see the msg: "Admin rights given to "

5. Now you can run the commands that are between the brackets. like "!kick " or "!ban " Normal user who didn't login can't do this.

the problem with that is the id numbers in the client change.... so if someone leaves and their id was 1 then whoever was 2 is now 1 but the mtama client still recognises them as 2, so you would still have to leave the game to kick someone

Link to comment

the problem with that is the id numbers in the client change.... so if someone leaves and their id was 1 then whoever was 2 is now 1 but the mtama client still recognises them as 2, so you would still have to leave the game to kick someone

Just look at the scoreboard to get ther REAL ID (F11)

Link to comment

alright {ULK}Dross suggested a awesome idea, and here it is:

alias mta.text {
if ($3 == !votekick) { 
   if (%vote.nick. [ $+ [ $1 ] ] == $null) { 
     if ($ini($+(",$scriptdir,$1,.ini,"),ID $+ $4)) { 
       set %vote.nick. [ $+ [ $1 ] ] $4 
       set %vote.voters. [ $+ [ $1 ] ] $null 
       mta.say $1 Votekick "!vote" if u want that $mta.name($1,$4) shall be kicked. [ 

$calc($left($did(mta,$1 $+ 21),2) / 2) votes needed][30 sec] 
       .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 
     } 
     else mta.say $1 Give up an existing ID-number: "!votekick <#ID"> 
   } 
   else mta.say $1 Another votekick is running: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) 
 } 
 if (($3 == !vote) && (%vote.nick. [ $+ [ $1 ] ] != $null)) { 
   if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) { 
     %vote.voters. [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2 
     mta.say $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.name($1,%vote.nick. [ $+ [ $1 ] 

]) 
     if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) { 
       mta.say $1 $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes 

ur out! 
       mta.kick $1 %vote.nick. [ $+ [ $1 ] ] 
       unset %vote.nick. [ $+ [ $1 ] ] 
       unset %vote.voters. [ $+ [ $1 ] ] 
       .timervote [ $+ [ $1 ] ] off 
     } 
   } 
   else mta.say $1 $mta.name($1,$2) You have already voted 
 }
elseif ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { 
 if ($3 == !vkstop)   mta.say $1 Vote kick cancelled: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) 
 unset %vote.nick. [ $+ [ $1 ] ] 
 unset %vote.voters. [ $+ [ $1 ] ] 
} 
}
alias mta.pm {
if ($3- == admin  as well>) { 
 mta.say $1 Admin rights given to $mta.name($1,$2) 
 writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 
} 
} 

basiccly, if some moron is abusing votekick, if ur quick enough, and logged in as admin u disable the votekick by typing !vkstop

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...