
MrJax
Retired Staff-
Posts
1,078 -
Joined
-
Last visited
Everything posted by MrJax
-
Here, cleaned up a little on *:SIGNAL:mta.command:{ if ($3 == !place) { if (!$4) mta.say $1 $mta.name($1,$2) > Area: $mta.area($1,$2) elseif (!$5) { var %a = $my.getarea($1,$4) if ($gettok(%a,1,32) != -1) mta.say $1 Distance: $mta.name($1,$2) > $my.getdist($1,$2,%a) > $gettok(%a,2-,32) else mta.say $1 $mta.name($1,$2) $+ , Area $+(',$4,') not found! } else { var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2),%b = $my.getarea($1,$5) if (%a == -1) mta.say $1 $mta.name($1,$2) $+ , ID of $+(',$4,') not found! elseif ($gettok(%b,1,32) != -1) mta.say $1 Distance: $mta.name($1,%a) > $my.getdist($1,%a,%b) > $gettok(%b,2-,32) else mta.say $1 $mta.name($1,$2) $+ , Area $+(',$5,') not found! } } } alias my.getarea { var %a = 0,%b = $iif($mta.game($1) == GTA:3,AREA1,AREA2) while (%a <= $ini(mta.data.ini,%b,0)) { if ($2 isin $readini(mta.data.ini,%b,$ini(mta.data.ini,%b,%a))) !return %a $readini(mta.data.ini,%b,$ini(mta.data.ini,%b,%a)) !inc %a } !return -1 } alias my.getdist { var %a = 1,%b = $iif($mta.game($1) == GTA:3,AREA1,AREA2),%c = x,%x,%x2,%y,%y2 while (%a <= $numtok($ini(mta.data.ini,%b,$gettok($3,1,32)),44)) { var %d = $gettok($ini(mta.data.ini,%b,$gettok($3,1,32)),%a,44) if (%c == x) { %c = y if (!%x) %x = %d elseif (%d < %x) %x = %d if (!%x2) %x2 = %d elseif (%d > %x2) %x2 = %d } elseif (%c == y) { %c = x if (!%y) %y = %d elseif (%d < %y) %y = %d if (!%y2) %y2 = %d elseif (%d > %y2) %y2 = %d } !inc %a } var %a,%b,%c,%d %a = $calc($calc($abs(%x2) + $abs(%x)) / 2) %b = $calc($calc($abs(%y2) + $abs(%y)) / 2) %c = $iif($abs(%x2) > $abs(%x),%a,$calc(0 - %a)) %d = $iif($abs(%y2) > $abs(%y),%b,$calc(0 - %b)) !return $mta.distance($mta.location($1,$2,x),%c,$mta.location($1,$2,y),%d,0,0) } alias mta.distance { var %a,%b,%c,%x,%y,%z,%atan,%acos,%asin %a = $calc($1 - $2) %b = $calc($3 - $4) %x = $abs($calc($1 - $2)) %y = $abs($calc($3 - $4)) %z = $abs($calc($5 - $6)) if %b < 0 && %a < 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres East else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North East } elseif %b < 0 && %a >= 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres West else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North West } elseif %b >= 0 && %a >= 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres West else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South West } elseif %b >= 0 && %a < 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres East else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South East } else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres }
-
This is the one used on our server, i did it before i knew all of the token identifiers, so it's a bit messy, i'll rewrite it later.. (..any probs, just post em) on *:SIGNAL:mta.command:{ if ($3 == !place) { if ($4) { var %a = 1,%c while (%a <= $ini(mta.data.ini,AREA2,0)) { if ($4 isin $readini(mta.data.ini,AREA2,$ini(mta.data.ini,AREA2,%a))) { %c = $ini(mta.data.ini,AREA2,%a) goto done } !inc %a } :done if (%c) { var %a = 1,%x,%y while (%a <= $numtok(%c,44)) { if (%a = $numtok(%c,44)) { %y [ $+ [ $calc(%a / 2) ] ] = $right(%c,$calc(0 - $pos(%c,$chr(44),$calc(%a - 1)))) } elseif ($calc(%a / 2) == $round($calc($calc(%a / 2) - 0.1),0)) { %y [ $+ [ $calc(%a / 2) ] ] = $right($left(%c,$calc(-1 + $pos(%c,$chr(44),%a))),$calc(0 - $pos($left(%c,$pos(%c,$chr(44),%a)),$chr(44),$calc(%a - 1)))) } elseif (%a == 1) { %x [ $+ [ $calc($calc(%a + 1) / 2) ] ] = $left(%c,$calc(-1 + $pos(%c,$chr(44),%a))) } else { %x [ $+ [ $calc($calc(%a + 1) / 2) ] ] = $right($left(%c,$calc(-1 + $pos(%c,$chr(44),%a))),$calc(0 - $pos($left(%c,$pos(%c,$chr(44),%a)),$chr(44),$calc(%a - 1)))) } !inc %a } var %a = 1,%north,%south,%east,%west while (%x [ $+ [ %a ] ] != $null) { if (%a == 1) { %east = %x [ $+ [ %a ] ] %west = %x [ $+ [ %a ] ] %north = %y [ $+ [ %a ] ] %south = %y [ $+ [ %a ] ] } else { if (%x [ $+ [ %a ] ] > %east) %east = %x [ $+ [ %a ] ] if (%x [ $+ [ %a ] ] < %west) %west = %x [ $+ [ %a ] ] if (%y [ $+ [ %a ] ] > %north) %north = %y [ $+ [ %a ] ] if (%y [ $+ [ %a ] ] < %south) %south = %y [ $+ [ %a ] ] } unset %x [ $+ [ %a ] ] unset %y [ $+ [ %a ] ] !inc %a } var %a,%b,%x,%y %a = $calc($calc($abs(%east) + $abs(%west)) / 2) %b = $calc($calc($abs(%north) + $abs(%south)) / 2) %x = $iif($abs(%east) > $abs(%west),%a,$calc(0 - %a)) %y = $iif($abs(%north) > $abs(%south),%b,$calc(0 - %b)) mta.say $1 Area: $readini(mta.data.ini,AREA2,%c) - Distance: $mta.distance($mta.location($1,$2,x),%x,$mta.location($1,$2,y),%y,0,0) } else mta.say $1 No such area found } else mta.say $1 $mta.name($1,$2) > Area: $mta.area($1,$2) } } alias mta.distance { var %a,%b,%c,%x,%y,%z,%atan,%acos,%asin %a = $calc($1 - $2) %b = $calc($3 - $4) %x = $abs($calc($1 - $2)) %y = $abs($calc($3 - $4)) %z = $abs($calc($5 - $6)) if %b < 0 && %a < 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres East else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North East } elseif %b < 0 && %a >= 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres West else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres North West } elseif %b >= 0 && %a >= 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres West else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South West } elseif %b >= 0 && %a < 0 { if %x < $calc(%y / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South elseif %y < $calc(%x / 2) !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres East else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres South East } else !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) Metres }
-
c:\program files\multi theft auto\ If you still can't find it, try reinstalling.
-
No, you have to go download the mod which is running on that server (the one everyone will be forced to use on that server). You'll have to go and manually download them from their site, it won't be automatic - many of them will be huge changes, like a whole new map and different vehicles, and with loads of people constantly downloading them from the server, it would screw up everyone elses game.
-
a moderator/admin abusing power?
MrJax replied to Toreno's topic in Site/Forum/Discord/Mantis/Wiki related
I notice you keep getting your posts deleted too, that's just mean -
I think that's the whole point of blue, a game/client side mod which everyone will have (the same), and server side script events/commands.
-
Aeron's right though, if there was a good, accurate way of detecting things like this, it would be in MTA:mA. No one was "putting him down", just trying to explain to people who might download and use it that it's very inaccurate.
-
clicky clicky
-
Do you play MTA? It's a good script, but the instability of sync in MTA would cause alot of kicks for people who aren't cheating I've even seen Aeron's "cheat/bot protection" kick and ban people for no reason. ...even a simple timeout/reconnect with MTA:mA will cause alot of kicks because of the huge change in data recieved (people being in different places).
-
I'm afraid scripts like this will be of no use in MTA, the fact is the checks aren't full-proof, and MTA is a client-sided game. eg: The health check - someone could have an incredibly slow game or connection and it might take them longer than 1 second to lose the health, or they could pickup health just as you check.. Jetpacking - I don't know how high you've put the check, but someone could jump out of a heli, or be standing on a tall building. Flying Cars - with 0.5 there are alot of issues with cars, you could be in a heli flying along, and the server may recognise it as a car or bike. Speed Hacks - there are hundred of warp-points in VC, someone could just be using them, or they might have a bad connection, and seem to warp along way in a short time. ...i would imagine people will be getting kicked left, right and center.
-
Ok, easiest and quickest thing to do, would be to use this script, and then save the area as a new name...then go into the mta.data.ini and move it from the bottom to the top of the section ([AREA1] for gta3, [AREA2] for vc). Or, you could edit this area saving script, and output the areas to a new ini, or new ini section, then copy the mta.area alias and edit it to suit your new file. That way your new areas will be in a seperate ini, and won't get overwritten. eg: on *:SIGNAL:mta.command: { ;!c clears the buffer with pointers if (!c == $3) { !unset %area mta.say $1 Area cleared. } ;!p sets a area point if (!p == $3) { %area = %area $+ $chr(44) $+ $round($mta.location($1,$2,x),4) $+ $chr(44) $+ $round($mta.location($1,$2,y),4) mta.say $1 $calc($count(%area,$chr(44)) /2) point(s) set } ;!s saves the area to my.data.ini if (!s == $3) { var %a if ($did(mta,$1 $+ 33) == GTA:3) !writeini " $+ $scriptdirmy.data.ini" AREA1 $right(%area,-1) $4- elseif ($did(mta,$1 $+ 22) == Stunt) !writeini " $+ $scriptdirmy.data.ini" AREA2 $right(%area,-1) $4- else { !writeini " $+ $scriptdirmy.data.ini" AREA2 $right(%area,-1) $4- !writeini " $+ $scriptdirmy.data.ini" AREA3 $right(%area,-1) $4- } !unset %area mta.say $1 Area saved as " $+ $4-" } ;!a Tells you in which area you are if (!a == $3) { mta.say $1 $my.area($1,$2) } } alias my.area { if (!$readini($scriptdirmy.ini,$1,admin+)) !return Disabled var %a,%b = 1,%c = $dll($scriptdirmta.dll,location,$1-2 x),%d = $dll($scriptdirmta.dll,location,$1-2 y),%e if (%c == Unknown) !return Unknown if ($did(mta,$1 $+ 33) == GTA:3) %a = AREA1 else %a = AREA2 while (%b <= $ini($scriptdirmy.data.ini,%a,0)) { %e = $ini($scriptdirmy.data.ini,%a,%b) if ($inpoly(%c,%d, [ %e ] )) !return $readini($scriptdirmy.data.ini,%a,%e) !inc %b } !return $iif($did(mta,$1 $+ 33) == GTA:3,Liberty-City,Vice-City) }
-
Ok, added the login... very top line of script is where the password goes...as for the expanding areas, if you don't know how to make a script to save/create new areas, look for aeron's. tip: everytime u update mtama it will overwrite mta.data.ini which will contain it. ..::Admin Commands::.. !koth [on/off] !checkdelay (area detection - can get cpu intensive) !sethouse ..::Commands::.. !addclan !join !leave !house !owner !clan !kills !area CLICK ME!
-
Yeah there is a line exactly for that: if ($mta.area($1,$mta.getid($1,$hget(koth,owner))) != $hget(koth,house2) || $hget(koth,owner) == No-one) { As for the commands, i don't know what you're using at the moment.. if you're using grs, then u can add " && $mta.level($1,$2) > " eg: if ($3 == !koth && $mta.level($1,$2) > 3) {
-
A "UK only" league is a bit silly, as i don't know one UK based clan which doesn't have members outside of the UK But UVA are in, can't let FMJ have an easy win (again )
-
What? It's suppose to get set back to 0 when you die, that's the whole point
-
on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if ($3 == !spree) mta.say $1 $mta.name($1,%a) > Spree: $iif($readini(spree.ini,current,$mta.name($1,%a)),$readini(spree.ini,current,$mta.name($1,%a)),0) - Top: $iif($readini(spree.ini,top,$mta.name($1,%a)),$readini(spree.ini,top,$mta.name($1,%a)),0) elseif ($3 == !topspree) { var %a = 0,%b,%c,%d,%e while (%a < $mta.maxplayers($1)) { if ($mta.name($1,%a) != Unknown && $readini(spree.ini,top,$mta.name($1,%a)) > 0) { %b = $readini(spree.ini,top,$mta.name($1,%a)) if (%b > $iif($readini(spree.ini,top,%c),$readini(spree.ini,top,%c),0)) %c = $mta.name($1,%a) elseif (%b > $iif($readini(spree.ini,top,%d),$readini(spree.ini,top,%d),0)) %d = $mta.name($1,%a) elseif (%b > $iif($readini(spree.ini,top,%e),$readini(spree.ini,top,%e),0)) %e = $mta.name($1,%a) } !inc %a } if (%c) { mta.say $1 Top Kill Sprees: mta.say $1 1st > %c with $readini(spree.ini,top,%c) kills if (%d) mta.say $1 2nd > %d with $readini(spree.ini,top,%d) kills if (%e) mta.say $1 3rd > %e with $readini(spree.ini,top,%e) kills } else mta.say $1 No one in the server has a kill spree! } } on *:SIGNAL:mta.kill:{ if ($mta.name($1,$3) != Unknown && $2 != $3) { !writeini -n spree.ini current $mta.name($1,$3) $calc($readini(spree.ini,current,$mta.name($1,$3)) + 1) if ($readini(spree.ini,current,$mta.name($1,$3)) > $readini(spree.ini,top,$mta.name($1,$3))) !writeini spree.ini top $mta.name($1,$3) $readini(spree.ini,current,$mta.name($1,$3)) } !writeini -n spree.ini current $mta.name($1,$2) 0 }
-
All fixed n added clicky clicky
-
Yep, done this one this morning for ya CLICK ME! ..::Commands::.. !koth [on/off] !checkdelay (area detection - can get cpu intensive) !sethouse !addclan !join !leave !house !owner !clan !kills !area ....have fun (thanx to XcR for hosting )
-
| http://www.gang-fsk.mtafrance.com/ | {FsK} | GTA Online |
MrJax replied to El sTuD`X ™'s topic in Gangs
Hehe was a good match shame we didn't put up much of a fight ..do it again sometime -
No, it wasn't - i'd guess a few months.