Jump to content

my first Script !ambo


Guest Sirricharic

Recommended Posts

on *:SIGNAL:mta.command:{

if ($3 == !ambo) {

if ($mta.status($1,$2) != 2) mta.msg $1 $2 You need to be in game to call a ambulance!

else {

var %a = 0,%b

while (%a < $mta.maxplayers($1)) {

if ($taxi.driver($1,%a) == 1) {

mta.msg $1 %a $mta.name($1,$2) needs a ambulance at $mta.area($1,$2)

if (!%b) %b = $mta.name($1,%a)

else %b = %b $+ , $mta.name($1,%a)

}

!inc %a

}

if (%b) mta.msg $1 $2 Ambulance Drivers: %b Notified.

else mta.msg $1 $2 There are no Ambulance Drivers in Server.

}

}

elseif ($3 == !drivers) {

var %a = 0,%b

while (%a < $mta.maxplayers($1)) {

if ($taxi.driver($1,%a) == 1) {

if (!%b) %b = $mta.name($1,%a)

else %b = %b $+ , $mta.name($1,%a)

}

!inc %a

}

if (%b) mta.say $1 Abulance Drivers in Server: %b

else mta.say $1 There are no Ambulance Drivers in Server.

}

elseif ($3 == !help) mta.msg $1 $2 Abulance Script Commands: !ambo, !drivers, '/msg ambo on/off'

}

on *:SIGNAL:mta.pm:{

if ($3 == abbo) {

if ($4 == on) {

!writeini " $+ $scriptdir $+ taxi.ini" Drivers $mta.name($1,$2) 1

mta.msg $1 $2 You are now a Abulance Driver. (to stop being a driver do /msg ambo off)

}

elseif ($4 == off) {

!remini " $+ $scriptdir $+ taxi.ini" Drivers $mta.name($1,$2)

mta.msg $1 $2 You are not a Ambulance Driver any more.

}

else mta.msg $1 $2 Error - Syntax: /msg ambo on/off

}

}

on *:SIGNAL:mta.part:{

if ($taxi.driver($1,$2) == 1) !remini " $+ $scriptdir $+ taxi.ini" Drivers $mta.name($1,$2)

}

alias ambo.driver !return $readini($scriptdir $+ taxi.ini,Drivers,$mta.name($1,$2))

I think i did it right i got the idea from a friend i hope i did i just pplugged stuff in remember im still learning i need to get better its a edit of taxi script i may have left a few things out

Link to comment
  • 3 months later...
  • 3 weeks later...
  • 7 months later...
  • Recently Browsing   0 members

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