Jump to content

[RELEASE] !heli script


Mount

Recommended Posts

Hello,

this is my first mta script, and i wanna share it with you

Its like the Dodo script in GTA3

U can see who's flying it and if it is at spawn.

on *:SIGNAL:mta.disconnect: {
 !unset %heli1. [ $+ [ $1 ] ]
 !unset %heli2. [ $+ [ $1 ] ]
 !unset %heli3. [ $+ [ $1 ] ]
 !unset %heli4. [ $+ [ $1 ] ]
}

on *:SIGNAL:mta.enter: {
 if ($mta.vehicle($1,$2).name == Hunter) {
   mta.say $1 $+(',$mta.name($1,$2),') has got the Hunter!
   %heli1. [ $+ [ $1 ] ] = $2
 }
 if ($mta.vehicle($1,$2).name == Maverick) {
   mta.say $1 $+(',$mta.name($1,$2),') has got the Maverick!
   %heli2. [ $+ [ $1 ] ] = $2
 }
 if ($mta.vehicle($1,$2).name == Police Maverick) {
   mta.say $1 $+(',$mta.name($1,$2),') has got the Police Maverick!
   %heli3. [ $+ [ $1 ] ] = $2
 }
 if ($mta.vehicle($1,$2).name == Sparrow) {
   mta.say $1 $+(',$mta.name($1,$2),') has got the Sparrow!
   %heli4. [ $+ [ $1 ] ] = $2
 }
}

on *:SIGNAL:mta.part: {

 if ($2 == %heli1. [ $+ [ $1 ] ]) {
   mta.say $1 Hunter is available at spawn.
   !unset %heli1. [ $+ [ $1 ] ]
 }
 if ($2 == %heli2. [ $+ [ $1 ] ]) {
   mta.say $1 Maverick is available at spawn.
   !unset %heli2. [ $+ [ $1 ] ]
 }
 if ($2 == %heli3. [ $+ [ $1 ] ]) {
   mta.say $1 Police Maverick is available at spawn.
   !unset %heli3. [ $+ [ $1 ] ]
 }
 if ($2 == %heli4. [ $+ [ $1 ] ]) {
   mta.say $1 Sparrow is available at spawn.
   !unset %heli4. [ $+ [ $1 ] ]
 }
}
on *:SIGNAL:mta.exit: {
 if ($2 == %heli1. [ $+ [ $1 ] ]) {
   mta.say $1 Hunter is available at $+(',$mta.area($1,$2),'.)
   !unset %heli1. [ $+ [ $1 ] ]
 }
 if ($2 == %heli2. [ $+ [ $1 ] ]) {
   mta.say $1 Maverick is available at $+(',$mta.area($1,$2),'.)
   !unset %heli2. [ $+ [ $1 ] ]
 }
 if ($2 == %heli3. [ $+ [ $1 ] ]) {
   mta.say $1 Police Maverick is available at $+(',$mta.area($1,$2),'.)
   !unset %heli3. [ $+ [ $1 ] ]
 }
 if ($2 == %heli4. [ $+ [ $1 ] ]) {
   mta.say $1 Sparrow is available at $+(',$mta.area($1,$2),'.)
   !unset %heli4. [ $+ [ $1 ] ]
 }
}

on *:SIGNAL:mta.kill: {
 if ($2 == %heli1. [ $+ [ $1 ] ]) {
   mta.say $1 Hunter is available at spawn.
   !unset %heli1. [ $+ [ $1 ] ]
 }
 if ($2 == %heli2. [ $+ [ $1 ] ]) {
   mta.say $1 Maverick is available at spawn.
   !unset %heli2. [ $+ [ $1 ] ]
 }
 if ($2 == %heli3. [ $+ [ $1 ] ]) {
   mta.say $1 Police Maverick is available at spawn.
   !unset %heli3. [ $+ [ $1 ] ]
 }
 if ($2 == %heli4. [ $+ [ $1 ] ]) {
   mta.say $1 Sparrow is available at spawn.
   !unset %heli4. [ $+ [ $1 ] ]
 }
}
on *:SIGNAL:mta.command: {
 if ($3 == !heli) {
   mta.say $1 Hunter: $iif(%heli1. [ $+ [ $1 ] ] != $null,$mta.name($1,$ifmatch),Free!) $+ , Maverick: $iif(%heli2. [ $+ [ $1 ] ] != $null,$mta.name($1,$ifmatch),Free!) $+ , Police Maverick: $iif(%heli3. [ $+ [ $1 ] ] != $null,$mta.name($1,$ifmatch),Free!)  Sparrow: $iif(%heli4. [ $+ [ $1 ] ] != $null,$mta.name($1,$ifmatch),Free!)
 }
 if ($3 == !info) { mta.say $1 Heli script by Mount! }
}

Good luck!

greetings,

Mount

Link to comment
Killer, don't be an ass :P

This script you have made seems worth looking at. I'll have a try sometime

Naa i didnt say much did i? i just wanted to point out what he said "U can see who's flying it and if it is at spawn."

Do u understand the meaning of that line or not? If not i will explain in simple english , if u do not .

Link to comment
  • Recently Browsing   0 members

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