Guest Posted June 20, 2006 Posted June 20, 2006 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
MrJax Posted June 20, 2006 Posted June 20, 2006 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 }
lil Toady Posted June 20, 2006 Posted June 20, 2006 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 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 }
MrJax Posted June 20, 2006 Posted June 20, 2006 mistake m8 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
lil Toady Posted June 20, 2006 Posted June 20, 2006 mistake m8 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 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 }
andeh Posted June 20, 2006 Posted June 20, 2006 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 }
Guest Posted June 21, 2006 Posted June 21, 2006 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 } }
lil Toady Posted June 22, 2006 Posted June 22, 2006 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 } }
TheShadow Posted July 25, 2006 Posted July 25, 2006 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 ?
lil Toady Posted July 25, 2006 Posted July 25, 2006 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
TheShadow Posted July 26, 2006 Posted July 26, 2006 Thanks. Does it matter if the signal is repeated in multiple script files, as I am trying to develop by splitting up the subprojects.
lil Toady Posted July 26, 2006 Posted July 26, 2006 No, if signals are in different scripts it doesn't matter
Harry Posted July 28, 2006 Posted July 28, 2006 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
Recommended Posts