Jump to content

police car


Guest radrm

Recommended Posts

hey how can i make this so after 30 secs it kicks if he is still in there?

on *:SIGNAL:mta.enter: {
  if (Robber* iswm $mta.skin($1,$2).name) { 
    if ($mta.vehicle($1,$2).name == Police) {
     mta.msg $1 $2 Please Step Out Of The Police Car
   } 
 }
}

and also it says it when your a passenger but i dont want it for a passenger just a driver please help thank you ahead a time

Link to comment
on *:SIGNAL:mta.enter: {
  if (Robber* iswm $mta.skin($1,$2).name) { 
    if ($mta.vehicle($1,$2).name == Police) {
     if (!$mta.passenger($1,$2)) {
       mta.msg $1 $2 Please Step Out Of The Police Car
       $+(!.timercopcar,$1,.,$2) 1 30 mta.kick $1 $2
     }
   } 
 }
}

on *:SIGNAL:mta.part:{
 $+(!.timercopcar,$1,.,$2) off
}

Link to comment
on *:SIGNAL:mta.enter: {
  if (Robber* iswm $mta.skin($1,$2).name) { 
    if ($mta.vehicle($1,$2).name == Police) {
     if (!$mta.passenger($1,$2)) {
       mta.msg $1 $2 Please Step Out Of The Police Car
       $+(!.timercopcar,$1,.,$2) 1 30 mta.kick $1 $2
     }
   } 
 }
}

on *:SIGNAL:mta.part:{
 $+(!.timercopcar,$1,.,$2) off
}

mistake m8 :P part is when player leaves the server, exit when he leaves a car

on *:SIGNAL:mta.enter: {
  if (Robber* iswm $mta.skin($1,$2).name) {
    if ($mta.vehicle($1,$2).name == Police) {
     if (!$mta.passenger($1,$2)) {
       mta.msg $1 $2 Please Step Out Of The Police Car
       $+(!.timercopcar,$1,.,$2) 1 30 mta.kick $1 $2
     }
   }
 }
}

on *:SIGNAL:mta.exit:{
 $+(!.timercopcar,$1,.,$2) off
}

Link to comment

mistake m8 :P part is when player leaves the server, exit when he leaves a car

Right, it's needed on both events, if he leaves and someone else joins with the same id, the poor bugger who just joint is gonna get booted :P

Link to comment

mistake m8 :P part is when player leaves the server, exit when he leaves a car

Right, it's needed on both events, if he leaves and someone else joins with the same id, the poor bugger who just joint is gonna get booted :P

true, so here's the final code:

on *:SIGNAL:mta.enter: {
  if (Robber* iswm $mta.skin($1,$2).name) {
    if ($mta.vehicle($1,$2).name == Police) {
     if (!$mta.passenger($1,$2)) {
       mta.msg $1 $2 Please Step Out Of The Police Car
       $+(!.timercopcar,$1,.,$2) 1 30 mta.kick $1 $2
     }
   }
 }
}
on *:SIGNAL:mta.exit:{
 $+(!.timercopcar,$1,.,$2) off
} 
on *:SIGNAL:mta.part:{
 $+(!.timercopcar,$1,.,$2) off
}

Link to comment

or

on *:SIGNAL:mta.enter: {
  if ($mta.skin($1,$2) == 2)  && ($mta.vehicle($1,$2).name == Police) &&  (!$mta.passenger($1,$2)) {
       mta.msg $1 $2 Please Step Out Of The Police Car! $chr(126) 30 Secs Left!
       $+(!.timercopcar,$1,.,$2) 5 30 mta.slap $1 $2
 }
}
on *:SIGNAL:mta.exit:{ $+(!.timercopcar,$1,.,$2) off }
on *:SIGNAL:mta.part:{ $+(!.timercopcar,$1,.,$2) off }

Link to comment

ok ty one more question

           mta.msg $1 %a  $mta.name($1,%a), you have been Sentenced
            !.timercheck $+ $1 $+ %a 0 5 check.area $1 %a $3
            !.timercheck $+ $1 $+ %a 1 10 check.area $1 %a $3
            !.timercheck $+ $1 $+ %a 2 15 check.area $1 %a $3
            !.timercheck $+ $1 $+ %a 3 20 check.area $1 %a $3
            !.timercheck $+ $1 $+ %a 4 25 check.area $1 %a $3
            !.timercheck $+ $1 $+ %a 5 30 check.area $1 %a $3

how can i make that into a loop since it crashes mIRC? its part of my jail code the alias for this is

alias check.area {
 if ($mta.area($1,%a) != $3) {
   !.timerslap 5 0
 }
}

Link to comment

didnt really get what you want, but maybe this:

for the timer(dunno where you want to put this, anyway few like this will take much cpu):

$+(!.timercheck,$1,.,%a) 0 5 check.area $1 %a $3

and the check:

alias check.area {
 if ($mta.area($1,$2) != $3) {
   if ($mta.health($1,$2) isnum) {
     var %a = $mta.health($1,$2)
     while (%a > 0) { mta.slap $1 $2 | %a = %a - 20 }
   }
   else .timer 5 0 mta.slap $1 $2
 }
}

Link to comment
  • 1 month later...

I tried this to creat this one, but I could not get it to work.

Must be something in my scripts.

the on *:SIGNAL:mta.enter command seems not to work at all, if I delete all lines and put

mta.say $1 Welcome

nothing happens when entering a car.

Any clues ?

Link to comment
  • Recently Browsing   0 members

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