Jump to content

Scooby

MTA Contributors
  • Posts

    976
  • Joined

  • Last visited

Everything posted by Scooby

  1. on *:SIGNAL:mta.command:{ if ($3 == !seen) { if ($4 == $null) mta.pm $1 $2 Error: please specify name. elseif ($readini(seen.ini,seen,$4) == $null) mta.text $1 $4 has never been seen in this server. else mta.text $1 $4 $+ : last seen $readini(seen.ini,seen,$4) } } on *:SIGNAL:mta.part:{ !writeini -n seen.ini seen $mta.nick($1,$2) $time $date } if ur trying to do it in SA, it should look like this^ it might help if u paste me what u have, or the error ur getting.
  2. Thats sounds a bit extreme, once u have them u dont lose them until ur admin is reconnected, so theres no need to keep rechecking once u have them all. if ur happy with the way urs works, u could always add a line to check if any are missing b4 it updates, then once u have them all it wont keep checking over and over for no reason.
  3. I still see a bug Oh, and u should add a line on mta.part to end the votekick. Do u think just 50% of the votes is a good idea If ur happy playing in a server all alone, checking out some nice new maps, just chilling around and some random person joins, !votekick and ur gonna be out.
  4. Well i didnt try it, but it does say: if this is true, then its another way to retrieve the lost mapnames, if not, i blame the servers i got a friend to switch hosts coz he was getting loads missing, even after using the racelist updater, now he has none missing.
  5. From what i can see, theres a few bugs in the script. In SA, mta.getid doesnt return -1 for unknown, it returns $null. Theres a few other bugs in there too, /me slaps lil_toady. it should still kinda work. Id Fix it, but its toadys script, i'll let him sort u out
  6. There's no way to know how many packets u will lose on connect, the number will always vary. however, mine was always ok with under 175 maps. There are 2 scripts on these forums that i know of that will reduce/eliminate lost maps, so if ur having problems still, maybe u should try some of these other options. http://forum.mtavc.com/viewtopic.php?t=19281 http://forum.mtavc.com/viewtopic.php?t=19162 Next time u might want to ask new questions in new topics
  7. OK im working on the !top3 command, also with the fix of a few minor bugs and extras, i'll be posting the next update as 1.1 shouldnt be long. *EDIT* Working on: !top3 - 1st 2nd 3rd races finishes deathmatches dmwins points times !votekick - which can be enabled/disabled via the dialog. Fixed 'Player' kicking bug. Fixed several minor bugs and altered some of the displayed text, to try to cut down on spam. Any other requests/suggestions before i upload this as 1.1?
  8. Nice work, looks like uve spent some time on it too.
  9. Np, wrote it ages ago and handed it out on msn to plenty of people back in the 0.5 days. u just have to remember the few minor changes in SA scripts, but basically its pretty much the same.
  10. no, u cant stop it once its started. Just try to remember not to start a new map untill its completely finished counting.
  11. I wrote this a year or so ago back in '0.5', ive added a few notes to the bottom for the the updates in 'mtasa:race' I know noone asked for it, but if anyones interested in learning some basic scripting, this should help. scripting help by [uVA]Scooby. Written for mtavc 0.5 (see notes at bottom) over the last few yrs people have been asking for help with scripting, since there is no proper tutorial for mta scripting i know in the beginning it can be kinda hard. some have picked up the basics and need help with harder stuff, some dont know a thing. heres a little something i thought id write for anyone wanting to understand it more. its very basic stuff, but should help you on your way to making you first script. scripts are written into a text file in .mrc format - some people use mirc script editor, some use notepad and some use other programs - to be honest, it doesnt really matter as long as u can type and save as .mrc ok i will show u an extremely basic script, then explain a few things about it. on *:SIGNAL:mta.command:{ if ($3 == !moo) mta.say $1 $mta.name($1,$2) says moooooooo! if ($3 == !hp) mta.msg $1 $2 Your Health is at $mta.health($1,$2) $+ % } so there we have it... thrilling eh. ok the first line 'on *:SIGNAL:mta.command:{' this is where all the stuff u type with a ! is looked at. ok so, by typing !moo it displays in the chat '[uVA]Scooby says moooooooo!' $mta.name($1,$2) is what we use to return the name of the person who typed the info. and by typing !hp we get a pm telling us our health. mta.msg is used for this. $mta.health($1,$2) is what we use to return the health of the person typing the info after comes $+ this is used to remove the space between text if it wasnt used it would show as 100 % rather that 100%. finally, its finished with a } you will find that these are very important. when a { is used it must always be finished with a } also note, when sending a pm its a little different to mta.say the $1 $2 and $3 may look a little confusing to you. i'll explain what they do as easily as poss. $1 = Server $2 = PlayerID $3 = the first word u type $4 = the second word u type $5 = the 3rd word u type... and so on u can also use a minus sign after, this is the same as saying 'the rest of the info' $3- = the first word and all the words that come after the first word. so if u wanted to find out if the word 'moo' was bein typed, you would use: if (moo isin $3-) ok that should have been easy enough for you to follow - if not - give up. there is a list of all the identifiers in the scripting help files that came with mtama. please remember when writing a script, there is always more than one way to do it, if ($3 == !moo) mta.say $1 $mta.name($1,$2) says moooooooo! if $3 == !moo { mta.say $1 $mta.name($1,$2) says moooooooo! } if ($3 == !moo) { mta.say $1 $mta.name($1,$2) says moooooooo! } if ($3 == !moo) { mta.say $1 $mta.name($1,$2) says moooooooo! } all these lines will work.. however, the top one is the most common. ok so we're still doing really really basic stuff - lets make it more interesting by adding a variable var %a = $iif($4 == $null,$2,$mta.getid($1,$4)) looks complicated huh... ok i'll explain the line. $iif is commonly used however at this stage i'll just briefly explain what it does. $iif(1 == 2,yes,no) would return no or $iif(1 == 1,yes,no) would return yes so lets take our line: $iif($4 == $null,$2,$mta.getid($1,$4)) it says if $4 == $null, $4 is our second word, $null means 'empty', $2 is the ID who typed it, $mta.getid is an alias that finds a name from a number or part name so basically it says: if the second word is empty, use your ID, else get the ID from the name given. On *:SIGNAL:mta.command: is an alias - it contains whatever u choose. These are commands that begin with ! very soon you will be making your own alises, however, mtama has several aliases that come with it, which we will be using for now. so if we use the 'var %a =' line within our previous commands we can make it do a lot more.. here it is again. on *:SIGNAL:mta.command:{ var %a = $iif($4 == $null,$2,$mta.getid($1,$4)) if ($3 == !moo) { if ($4 == $null) mta.say $1 $mta.name($1,$2) says moooooooo! else mta.say $1 $mta.name($1,$2) says mooooooo to $mta.name($1,%a) } if ($3 == !hp) { if ($4 == $null) mta.msg $1 $2 Your Health is at $mta.health($1,$2) $+ % else mta.msg $1 $2 $mta.name($1,%a) $+ s health is at $mta.health($1,%a) $+ % } } ok now u can see we've introduced an 'else' so we ask... is $4 empty? - is there a second word? if there is no second word... do this, else do this you will find that if u add this script, it will work, but it still has one fault. your probably confused enough so i will just explain. the alias mta.getid does just that, it gets the id number, from the name u typed. so if u type !hp bob, it looks thru all 26 players for the word bob if bob is not there it returns -1 if bob is there it returns the id number if u specify the id number, eg !hp 4 - it looks to see if id 4 is used, and returns -1 if the slot is empty so we need to add another few lines to our script just in case someone types !hp bob, and bob isnt there. here it is. on *:SIGNAL:mta.command:{ var %a = $iif($4 == $null,$2,$mta.getid($1,$4)) if ($3 == !moo) { if (%a == -1) mta.msg $1 $2 Error: Invalid Name/ID. elseif ($4 == $null) mta.say $1 $mta.name($1,$2) says moooooooo! else mta.say $1 $mta.name($1,$2) says mooooooo to $mta.name($1,%a) } if ($3 == !hp) { if (%a == -1) mta.msg $1 $2 Error: Invalid Name/ID. elseif ($4 == $null) mta.msg $1 $2 Your Health is at $mta.health($1,$2) $+ % else mta.msg $1 $2 $mta.name($1,%a) $+ s health is at $mta.health($1,%a) $+ % } } ok almost complete... however there is still more we can add. at the moment the script contains 2 commands, the first looking for the word !moo, and the second !hp, but if we type !moo then we're obviously not typing !hp. so by adding 'else' to the second command, will just about do us. its not majorly important and will work fine without it, but if you have 200 commands, it has to check all 200 every time a ! is used in the chat. if you have a big script this can slow things down. so the final script should look like this: on *:SIGNAL:mta.command:{ var %a = $iif($4 == $null,$2,$mta.getid($1,$4)) if ($3 == !moo) { if (%a == -1) mta.msg $1 $2 Error: Invalid Name/ID. elseif ($4 == $null) mta.say $1 $mta.name($1,$2) says moooooooo! else mta.say $1 $mta.name($1,$2) says mooooooo to $mta.name($1,%a) } elseif ($3 == !hp) { if (%a == -1) mta.msg $1 $2 Error: Invalid Name/ID. elseif ($4 == $null) mta.msg $1 $2 Your health is at $mta.health($1,$2) $+ % else mta.msg $1 $2 $mta.name($1,%a) $+ s health is at $mta.health($1,%a) $+ % } } there you have it. you made your script. this is still very basic, but by now you should be starting to understand it. if u dont fully understand what u just did start again. dont copy and paste what i wrote, type it out so u get used to it. now by looking at mtama scripting help you can find a list of other identifiers u can use. so far we have used just 3 - $mta.name, $mta.health and $mta.getid the $ at the beginning of these points to an alias within a script - the ones we have used are writtin into mta.mrc, they return information sent from the second part of it, we used ($1,$2) and ($1,%a) we sent the alias $2 and %a and it returned the info on each. ----------------------------------------------------------------------------------------------------- writing to .ini files. ok so u need info saving to a file. lets start with something basic. on *:SIGNAL:mta.command:{ if ($3 == !seen) { if ($4 == $null) mta.msg $1 $2 Error: please specify name. elseif ($readini(seen.ini,seen,$4) == $null) mta.say $1 $4 has never been seen in this server. else mta.say $1 $4 was last seen on $readini(seen.ini,seen,$4) } } on *:SIGNAL:mta.part:{ !writeini -n seen.ini seen $mta.name($1,$2) $time $date } there we have it. as people leave your server - their name is written to a ini file with the time and date. and by typing !seen it looks through the ini file for the name u specified and retuns the info stored, if none is found says they have never been seen here. inis are a simple way of storing information in text format - it can be easily opened and viewed by you if the ini is going to be small - just a few lines, the -n is not needed, but i would reccomend it. !writeini -n so inside the ini you have sections you can have as many as you like within 1 ini. however, try to keep them as small as possible. so our ini is called seen.ini, inside it we have [seen] bla=time and date last seen moo=time and date last seen bob=time and date last seen and to read this info $readini( , , ) this will return the info stored it will return $null if nothing is stored for the name u gave. so if u typed !seen bob it looked in the ini called seen.ini it looked for the section called seen it then looked down the list the the name 'bob' and returned the info stored. ok so we can add this to your script. it should look like this now. on *:SIGNAL:mta.command:{ var %a = $iif($4 == $null,$2,$mta.getid($1,$4)) if ($3 == !moo) { if (%a == -1) mta.msg $1 $2 Error: Invalid Name/ID. elseif ($4 == $null) mta.say $1 $mta.name($1,$2) says moooooooo! else mta.say $1 $mta.name($1,$2) says mooooooo to $mta.name($1,%a) } elseif ($3 == !hp) { if (%a == -1) mta.msg $1 $2 Error: Invalid Name/ID. elseif ($4 == $null) mta.msg $1 $2 Your health is at $mta.health($1,$2) $+ % else mta.msg $1 $2 $mta.name($1,%a) $+ s health is at $mta.health($1,%a) $+ % } elseif ($3 == !seen) { if ($4 == $null) mta.msg $1 $2 Error: please specify name. elseif ($readini(seen.ini,seen,$4) == $null) mta.say $1 $4 has never been seen in this server. else mta.say $1 $4 was last seen on $readini(seen.ini,seen,$4) } } on *:SIGNAL:mta.part:{ !writeini -n seen.ini seen $mta.name($1,$2) $time $date } ini's can be very handy to use when beginning with scripts, people have big ideas and this is an easy way to store info. this can be adapted now to save any info u want to save. good luck and keep at it:D NOTES: These are the changes in the different versions. MTA0.5 -> MTASA:Race mta.name -> mta.nick mta.say -> mta.text mta.msg -> mta.pm mta.health -> Not Added
  12. if ($3 == !redo) mta.startrace $1 $mta.races($1,$mta.race($1))
  13. well spotted, and driver2 pointed out how to fix, i'll update the link when ive add the extras. i think if u do also want a !top to work for all players ever, some people might not want to see these on the same command, i'll look into making a seperate command to do this. like sometimes if theres around 10 of u in the server and u type !top best u want to see who has the best time out of u lot in the server. but i'll look into it and see what extra stuff i can make global. i know some things might not be as easy to find out. some people use lots of maps, thus making the while loops very big. but i'll see what i can do. and let u know when i make the changes. EDIT: ok im looking into this !top3 global command, would be nice to know exactly which top 3 u want me to add, i dont wanna just add every stat 3 times, if theyre not gonna be used. im guesing ur after the top 3 best times, like i have on my server, anything else?
  14. Ok, i got ur PM... i never normally check them lol ok.. i think i can do this for u. leave it with me. im due to go on holiday on wednesday, for 6 days, so it looks like it'll be when i get back. i doubt i'll have time b4 i go, lots of stuff to finish off still. hope this is ok.
  15. Sounds a lot of work, just to have wave style dm maps, its almost the same as a dm map with respawns, what ur asking would work for both i think. but i think it would be better to stick with no respawns on dm maps personally. i know u get constant play for all players, but being the last man standing is always nice. If u do decide u wanna go ahead, ul have to post what u have so far, what script u run etc. EDIT: just read ur pm and replied to it in the PRS section.
  16. Seems everything is going ok for everyone on the servers that i know of running the PRS, Still no requests on here for any extra things adding tho. ive helped a few out on msn to change/add things but, Im sure i didnt add EVERTHING u could need. I know i added lots but feel free to ask for any other things i might have missed out.
  17. Scooby

    Still waiting

    how about a list of things uve already added, then i can suggest things u dont have.my VC script has everything i could think of, im sure u dont have some stuff that i added
  18. Scooby

    hello =)

    U should tell tham that this script is for use with GUS, also, shouldnt u have a command for seeing the wins? or is this already added to the GUS?
  19. Ah, thats nice so i dont have to type in all commands again. Does this work in mtavc version to? There is no mta.mute in VC so it wont work, however, u could change it slightly to make it kick the player. by changing: mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 to: mta.msg $1 $2 Warning - Do Not Spam In This Server! mta.kick $1 $2 this should work.
  20. They are the commands added to the GUS, some of the commands are in other scripts. people make their own stuff. maybe u should read the posts b4 u reply to them. or did u just go into every topic and post something?
  21. Okay this is final version of my f*cking awesome script: on *:SIGNAL:mta.command: { if ($3 == !hello) { mta.say $1 $mta.name($1,$2) : Hello all! } } All those scripters are waiting for that? This is f*cking funny ''FINAL VERSION RELEASED HOHOH'' So... this is it =D bit rough, but yes... much better personally, i would have done: on *:SIGNAL:mta.command: { if ($3 == !hello) mta.say $1 $mta.name($1,$2) $+ : Hello all! }
  22. better, but u still left the } at the top
  23. No it wouldnt work... how could it? u used commands from 2 different versions of mtama. if ur using it on SA then there is no mta.say, and if ur using it on VC, then there is no mta.nick. u cant use both. dont post scripts thinking people will spot ur mistakes. some people dont know how to script, thats why they ask their questions here. so dont assume people will just delete brakets that u added, 'because u like it'. It cant work - wont work - doesnt work. So dont tell lies.
  24. I have a Spam checker in The PRS script, in hash, however it should work okish in an ini, i havent tested this, but it should be ok. alias spamcheck { if ($readini(spamtemp,id,$1 $+ $2) == spam) { mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 } !writeini spamtemp id $1 $+ $2 spam .timerspam $+ $1 $+ $2 -m 1 900 !remini spamtemp id $1 $+ $2 } also, add to ur first line of mta.text and mta.command, spamcheck $1- the 900 is the delay in miliseconds, if ur not happy with the time, u can change this number, but i tested it in my script and it seemed ok.
×
×
  • Create New...