Donvalley Posted January 12, 2008 Share Posted January 12, 2008 I Have Searched The Forum And Found 1 Backup Script For MTAVC But It Is Really Crappy (No Offence) But I Would Like One Where only cops can ask for backup, and that it only tells other cops in a PM. on *:SIGNAL:mta.command: { %b = $iif($4 isnum,$4,$mta.getid($1,$4)) if ($3 == !backup) mta.say $1 The Police Force needs Backup at $mta.area($1,$2) $+ ! elseif ($3 == !status) { if ($4 != $null) mta.say $1 $mta.name($1,$2) is $mta.status($1,$2).text $+ . else mta.say $1 $mta.name($1,%b) is $mta.status($1,%b).text $+ . } } Thanks In Advance, Jesse Link to comment
MB|Lagzilla Posted January 13, 2008 Share Posted January 13, 2008 I think this will do what is needed.. but I've never made any scripts for anything but mta:sa Have fun trying.. on *:SIGNAL:mta.command: { if ($3 == !backup) { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($mta.name($1,%a) != $null) && (($mta.vehicle($1,%a).name == Police) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } Link to comment
Donvalley Posted January 13, 2008 Author Share Posted January 13, 2008 Nope Doesn't Work Thanks For Trying Though Link to comment
Mex Posted January 13, 2008 Share Posted January 13, 2008 It will work, but there is just a small brakct error change if ($mta.name($1,%a) != $null) && (($mta.vehicle($1,%a).name == Police) { to if ($mta.name($1,%a) != $null) && ($mta.vehicle($1,%a).name == Police) { Link to comment
Donvalley Posted January 13, 2008 Author Share Posted January 13, 2008 Didn't Work This Is The Code on *:SIGNAL:mta.command: { if ($3 == !backup) { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($mta.name($1,%a) != $null) && ($mta.vehicle($1,%a).name == Police) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } Is This Right ?? It Just Does Nothing When You Type !backup>>?? Link to comment
Mex Posted January 13, 2008 Share Posted January 13, 2008 It will send a pm to all the cops who are in a police vehicle. If you want the cops to get a pm whether they are in the police vehicle or not, use this: on *:SIGNAL:mta.command: { if ($3 == !backup) { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($mta.name($1,%a) != $null) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } Link to comment
Donvalley Posted January 13, 2008 Author Share Posted January 13, 2008 It will send a pm to all the cops who are in a police vehicle.If you want the cops to get a pm whether they are in the police vehicle or not, use this: on *:SIGNAL:mta.command: { if ($3 == !backup) { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($mta.name($1,%a) != $null) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } Works Perfect But Can You make It So Only Police Can Call FOr Backup?? Link to comment
Mex Posted January 13, 2008 Share Posted January 13, 2008 I just realised it doesn't pm only cops, it pms everyone. on *:SIGNAL:mta.command: { if ($3 == !backup) { if ($mta.skin($1,$2).name != Cop) { mta.msg $1 $2 Only cops can use this | !halt } var %a = 0 while (%a <= $mta.maxplayers($1)) { if ($mta.name($1,%a) != $null) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } This will pm just cops: on *:SIGNAL:mta.command: { if ($3 == !backup) { if ($mta.skin($1,$2).name != Cop) { mta.msg $1 $2 Only cops can use this | !halt } var %a = 0 while (%a <= $mta.maxplayers($1)) { if ($mta.name($1,%a) != $null) && ($mta.skin($1,%a) == Cop) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } Link to comment
Donvalley Posted January 15, 2008 Author Share Posted January 15, 2008 This will pm just cops: on *:SIGNAL:mta.command: { if ($3 == !backup) { if ($mta.skin($1,$2).name != Cop) { mta.msg $1 $2 Only cops can use this | !halt } var %a = 0 while (%a <= $mta.maxplayers($1)) { if ($mta.name($1,%a) != $null) && ($mta.skin($1,%a) == Cop) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } Didn't Work I Am A Cop And It Says Sorry Only Cops Can Use This?? Help Please?? Link to comment
Mex Posted January 15, 2008 Share Posted January 15, 2008 Didn't Work I Am A Cop And It Says Sorry Only Cops Can Use This?? Help Please?? It should work, make sure the script is connected before you spawn. Or just respawn when the script is connected. Link to comment
Donvalley Posted January 15, 2008 Author Share Posted January 15, 2008 Well It Didn't Link to comment
Donvalley Posted January 15, 2008 Author Share Posted January 15, 2008 This will pm just cops: on *:SIGNAL:mta.command: { if ($3 == !backup) { if ($mta.skin($1,$2).name != Cop) { mta.msg $1 $2 Only cops can use this | !halt } var %a = 0 while (%a <= $mta.maxplayers($1)) { if ($mta.name($1,%a) != $null) && ($mta.skin($1,%a) == Cop) { mta.msg $1 %a The Police Force needs Backup at $mta.area($1,$2) $+ ! } !inc %a } } } Didn't Work I Am A Cop And It Says Sorry Only Cops Can Use This?? Help Please?? I Think Its This Bit! if ($mta.skin($1,$2).name != Cop) { mta.msg $1 $2 Only cops can use this | !halt } var %a = 0 Link to comment
Scooby Posted March 4, 2008 Share Posted March 4, 2008 dunno if u got this to work, or if u still need it... but try: on *:SIGNAL:mta.command: { if ($3 == !backup) { if ($mta.skin($1,$2).name != Cop) mta.msg $1 $2 Error: You Are Not A Cop! else { var %a = 0 while (%a < $mta.maxplayers($1)) { if (($mta.name($1,%a) != $null) && (%a != $2) && ($mta.skin($1,%a).name == Cop)) mta.msg $1 %a Backup Needed For $mta.name($1,$2) $+ , at $mta.area($1,$2) $+ ! !inc %a } } } } Link to comment
Recommended Posts