Jump to content

Mex

Members
  • Posts

    17
  • Joined

  • Last visited

Details

  • Gang
    [PS]
  • Location
    Hampshire, England

Mex's Achievements

Square

Square (6/54)

0

Reputation

  1. Mex

    !backup Script

    It should work, make sure the script is connected before you spawn. Or just respawn when the script is connected.
  2. Mex

    !backup Script

    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 } } }
  3. Mex

    !backup Script

    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 } } }
  4. Mex

    Police Car Timer

    on *:SIGNAL:mta.enter: { if ($mta.skin($1,$2).name != Cop) && ($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) 1 30 mta.enter.kill $1 $2 } } alias mta.enter.kill { !.timerenterkill 7 0 mta.slap $1 $2 } on *:SIGNAL:mta.exit:{ $+(!.timercopcar,$1,.,$2) off } on *:SIGNAL:mta.part:{ $+(!.timercopcar,$1,.,$2) off }
  5. Mex

    !backup Script

    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) {
  6. 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) } }
  7. 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.
  8. Mex

    MTA:MA Scripting

    Hey can anyone tell me if its possible to add a PHP script into a mIRC script? thanks Edit: Or a MySQL Script? As I was thinking is it possible to update a website as something happened, such as someone bought a car? thanks
  9. Mex

    MTA:MA Scripting

    Worked fine thanks scooby
  10. Mex

    MTA:MA Scripting

    The long box below the chat box
  11. Mex

    MTA:MA Scripting

    Hey, Can anyone explain how to change the Welcome Message in MTA 0.5? Ive tried editing the mtaclientwelcome.dat file in notepad, but when i restart the client it resets the file thanks james
  12. Mex

    MTA:MA Scripting

    it does .. it reads the mta.data ini
  13. Mex

    MTA:MA Scripting

    would this work for area? on *:SIGNAL:mta.command: { var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if ($3 == !area) { mta.say $1 $mta.area($1,%a) } }
  14. Mex

    MTA:MA Scripting

    I managed to get it working (i think) Heres the code if anyones wants it: on *:SIGNAL:mta.command:{ var %a = $readini(carprices.ini,cars,$mta.vehicle($1,$2)) var %b = $readini(cars.ini,cars,$mta.vehicle($1,$2)) if ($3 == !infocar) { mta.msg $1 $2 You are driving a $mta.vehicle($1,$2).name $+ , Owner: %b } elseif ($3 == !buycar) { if ($mta.name($1,$2).name != %b) { if ($mta.area($1,$2) == Sunshine Autos && $mta.health($1,$2) > 0) { if ($mta.cash($1,$2) > %a) { writeini -n cars.ini cars $mta.vehicle($1,$2) $mta.name($1,$2).name writeini nms.ini Cash $mta.name($1,$2) $calc($mta.cash($1,$2) - %a) mta.msg $1 $2 You just bought car $mta.vehicle($1,$2) $+ , $mta.vehicle($1,$2).name } else mta.msg $1 $2 You dont have enough cash } else mta.msg $1 $2 You need to be at Sunshine Autos } else mta.msg $1 $2 Vehicle already owned } elseif ($3 == !sellcar) { if ($mta.name($1,$2).name == %c) { if ($mta.area($1,$2) == Sunshine Autos && $mta.health($1,$2) > 0) { remini -n cars.ini cars $mta.vehicle($1,$2) $mta.name($1,$2).name writeini nms.ini Cash $mta.name($1,$2) $calc($mta.cash($1,$2) + %a) mta.msg $1 $2 You just sold car $mta.vehicle($1,$2) $+ , $mta.vehicle($1,$2).name } else mta.msg $1 $2 You need to be at Sunshine Autos } else mta.msg $1 $2 You dont own this vehicle } alias mta.cash { !return $iif($readini(nms.ini,Cash,$mta.name($1,$2)) == $null,0,$v1) } Obviously you'd have to change the ini locations.
  15. Mex

    MTA:MA Scripting

    Hey, Ive just finished making this script, but its not working properly. For example, whenever I go to sell a car i own, it says "You dont own this vehicle", its probably to do with one of the variables, but ive tried messing around with them a few times and I didnt get anywhere. As u can probably guess im making a !infocar, !sellcar & !buycar script for vc. Just wondering if u guys could point me in the right direction on *:SIGNAL:mta.command:{ var %a = $iif($readini(carprices.ini,cars,$mta.vehicle($1,$2)) == null,0,$vl) var %b = $iif($readini(cars.ini,cars,$mta.vehicle($1,$2)) == null,0,$vl) var %c = $iif($readini(cars.ini,cars,$mta.vehicle($1,$2),$mta.name($1,$2).name) == null,0,$vl) if ($3 == !infocar) { mta.msg $1 $2 You are driving a $mta.vehicle($1,$2).name $+ , Owner: $readini(cars.ini,cars,$mta.vehicle($1,$2)) } elseif ($3 == !buycar) { if (%b == 1) { if ($mta.area($1,$2) == Sunshine Autos && $mta.health($1,$2) > 0) { if ($mta.cash($1,$2) > %a) { writeini -n cars.ini cars $mta.vehicle($1,$2) $mta.name($1,$2).name writeini nms.ini Cash $mta.name($1,$2) $calc($mta.cash($1,$2) - %a) mta.msg $1 $2 You just bought car $mta.vehicle($1,$2) $+ , $mta.vehicle($1,$2).name } else mta.msg $1 $2 You dont have enough cash } else mta.msg $1 $2 You need to be at Sunshine Autos } else mta.msg $1 $2 Vehicle already owned } elseif ($3 == !sellcar) { if ($mta.name($1,$2).name == %b) { if ($mta.area($1,$2) == Sunshine Autos && $mta.health($1,$2) > 0) { remini -n cars.ini cars $mta.vehicle($1,$2) $mta.name($1,$2).name writeini nms.ini Cash $mta.name($1,$2) $calc($mta.cash($1,$2) + %a) mta.msg $1 $2 You just sold car $mta.vehicle($1,$2) $+ , $mta.vehicle($1,$2).name } else mta.msg $1 $2 You need to be at Sunshine Autos } else mta.msg $1 $2 You dont own this vehicle } alias mta.cash { !return $iif($readini(nms.ini,Cash,$mta.name($1,$2)) == $null,0,$v1) } thanks, James
×
×
  • Create New...