Jump to content

Where to study MTA:mA porgraming?


(OVG)Santi

Recommended Posts

well ... its just a matter of knowing how to program in the first place

then knowing all mta specific commands you can use (because of what is in mta:ma) in your script - and there should be a nice scripting.html (this for SA) file to guide you

that readme is a bit odd formatted imho if you dont know scripting too well but

but basically this is a example script

of course its also possible to use buildin mirc script variables etc besides the mta specific ones

on *:SIGNAL:mta.text:{

 if (hello isin $3-) {
mta.text $1 Automessage: Hello world
}

} 

on *:SIGNAL:mta.command: {
 ;Parameters:
 ;$1 = Server
 ;$2 = ID
 ;$3 = Command
 ;$4- = Parameters

 if ($3 == !currentmap) {
   mta.text $1 Currentmap: $mta.race(1)
 }
 elseif ($3 == !testme) {
 mta.pm $1 $2 Test completed
 }

}

note how there are two major blocks of code in this example these blocks are called EVENTS

on *:SIGNAL:mta.text:{ } and

on *:SIGNAL:mta.command: { }

inside these the first EVENT on *:SIGNAL:mta.text:{ } the script responds on general typed text

in the second block on *:SIGNAL:mta.command: { } the script responds to specific commands.. commands prefixed by a exclamation mark :!:

note how you always should mind the { } 's

on *:SIGNAL:mta.command: { 

if (!command == $3 )        { do this }
elseif    { do that }

}

Link to comment

try pressing f1 in script editor

try googling on mirc script read a few and get the feel for it

also .. learn some english

i tried to read your question 5 times , but .. what the f*ck are you saying ???

What in the link say the command for see to the console
Link to comment

the mta ingame console has some builtin commands ( :idea: type help :idea: )

so unless you made some script commands already

and a command to show the script commands

you can only see the normal console commands

so if i need to expand my example with a command to show the current commands

on *:SIGNAL:mta.text:{

 if (hello isin $3-) {
mta.text $1 Automessage: Hello world
}

}

on *:SIGNAL:mta.command: {
 ;Parameters:
 ;$1 = Server
 ;$2 = ID
 ;$3 = Command
 ;$4- = Parameters

 if ($3 == !currentmap) {
   mta.text $1 Currentmap: $mta.race(1)
 }
 elseif ($3 == !testme) {
 mta.pm $1 $2 Test completed
 }

 elseif ($3 == !commands) {
 mta.pm $1 $2 Current Usable script commands : 
 mta.pm $1 $2 !commands, !testme, !currentmap, hello
 }

} 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...