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

i think it would go something like this (not sure tho :? )

alias mta.enter { 
 %carentid. [ $+ [ $1 ] $+ . $+ [ $2 ] ] = $Mta.vehicle($1,$2) 
} 

alias mta.exit { 
 %carleft. [ $+ [ $1 ] $+ . $+ [ %carentid. [ $+ [ $1 ] $+ . $+ [ $2 ] ] ] ] = $replace($replace($mta.area($1,$2),$chr(32),$chr(44) $+ $chr(32)),-,$chr(32)) 
} 

alias mta.command { 
 if ($3 == !find) && ($mta.skin($1,$2) == 1 || 5 || 6) { 
   %fcarini = 1 
   :fcarini 
   if ($4 isin $readini(mta.data.ini,vehicle2,%fcarini)) { 
     if (%validveh == $null) /set %validveh 0 
     if ($gettok($mta.vehicle($1,%fcarini).list,1,32) != -1) { 
       !.timer 1 $calc(%validveh) mta.msg $1 $2 vehicle $+ %fcarini found, name: $readini(mta.data.ini,vehicle2,%fcarini) $+ , Driver: $mta.name($1,$gettok($mta.vehicle($1,%fcarini).list,1,32)) $+ , Location: $replace($replace($mta.area($1,$gettok($mta.vehicle($1,%fcarini).list,1,32)),$chr(32),$chr(44) $+ $chr(32)),-,$chr(32)) 
       %carfound = true 
     } 
     elseif (%carleft. [ $+ [ $1 ] $+ . $+ [ %fcarini ] ] != $null) { 
       !.timer 1 $calc(%validveh) mta.msg $1 $2 Last known location of vehicle $+ %fcarini ( $+ $readini(mta.data.ini,vehicle2,%fcarini) $+ ) $+ : %carleft. [ $+ [ $1 ] $+ . $+ [ %fcarini ] ] 
       %carfound = true 
     } 
     /inc %validveh 1 
   } 
   if (%fcarini < 80) { 
     /inc %fcarini 1 
     goto fcarini 
   } 
   elseif (%validveh == $null) !timer 1 0 mta.msg $1 $2 invalid vehicle name! 
   elseif (%carfound != true) !timer 1 0 mta.msg $1 $2 could not find vehicle! 
   :cfend 
   /unset %fcarini 
   /unset %findid 
   /unset %findsub 
   /unset %carfound 
   /unset %validveh 
 } 
}

Link to comment

if $3 == !quote {
elseif !$exists($mta.dir $+ quotes.ini) {
   !writeini "$mta.dir $+ quotes.ini" quote1 quote I Like Pepperoni Pizza
   !writeini "$mta.dir $+ quotes.ini" quote2 quote Why does Rain Suddenly Appear
   !writeini "$mta.dir $+ quotes.ini" quote3 quote TLR Rule
   !writeini "$mta.dir $+ quotes.ini" quote4 quote TLR Are The Best
   !writeini "$mta.dir $+ quotes.ini" quote5 quote Take My Breath Away
 }
 mta.say $1 Quote> $readini(quotes.ini,quote,$rand(1,$ini($mta.dir $+ quotes.ini,0)))
}
elseif $3 == !addquote {
 if $4 != $null {
   !writeini "$mta.dir $+ quotes.ini" quote $+ $calc($ini($mta.dir $+ quotes.ini,0) + 1) quote $4-
   mta.msg $1 $2 Quote $+(,'$4',) added
 }
 else mta.msg $1 $2 Syntax Error - !addquote 
}

Oli made this, but i think he did it in a rush, It dosen't seem to work :shock: .

Link to comment

Can some 1 tell me what is wrong with this??? When I put the mta.say commands in they stopped the whole script from working!! Could some one correct this plz!

alias mta.command { 
  if ($3 == !kick) && ($mta.name($1,$2) == BJack ) {
   if ($4 != $null) {
     mta.kick $1 $4
   }
 }
 if ($3 == !ban) && ($mta.name($1,$2) == BJack ) {
   if ($4 != $null) {
     mta.ban $1 $4
   }
 }
 if ($3 == !unban) && ($mta.name($1,$2) == BJack ) {
   mta.unban $1 $4
 }
if ($3 == !script) {
 mta.say $1 This is BJacks Experimental Gaming Script Version 0.7
}
if ($3 == !en)
 mta.say $1 English Only
}
if ($3 == !fuck)
 mta.say $1 $mta.name($1,$2) would like to tell $mta.name($1,$2) to FUCK off!!
}
 if ($3 == !sun) {
   mta.setweather $1 0
 }
 if ($3 == !cloud) {
   mta.setweather $1 1
 }
 if ($3 == !rain) {
   mta.setweather $1 2
 }
 if ($3 == !fog) {
   mta.setweather $1 3
 }
 if ($3 == !dawn) {
   mta.settime $1 07:00
 }
  if ($3 == !day) {
   mta.settime $1 10:00
 }
  if ($3 == !noon) {
   mta.settime $1 12:00
 }
  if ($3 == !night) {
   mta.settime $1 19:00
 }
  if ($3 == !midnight) {
   mta.settime $1 00:00
 }
}

Link to comment
the :o is !f u c k without the gaps!

alias mta.command { 
 if ($3 == !kick) && ($mta.name($1,$2) == BJack ) { 
   if ($4 != $null) { 
     mta.kick $1 $4 
   } 
 } 
 elseif ($3 == !ban) && ($mta.name($1,$2) == BJack ) { 
   if ($4 != $null) { 
     mta.ban $1 $4 
   } 
 } 
 elseif ($3 == !unban) && ($mta.name($1,$2) == BJack ) { 
   mta.unban $1 $4 
 } 
 elseif ($3 == !script) { 
   mta.say $1 This is BJacks Experimental Gaming Script Version 0.7 
 } 
 elseif ($3 == !en) {
   mta.say $1 English Only 
 } 
 elseif ($3 == !) {
   if ($4 == $null) {
     mta.say $1 say error absent ID say !
   }
   else {
     mta.say $1 $mta.name($1,$2) would like to tell $mta.name($1,$4) to (word) off!!
   }
 } 
 elseif ($3 == !sun) { 
   mta.setweather $1 0 
 } 
 elseif ($3 == !cloud) { 
   mta.setweather $1 1 
 } 
 elseif ($3 == !rain) { 
   mta.setweather $1 2 
 } 
 elseif ($3 == !fog) { 
   mta.setweather $1 3 
 } 
 elseif ($3 == !dawn) { 
   mta.settime $1 07:00 
 } 
 elseif ($3 == !day) { 
   mta.settime $1 10:00 
 } 
 elseif ($3 == !noon) { 
   mta.settime $1 12:00 
 } 
 elseif ($3 == !night) { 
   mta.settime $1 19:00 
 } 
 elseif ($3 == !midnight) { 
   mta.settime $1 00:00 
 } 
}

That should work :wink: , change to what ever you want.

Link to comment

$mta.name($1,$2) would like to tell $mta.name($1,$4) to  off 

that is correct it works if it was

$mta.name($1,$2) would like to tell $mta.name($1,$2) to  off 

it would display the users name twice

like off>

but $mta.name($1,$4) the $4 allows the player to type !:o so it displays the other users name!

Link to comment
$mta.name($1,$2) would like to tell $mta.name($1,$4) to  off 

that is correct it works if it was

$mta.name($1,$2) would like to tell $mta.name($1,$2) to  off 

it would display the users name twice

like off>

but $mta.name($1,$4) the $4 allows the player to type !:o so it displays the other users name!

hhmmm...

 } 
 elseif ($3 == !) { 
   if ($4 == $null) { 
     mta.say $1 $mta.name($1,$2) is  Off!
   } 
   else { 
     mta.say $1 $mta.name($1,$2) would like to tell $mta.name($1,$4) to  off!! 
   } 
 } 

Try that :wink: , replace wid what ever.

Link to comment

alias mta.command { 
 if ($3 == !server) { 
   mta.say $1 Current BJack Server Info:: Script Version: 0.9
   mta.say $1 Players on Server: $mta.players($1) Server Address: $mta.server($1) Game: $mta.game($1)
   mta.say $1 Weather: $mta.weather($1) Time in Vice City: $mta.time($1) Game Mode:  $mta.mode($1) Max Amount of Players: $mta.maxplayers($1)  
 }
 elseif ($3 == !script) { 
   mta.say $1 This is BJacks Experimental Gaming Script Version 0.9
 } 
 elseif ($3 == !en) { 
   mta.say $1 English Only
 }   
 elseif ($3 == !time) { 
   mta.say $1 $ctime
 }
 elseif ($3 == !motd) { 
   mta.say $1 mta.motd($1)
 }
 elseif ($3 == !ping) {
   if ($4 == !null) 
   mta.say $1 $mta.name($1,$4) has a ping of $mta.ping($1,$4)
 }
 elseif ($3 == !skin) { 
   if ($4 == !null) 
   mta.say $1 $mta.name($1,$4) is a $mta.skin($1,$4).name
 }
 elseif ($3 == !car) { 
   if ($4 == !null) 
   mta.say $1 $mta.name($1,$4) is driving a $mta.vehicle($1,$4).name
 }
 elseif ($3 == !stats) {
   if ($4 == !null) {
   mta.say $1 Name: $mta.name($1,$4) Time Online: $mta.online($1,$4).time Kills: $mta.kills($1,$4) Deaths: $mta.deaths($1,$4) }
 }
}
elseif ($3 == !timeset) {
 if ($4 != $null) {
   mta.settime $1 $4
 }
}
elseif ($3 == !fuck) { 
 if ($4 == $null) { 
   mta.say $1 You have typed this command incorrectly it is !fuck  of player! 
 } 
 else { 
   mta.say $1 $mta.name($1,$2) would like to tell $mta.name($1,$4) to FUCK off!! 
 } 
} 
elseif ($3 == !sun) { 
 mta.setweather $1 0 
} 
elseif ($3 == !cloud) { 
 mta.setweather $1 1 
} 
elseif ($3 == !rain) { 
 mta.setweather $1 2 
} 
elseif ($3 == !fog) { 
 mta.setweather $1 3 
} 
elseif ($3 == !dawn) { 
 mta.settime $1 07:00 
} 
elseif ($3 == !day) { 
 mta.settime $1 10:00 
} 
elseif ($3 == !noon) { 
 mta.settime $1 12:00 
} 
elseif ($3 == !night) { 
 mta.settime $1 19:00 
} 
elseif ($3 == !midnight) { 
 mta.settime $1 00:00 
} 
elseif !kick == $3 && bjack isin $mta.name($1,$2) {
 elseif ($3 == !kick) && ($4 != $null) {
   mta.kick $1 $4 
 }
} 
elseif !ban == $3 && bjack isin $mta.name($1,$2) {
 ($4 != $null) {
   mta.ban $1 $4 
 }
}   
elseif ($3 == !resetscores) { 
 mta.resetscores $1 
 mta say $1 $mta.name($1,$2) has reset the scores
} 
elseif ($3 == !unban) { 
 if ($4 != $null) {
   mta.unban $1 $4 
 }
 else { mta.say $1 Error, !unban  }
} 
elseif ($3 == !shutdown) { 
 mta.say $1 Shutting down Server: $4
 mta.shutdown $1 $4 
}
elseif ($3 == !kill) { 
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.slap $1 $4
 mta.say $1 $mta.name($1,$2) has killed you in humiliation!!
}
elseif ($3 == !password) { 
 mta.setpassword $1 $4
 mta.say $1 The Password is set to $4 because the server is overloading!
}  
alias mta.enter {
 mta.msg $1 $2 You have entered a $mta.vehicle($1,$2).name, Enjoy your ride!
}
alias mta.kill {
 mta.msg $1 $2 You have been killed!!! better luck next time!!
}
alias mta.spawn {
 mta.say $1 $mta.name($1,$2) has spawned as a $mta.skin($1,$2).name
}
alias mta.part {
 mta.say $1 $mta.name($1,$2) has left the game
}
alias mta.text {
 if (lagger || lag || lags isin $3) {
   mta.slap $1 $2 
   mta.say $1 $mta.name($1,$2) Dont use Lagger, Lag or Lags in Chat Box!
 }
 elseif (brb isin $3) {
   mta.say $1 $mta.name($1,$2) will BE Right Back!!!
 }
 elseif (stfu isin $3) {
   mta.say $1 SHUT THE FUCK UP!!!!!!
 }
 alias mta.join {
   mta.say $1 Welcome to BJacks Experimental Gaming Version 0.9, $mta.name($1,$2) $+ . Version 0.9 in progress!
 }
}

Here yours latest fucked up script fixed, i have fixed most of it they may be few { } miss matchs if thats the case just gimme a shout.

Link to comment

elseif ($3 == !) {
 if ($4 == $null) {
   mta.say $1 You have typed this command incorrectly it is ! of player!
 }
 else {
   mta.say $1 $mta.name($1,$2) would like to tell $mta.name($1,$4) to  off!!
 }
} 

that wouldn't work well if $4 would be equal to 0, as mirc sees $null as being 0 too, so by triggering $4 as 0, it the same as not having $4 at all, if you are checking it against $null.

why not try if ($4 >= 0) .. which would basically check that $4 is a numerical value which is at least 0, so it would work with a player id of 0.

  elseif ($3 == !time) {
   mta.say $1 $ctime
 } 

wtf? why are you using $ctime for this kind of event? just use $time :/

you would use $ctime if you wanted to see how much time had passed from one point to another, alongside $duration, for example :P

- Bungle

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

    • No registered users viewing this page.

×
×
  • Create New...