OpiuM. Posted July 26, 2004 Share Posted July 26, 2004 nah, i know it wasnt you, i told you i was suspended, i corrected myself, and "went on" to say rofl @ kooper lmao Link to comment
Oli Posted July 30, 2004 Share Posted July 30, 2004 ok, this is a simple script that calculates the 3d coord vector between 2 players in vc. This script requires Admin+ to be active and will not function without it being on. To use simple put the aliases anywhere in the blank parts of your script and put the !distance part under mta.command. Here is the script for under mta.command: elseif (($3 == !distance) && ($mta.admin+($1) == $true)) { if ($4 != $null) { if ($5 != $null) { distance.calc.x $1- distance.calc.y $1- distance.calc.z $1- mta.say $1 $mta.name($1,$mta.getid($1,$4)) is $round($sqrt($calc($calc(%x * %x) + $calc(%y * %y) + $calc(%z * %z))),2) Metres from $mta.name($1,$mta.getid($1,$5)) } else { mta.say $1 Syntax: !distance } } else { mta.say $1 Syntax: !distance } } Here are the aliases it links to: alias distance.calc.x { if ($gettok($mta.location($1,$mta.getid($1,$4)),1,32) < $gettok($mta.location($1,$mta.getid($1,$5)),1,32)) { set %x $calc($gettok($mta.location($1,$mta.getid($1,$5)),1,32) - $gettok($mta.location($1,$mta.getid($1,$4)),1,32)) } else { set %x $calc($gettok($mta.location($1,$mta.getid($1,$4)),1,32) - $gettok($mta.location($1,$mta.getid($1,$5)),1,32)) } } alias distance.calc.y { if ($gettok($mta.location($1,$mta.getid($1,$4)),2,32) < $gettok($mta.location($1,$mta.getid($1,$5)),2,32)) { set %y $calc($gettok($mta.location($1,$mta.getid($1,$5)),2,32) - $gettok($mta.location($1,$mta.getid($1,$4)),2,32)) } else { set %y $calc($gettok($mta.location($1,$mta.getid($1,$4)),2,32) - $gettok($mta.location($1,$mta.getid($1,$5)),2,32)) } } alias distance.calc.z { if ($gettok($mta.location($1,$mta.getid($1,$4)),3,32) < $gettok($mta.location($1,$mta.getid($1,$5)),3,32)) { set %z $calc($gettok($mta.location($1,$mta.getid($1,$5)),3,32) - $gettok($mta.location($1,$mta.getid($1,$4)),3,32)) } else { set %z $calc($gettok($mta.location($1,$mta.getid($1,$4)),3,32) - $gettok($mta.location($1,$mta.getid($1,$5)),3,32)) } } Link to comment
[TF]JoStud Posted August 1, 2004 Share Posted August 1, 2004 I can't figure this out... is there a way to determine when a player is within a certain area via XY coordinates? Such as ... alias mta.hotzone if ((404 < [X value] < 425) && (617 < [Y value] < 645)) { mta.say $1 whatever } } I've tried a few things, none of which worked. I can't figure out how to seperate the X,Y,Z values. Help would be much appreciated. Link to comment
Oli Posted August 1, 2004 Share Posted August 1, 2004 you can see how i do it in my !distance script above.. just read it Link to comment
[RT]kooper Posted August 3, 2004 Share Posted August 3, 2004 opium do you check your email account you used to sign up for the mta scripts forum, i sent you an email... sorry to keep posting off topic here but its the only way we can sort this once and for all and never hear about it again Link to comment
OpiuM. Posted August 3, 2004 Share Posted August 3, 2004 wow i havnt gone there in ages (i love turfwars ) Link to comment
Guest Posted August 8, 2004 Share Posted August 8, 2004 alias mta.pm { if ($3 == uva) { mta.uvamsg $1- } } alias mta.uvamsg { set %playerid 0 while ( $mta.maxplayers($1) > %playerid ) { if ([uVA] isin $mta.name($1, %playerid)) { mta.msg $1 %playerid $mta.name($1,$2) : $4- } %playerid = %playerid + 1 } unset %playerid } made this recently and thought other people may find it rather useful. if you havn't guessed it will send a message to everyone on the server with the clan tag that you put in it. i give people the right to change it and use it as they want to Link to comment
Si|ent Posted August 8, 2004 Author Share Posted August 8, 2004 seems to me itd be much shorter and simpler to do: alias mta.join { if ([TAG] isin $mta.name($1,$2)) { mta.msg $1 Hello farty pants! } } Link to comment
Si|ent Posted August 8, 2004 Author Share Posted August 8, 2004 Actually ignore that, i just re-read your post and realised you are doing something different to an onjoin Link to comment
Oli Posted August 9, 2004 Share Posted August 9, 2004 kev ive got 1 of them, but its MUCH more cpu friendly to not use a new alias for it. Just a suggestion, wouldnt be hard to put that alias into the existing one Link to comment
fastphp Posted August 9, 2004 Share Posted August 9, 2004 I tryed to make a new script for my server but if i do !weapon the server alway's say <(SFA)James has a Punch/Kick> Can comeone help me with this one if $3 == !weapon { if $4 == $null mta.say $1 Error - Syntax: !weapon elseif $mta.weapon($1,$4).name == knive mta.say $1 WHAAAA $mta.name($1,$4) has a knive LOOK OUT!!!! else mta.say $1 $mta.name($1,$4) has a $mta.weapon($1,$4).name } Link to comment
MrJax Posted August 9, 2004 Share Posted August 9, 2004 i dint think u could do the weapon thing...... Link to comment
fastphp Posted August 9, 2004 Share Posted August 9, 2004 Duh I did the weapon thing, maybe I must remove .name but that’s also no working. [uVA]_ZZZ if you don’t now what you talking about pls don’t say anything thanks Link to comment
Harry Posted August 9, 2004 Share Posted August 9, 2004 Simple programming knowledge: if (statement) { ; do if statement is True } else { ; do if statement is False } Just look at your if statement... if has to be if (statement) Link to comment
MrJax Posted August 9, 2004 Share Posted August 9, 2004 [uVA]_ZZZ if you don’t now what you talking about pls don’t say anything I blatantly know more than u, u cant even write 1 line ccorrect! and im positive the $mta.weapon does not work (correctly)! Link to comment
Oli Posted August 9, 2004 Share Posted August 9, 2004 mta.weapon works off weapon id NOT player id, just a hint and here is a more advanced clan PM feature. The format is: /msg clan if ($3 == clan) { if ($4 != $null) { set %playerid 0 while ( $mta.maxplayers($1) > %playerid ) { if (($4 isin $mta.name($1, %playerid)) && $mta.name($1,$2) != $mta.name($1, %playerid)) { mta.msg $1 %playerid $mta.name($1,$2) $+ : $5- } %playerid = %playerid + 1 } mta.msg $1 $2 Message delivered to all members of $4 unset %playerid } else { mta.msg $1 $2 Syntax: /msg clan } } Link to comment
MrJax Posted August 9, 2004 Share Posted August 9, 2004 yeh, dint think u could get name of weapon a person has! i did a clan pm too, i suppose urs is SLIGHTLY better! u still doin that cops n robbers one? Link to comment
Oli Posted August 9, 2004 Share Posted August 9, 2004 yeah but im waiting for 3.08 to be out before i release it. As for the weapon thing, its so simple. alias mta.kill { mta.say $1 $mta.name($1,$3) killed $mta.name($1,$2) with a $mta.weapon ($1,$4) } there is a tiny example for u, that should help clear things up Link to comment
MrJax Posted August 9, 2004 Share Posted August 9, 2004 well... i want it to show the weapon a person is carrying at the time! not wot they killed with, is this possible? i dint think it was! Link to comment
Oli Posted August 9, 2004 Share Posted August 9, 2004 no that would be ridiculous, imagine the amount of events ud need to call that efficently Link to comment
Harry Posted August 9, 2004 Share Posted August 9, 2004 That's not possible in this version EDIT: That's what i said, sorry for the double post Link to comment
fastphp Posted August 9, 2004 Share Posted August 9, 2004 ok i have now if $3 == !weapon { mta.say $1 You have a $mta.weapon($1,$2) } but if i change now my weapon i also see the message That $mta.weapon($1,$2) is now work at my script Link to comment
MrJax Posted August 9, 2004 Share Posted August 9, 2004 OMG, dont u listen! $mta.weapon(N, WEAPON ID) this does not return the weapon a player has! it returns the NAME of a weapon from the weapon ID! ...and even if it did work, that line is still wrong! Link to comment
fastphp Posted August 10, 2004 Share Posted August 10, 2004 Has someone a list from all the weapon id's ?? Link to comment
Recommended Posts