Guest radrm

police car

Recommended Posts

Guest

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

Share this post


Link to post
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
}

Share this post


Link to post
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
}

Share this post


Link to post

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

Share this post


Link to post

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
}

Share this post


Link to post

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 }

Share this post


Link to post

Don't take advice from Andy, he can't spell.

Share this post


Link to post
Guest

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
 }
}

Share this post


Link to post

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
 }
}

Share this post


Link to post

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 ?

Share this post


Link to post

Check if scripts are enabled on the server, that script is loaded and you're connected. And check if there aren't few same SIGNALs in the script, cause if you have few same signals some parts won't work at all

Share this post


Link to post

Thanks. Does it matter if the signal is repeated in multiple script files, as I am trying to develop by splitting up the subprojects.

Share this post


Link to post

Aliases can be used once, signal can be used multiple times. This is why MTA:mA has swinched in the early 4.x series to signals

Share this post


Link to post

  • Recently Browsing   0 members

    No registered users viewing this page.