Donvalley Posted January 12, 2008 Share Posted January 12, 2008 This Script Is For MTA VC The Problem Is When Some One Is On The Wanted List And Then They Get Killed They Are Still On The Wanted List. Can Someone Please Fix This Script (AND Remove The Bounty Thing If Able To) Thanks In Advance. The Script Is: on *:SIGNAL:mta.command:{ if (!suspect == $3) { var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if (Cop* iswm $mta.skin($1,$2).name) { if (%a == -1) mta.msg $1 $2 Error - Absent ID/Name if (%a == $2) mta.msg $1 $2 Error - Can't suspect yourself else { !writeini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,%a) 1 mta.say $1 $mta.name($1,%a) has been added to the wanted list. Reason: $iif($5,$5-,None) } } else mta.msg $1 $2 Sorry, you are not a cop. } elseif (!wanted == $3) { var %a = 0,%b while (%a <= $mta.maxplayers($1)) { if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,%a)) == 1) { if (!%b) %b = $mta.name($1,%a) elseif (%b) %b = %b $+ , $mta.name($1,%a) } inc %a } mta.say $1 Wanted Players: $iif(%b,%b,None) } } on *:SIGNAL:mta.kill:{ if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,$2)) == 1) { if (Cop* iswm $mta.skin($1,$3).name) { mta.msg $1 $3 Killed a wanted player and u get 1000$ of his bounty. !remini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,$2) !writeini rpg.ini cash $mta.name($1,$3) $calc($readini(rpg.ini,cash,$mta.name($1,$3)) + 1000) } } Link to comment
lil Toady Posted January 12, 2008 Share Posted January 12, 2008 Done this script back in 2005 for somebody on *:SIGNAL:mta.command:{ if ($mta.admin+($1) == $true) { if (!cops* iswm $3) { var %a = 0,%b = $null while (%a <= $mta.maxplayers($1)) { if (Cop* iswm $mta.skin($1,%a).name) { var %b = $+(%b,$mta.name($1,%a),$chr(32)) } inc %a } mta.say $1 Cops: $iif(%b,%b,None) } elseif (!suspect == $3) { var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if (Cop* iswm $mta.skin($1,$2).name) { if (%a == -1) mta.msg $1 $2 Error - Absent ID/Name if (%a == $2) mta.msg $1 $2 Error - Can't suspect yourself else { !writeini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,%a) 1 !writeini " $+ $scriptdir $+ suspectlist.ini" Reasons $mta.name($1,%a) $iif($5,$5-,No Reason) mta.say $1 $mta.name($1,%a) has been added to the wanted list. Reason: $iif($5,$5-,None) } } else mta.msg $1 $2 Sorry, you are not a cop. } elseif (!unsuspect == $3) { var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if (Cop* iswm $mta.skin($1,$2).name) { if (%a == -1) mta.msg $1 $2 Error - Absent ID/Name else { !remini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,%a) !remini " $+ $scriptdir $+ suspectlist.ini" Reasons $mta.name($1,%a) mta.say $1 $mta.name($1,%a) has been removed from the wanted list. } } else mta.msg $1 $2 Sorry, you are not a cop. } elseif ($3 == !crim) { var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if (%a == -1) mta.msg $1 $2 Error - Absent ID elseif ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,%a)) == 1) mta.say $1 $mta.name($1,%a) is wanted for: $readini($scriptdir $+ suspectlist.ini,reasons,$mta.name($1,%a)) else mta.msg $1 $2 $mta.name($1,%a) is not on the Wanted list. } elseif ($3 == !crime) { var %a = 0,%b while (%a <= $mta.maxplayers($1)) { if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,%a)) == 1) { mta.say $1 Wanted: $mta.name($1,%a) $+ , Reason: $readini($scriptdir $+ suspectlist.ini,reasons,$mta.name($1,%a)) } inc %a } } elseif (!wanted == $3) { var %a = 0,%b while (%a <= $mta.maxplayers($1)) { if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,%a)) == 1) { if (!%b) %b = $mta.name($1,%a) elseif (%b) %b = %b $+ , $mta.name($1,%a) } inc %a } mta.say $1 Wanted Players: $iif(%b,%b,None) } } } on *:SIGNAL:mta.kill:{ if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,$2)) == 1) { if (Cop* iswm $mta.skin($1,$3).name) { mta.msg $1 $3 Killed a wanted player and u get 1000$ of his bounty. !remini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,$2) !remini " $+ $scriptdir $+ suspectlist.ini" Reasons $mta.name($1,$2) !writeini rpg.ini cash $mta.name($1,$3) $calc($readini(rpg.ini,cash,$mta.name($1,$3)) + 1000) } } } Link to comment
Donvalley Posted January 12, 2008 Author Share Posted January 12, 2008 The Problem Is Even When The Suspect Is Killed They Stay On The Wanted List How Do I Fix That?? Link to comment
Mex Posted January 12, 2008 Share Posted January 12, 2008 The Problem Is Even When The Suspect Is Killed They Stay On The Wanted List How Do I Fix That?? That's because you are only removing the player from the wanted list if a cop killed them. change on *:SIGNAL:mta.kill:{ if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,$2)) == 1) { if (Cop* iswm $mta.skin($1,$3).name) { mta.msg $1 $3 Killed a wanted player and u get 1000$ of his bounty. !remini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,$2) !writeini rpg.ini cash $mta.name($1,$3) $calc($readini(rpg.ini,cash,$mta.name($1,$3)) + 1000) } } to on *:SIGNAL:mta.kill:{ if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,$2)) == 1) { if (Cop* iswm $mta.skin($1,$3).name) { mta.msg $1 $3 Killed a wanted player and u get 1000$ of his bounty. !writeini rpg.ini cash $mta.name($1,$3) $calc($readini(rpg.ini,cash,$mta.name($1,$3)) + 1000) } !remini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,$2) } } This will remove the player from the wanted list when they die no matter what. Link to comment
Mex Posted January 12, 2008 Share Posted January 12, 2008 (AND Remove The Bounty Thing If Able To) If you don't want the cop to get money after they kill the wanted person, then use this: on *:SIGNAL:mta.kill:{ if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,$2)) == 1) { !remini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,$2) } } Link to comment
Donvalley Posted January 12, 2008 Author Share Posted January 12, 2008 Works Good Thanks A Lot Guys!!! Link to comment
Recommended Posts