Jump to content

Car Alarm Script.


WestCoast

Recommended Posts

I Need Some Help With The Car Alarm Script.

I have wrote a bit, but i dont know what to do next.

I Already Wrote This:

on *:SIGNAL:mta.command: {
if ($3 == !alarm) $$ ($4 == on) {
mta.say $1 Alarm Activated
}
on *:SIGNAL:mta.enter: {
.timercarkill $+ $2 1 5 mta.kill $1 $2
}
on *:SIGNAL:mta.exit {
.timercarkill $+ $2 off
}

Plz. can anyone help me.

Thnx WestCoast

Link to comment
on *:SIGNAL:mta.command: {
 if ($3 == !alarm) {
   if ($4 == on) {
     mta.say $1 Alarm Activated
     !writeini " $+ $scriptdir $+ alarm.ini" alarm alarm on
   }
   elseif ($4 == off) {
     mta.say $1 Alarm Deactivated
     !remini " $+ $scriptdir $+ alarm.ini" alarm alarm
   }
 }
}
on *:SIGNAL:mta.exit {
 if ($readini($scriptdir $+ alarm.ini,alarm,alarm) == on) .timer 5 0 mta.slap $1 $2
}

Link to comment

Hi Toady Thnx For The Script.

but when i type !alarm on. and when i enter a car i get killed lol

its on all cars.

i realy want that:

if someone enters a car that it says

mta.msg $1 $2 You got 5 seconds to get out or you die.

and its only activated on 1 car.

cause when i enter a car (every car) i die lol.

plz help me.

Link to comment

on *:SIGNAL:mta.command: {
 if ($3 == !alarm) {
   if (($mta.vehicle($1,$2).name == foot) || ($mta.vehicle($1,$2).name == Unknown)) mta.msg $1 $2 Error - you need to be in a car
   elseif ($4 == on) {
     mta.say $1 Alarm Activated
     !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) on
   }
 }
}
on *:SIGNAL:mta.enter:{
 if ($readini($scriptdir $+ alarm.ini,alarm,$mta.vehicle($1,$2)) == on) {
   mta.msg $1 $2 You got 5 seconds to get out of the car or you'll die
   $+(.timer,$1,.,$2) 1 5 bla.kill $1 $2
 }
}
on *:SIGNAL:mta.exit {
 $+(.timer,$1,.,$2) off
}
alias bla.kill .timer 5 0 mta.slap $1 $2

get in a car and type !alarm on

Link to comment

on *:SIGNAL:mta.command: {
 if ($3 == !alarm) {
   if (($mta.vehicle($1,$2).name == foot) || ($mta.vehicle($1,$2).name == Unknown)) mta.msg $1 $2 Error - you need to be in a car
   elseif ($4 == on) {
     mta.say $1 Alarm Activated
     !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) on
   }
   elseif ($4 == off) {
     mta.say $1 Alarm DeActivated
     !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) off
   }
 }
}
on *:SIGNAL:mta.enter:{
 if ($readini($scriptdir $+ alarm.ini,alarm,$mta.vehicle($1,$2)) == on) {
   mta.msg $1 $2 You got 5 seconds to get out of the car or you'll die
   $+(.timer,$1,.,$2) 1 5 bla.kill $1 $2
 }
}
on *:SIGNAL:mta.exit {
 $+(.timer,$1,.,$2) off
}
alias bla.kill .timer 5 0 mta.slap $1 $2

Here you go

Link to comment

Hi Its Me Again Sorry.

Is There A Script That Only The Guy/Girl Who Activates The Alarm

He Can Only DeActivate It.

And That If Someone Turns The Alarm On (In Car) That He Can DeActivate It (Out The Car)

Cuz If I Use !Alarm On And Get In The Car It Slaps Me.

Thats Why.

I Just Edited The Script With Only 1 Slap.

on *:SIGNAL:mta.command: { 
 if ($3 == !alarm) { 
   if (($mta.vehicle($1,$2).name == foot) || ($mta.vehicle($1,$2).name == Unknown)) mta.msg $1 $2 Error - you need to be in a car 
   elseif ($4 == on) { 
     mta.say $1 Car Alarm Activated 
     !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) on 
   } 
   elseif ($4 == off) { 
     mta.say $1 Car Alarm DeActivated 
     !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) off 
   } 
 } 
} 
on *:SIGNAL:mta.enter:{ 
 if ($readini($scriptdir $+ alarm.ini,alarm,$mta.vehicle($1,$2)) == on) { 
   mta.say $1 $mta.name($1,$2) Has Triggered An Car Alarm 
   $+(.timer,$1,.,$2) 1 1 bla.kill $1 $2 
 } 
} 
on *:SIGNAL:mta.exit: { 
 $+(.timer,$1,.,$2) off 
} 
alias bla.kill .timer 1 0 mta.slap $1 $2

Can Any One Help Me?

Link to comment
  • 2 weeks later...
  • Recently Browsing   0 members

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