Jump to content

Scooby

MTA Contributors
  • Posts

    976
  • Joined

  • Last visited

Everything posted by Scooby

  1. sure thats pretty easy, under mta.startrace: add this to the top. if ([DD] isin $mta.race($1) || [DM] isin $mta.race($1)) { !hadd prsstats mode $+ $replace($mta.race($1),$chr(32),$chr(45)) Deathmatch }
  2. yes, its for the total bets stats per player. The check to see if you won would be in: on *:signal:mta.finish:
  3. ok to make it easier for me to explain, i will refer to the top 3 as rank 1,2 and 3 i'll try to explain as easily as possible, just ask if u see something u dont understand alias tops { ;the line below defines all the variables needed for the loop (set to check through 32 players). var %a = 0, var %b, %loop = 32, %1 = 0, %2 = 0, %3 = 0, %x, %y, %z while (%a < %loop) { ;the line below is the variable the loop is checking, this could be anything u want to find the top 3 of. %b = $prs.points($1,%a) ;next we check if there is a player present in the current ID slot in the loop. if ($mta.nick($1,%a) != $null) { ;then we check to see if the players points are more than whats currently stored as rank 1. if (%b > %1) { ;if so, the ranks are moved down and a new rank 1 is added. %3 = %2 | %z = %y | %2 = %1 | %1 = %b | %y = %x | %x = $mta.nick($1,%a) } ;if the players rank wasnt better than rank 1 but is better than rank 2 then, elseif (%b > %2) { ; we dont touch rank 1, but we move rank 2 to rank 3 then add the new rank 2. %3 = %2 | %2 = %b | %z = %y | %y = $mta.nick($1,%a) } ;if the players rank wasnt better than rank 1 or 2 but is better than rank 3 then, elseif (%b > %3) { ; add a new rank 3 %3 = %b | %z = $mta.nick($1,%a) } } ; add 1 to the loop and start again on the next ID slot. !inc %a } ;when the loop is finished display the results in the chat mta.text $1 1st %x %1 if (%y) .timer 1 1 mta.text $1 2nd %y %2 if (%z) .timer 1 2 mta.text $1 3rd %z %3 } Any Questions, just ask and i'll reply asap.
  4. there is an installation part in the txt file 'prs 1.3 details.txt' if u follow that, changing the info 'mta-prs1.1.mrc' to 'mta-prs1.3.mrc' u should be ok. or try reading this topic a little, it has been explained a few times. if ur still stuck after reading this, post back and tell me how far ur up to.
  5. u need to put all the files in ur mIRC folder.
  6. ok in short, when u do !top , 'bla' is sent to the alias as $4 (im sure u know this ) then the $findtok line checks which it is finding the 'top' of to make sure it exists. if it does, it then sets %1 %2 %3 and %x %y %z as variables, these are gonna be ranks 1 2 3 and the names that go with the ranks. then the loop starts... then theres a bunch of lines which define %b on each cycle of the loop - this is what ur finding the top3 of then theres a few lines that check if %b is better than the current %1 %2 or %3, and if so, puts it in the relative place, then moves the previous stored data to the rank below. finally once the loop is complete, it displays the data. not really sure if this helps u, if u want, i could cut loads out and show u it as a basic version, it just looks a little more complex as it is coz its doing the top 3 of 15 commands. let me know anyway.
  7. if u take a look at the script u would see its signaled in a few places, to determine the end of a race and the winner. heres a basic example: on *:SIGNAL:mta.finish: { if ($mta.rank($1,$2) == 1) !.signal my.endrace $1 $2 } this would be the very basic version which would send the id of the player who finishes a race in rank 1 to my.endrace i have added something like this in about 3 places i think, for the various modes in prs to determine the end of the race and the winner. i hope this helps.
  8. there is already a command to give u a list of the removed maps, it saves to an ini file for you to open and manually remove them from your server. listing them in the chat could get messy, i thought it would be better this way. the command is !exportmaps, you will then get a msg saying: " Removed Maps Exported to 'removedmaps.ini' " dont forget to delete them from the list in the ini too
  9. if u dont see the dialog, type /prs into mirc and the dialog will pop up. click on the pgs tab at the top and alter the gambling duration, then click save.
  10. u can change the gambling duration in the pgs tab on the dialog.
  11. Scooby

    MTA:MA Scripting

    well with that as is it, its never gonna work, its got a lot of errors, but theyre only minor ones, give me a shout on msn and i'll help u out.
  12. Scooby

    MTA:MA Scripting

    many parts from PRS in there wont work without the other half to them, u need to change $prs.getid, either to what u have or $mta.getid, also the other bits with $prs.level etc, also the parts where it adds to the hash table will need altering if u dont have the part that creates the hash table in ur script. there are bracket errors in mta.command too, which cuts out everything after the !pmute command. finally the part with //// \\\\ will cause problems without the /* */ above and below. all in all, not looking too good
  13. u can disable the restart of the script and just have the script start a new map that isnt unknown. find: prs.restart $1 in: on *:SIGNAL:mta.startrace: { and remove that line.
  14. Scooby

    MTA:MA Scripting

    well i have written one on these forums, u should spend some time looking... i think over the years ive written almost every thing lol, its just after time, the posts get old and unused and new topics come to the front. i clicked search and looked for 'swear' https://forum.multitheftauto.com/viewtopic.php?f=30&t=19497&p=263481&hilit=swear#p263481 this topic has one... its not mine but it took only a few seconds to find
  15. Scooby

    MTA:MA Scripting

    i got no request to accept.. are u sure u added my name correctly?
  16. Scooby

    MTA:MA Scripting

    Im guessing its a server you are hosting from your pc? its not a long job to get it to work normally, as long as your ports are forwarded ok (since you used to be able to connect, im guessing its not those) check the config, make sure Admin is still enabled, youre using the correct ports for admin and client and the password is correct. if you still have no luck, If you have msn, add me: [email protected] I can help you on there a lot better than here.
  17. Scooby

    MTA:MA Scripting

    ok well try this: on *:SIGNAL:mta.join: { if ($mta.nick($1,$2) == Player) { mta.pm $1 $2 Warning: INVALID NICKNAME! .timer 1 5 mta.kick $1 $2 } } that should work.
  18. Scooby

    MTA:MA Scripting

    Mirc isnt case sensetive unless u specify it, so if they use: Player, PlAyEr, pLaYeR etc it doesnt matter, all variations of the name 'Player' will be kicked. Using === is the case sensetive version, however u shouldnt need it, using == should be fine.
  19. Scooby

    MTA:MA Scripting

    try this: on *:SIGNAL:mta.disconnect:{ if (%echo == online) /msg %echochan 13<ECHO> $mta.server($1).nick MTA:MA Disconnected! Reason: $replace($2,0,User,1,Incorrect password,2,Already connected,3,Timed-out,4,To much connections,5,Banned,6,Name in use,7,Invalid Version) }
  20. All the maps need to be with the server. The race list updater tries to retrieve any missing maps that are lost when u first connect mtama to ur server. when the script is loaded it *should* attempt to find any missing maps when u connect, however any admin can also type !updateraces to force it to recheck. u say u have 410 maps, but when u connect only 380 might be found by mtama, this script will help to update any missing maps.
  21. All the maps need to be with the server. The race list updater tries to retrieve any missing maps that are lost when u first connect mtama to ur server. when the script is loaded it *should* attempt to find any missing maps when u connect, however any admin can also type !updateraces to force it to recheck. u say u have 410 maps, but when u connect only 380 might be found by mtama, this script will help to update any missing maps.
  22. this is not a gamemode, its a script for the MTA Race mod, which gives functions to admins/members/players, records race times/stats/cash etc ive explained many times now on how to install it, theres also a text file included in the download. heres a quick rundown.. first u need mIRC (http://www.mirc.com) then u need to download mtama 4.15 (multi theft auto mirc admin by Aeron, u can find it on the forums) once u have it, follow the instructions on how to load it into mirc fill out all the info in the dialog of mtama when it pops up and connect to ur server once u have these and u can connect to ur server with mtama then ur almost there next u need to download prs1.3 and put it in ur mirc dir (unrared) then u can load it with mtama (general > scripts) once loaded, close mirc and reopen it, u should now have 2 dialogs open instead of 1 (mtama and prs) fill out the info in prs and click the save button. thats it. to gain admin from ingame u must be added to the mtaserver.conf file then login when in game. if u read all the text info that comes with all these files u should manage it. if u get stuck, repost here saying how far u got and i'll try to help u out. i dont have time right now to write a step by step guide.. so i hope this helps.
  23. this is not a gamemode, its a script for the MTA Race mod, which gives functions to admins/members/players, records race times/stats/cash etc ive explained many times now on how to install it, theres also a text file included in the download. heres a quick rundown.. first u need mIRC (http://www.mirc.com) then u need to download mtama 4.15 (multi theft auto mirc admin by Aeron, u can find it on the forums) once u have it, follow the instructions on how to load it into mirc fill out all the info in the dialog of mtama when it pops up and connect to ur server once u have these and u can connect to ur server with mtama then ur almost there next u need to download prs1.3 and put it in ur mirc dir (unrared) then u can load it with mtama (general > scripts) once loaded, close mirc and reopen it, u should now have 2 dialogs open instead of 1 (mtama and prs) fill out the info in prs and click the save button. thats it. to gain admin from ingame u must be added to the mtaserver.conf file then login when in game. if u read all the text info that comes with all these files u should manage it. if u get stuck, repost here saying how far u got and i'll try to help u out. i dont have time right now to write a step by step guide.. so i hope this helps.
  24. ok i downloaded ur script, moved some parts around and fixed a few bracket errors, most of it should work now, although theres still a few errors in ur aliases that i think u need to work on. u should remove the prs parts too, since they will only work while ur running prs. all in all the script is very basic but if u keep at it im sure ul pick it up a bit more Also, a lot more work is needed before u can really call it a working release, The Ban and VoteBan mainly. Good Luck with the rest:) on *:SIGNAL:mta.command: { var %a = $iif($4 == $null,$2,$iif($mta.getid($1,* $+ $4 $+ *) == $null,$2,$v1)) if ($3 == !time) mta.text $1 Time: $time (GMT) elseif ($3 == !date) mta.text $1 Date: $date elseif ($3 == !checkmap) mta.text $1 Found: $mta.map($1) elseif ($3 == !maps) mta.text $1 Total Maps: $mta.races($1) elseif ($3 == !name) mta.text $1 Map Name: $mta.race($1) elseif ($3 == !info) mta.text $1 W&C v1.0 Scripts! elseif ($3 == !id) mta.text $1 Map Id: $mta.races($1,$mta.race($1)) $+ . elseif ($3 == !players) mta.text $1 Total players: $mta.tot($1) elseif ($3 == !vban || !voteban iswm $3) wac.vban $1- elseif ($3 == !back) { if ($timer($+(afk,$1,$2))) { $+(.timerafk,$1,$2) off mta.pm $1 $2 You are no longer undergoing an afk check and wont be kicked. } } if ($mta.level($1,$2) >= 3) { elseif ($3 == !block) mta.text $1 Dont Block or be freezed $mta.nick($1,%a) $+ ! elseif ($3 == !kill) mta.text $1 Type /kill $mta.nick($1,%a) $+ ! elseif ($3 == !afk) { if ($mta.level($1,%a) > $mta.level($1,$2)) mta.pm $1 $2 Error- You cannot use $3 on someone with higher level. elseif (%a == -1) mta.pm $1 $2 Error - Absent ID else { mta.text $1 $mta.nick($1,%a) is undergoing an AFK CHECK and has 20 seconds to respond. mta.pm $1 %a Please write !back if you are there, 20 seconds untill kick. $+(.timerafk,$1,%a) mta.kick $1 %a } } } elseif ($3 == !addcmd) { if ($mta.level($1,$2) == 0) mta.pm $1 $2 Error: Incorrect Level elseif ($4 == $null) || ($5 == $null) || ($6 == $null) mta.pm $1 $2 Error: Do !cmdhelp for codes to use else { if ($mta.level($1,$2) > 0) && ($mta.level($1,$2) < 5) mta.pm $1 $2 $slr.inco if ($mta.level($1,$2) > 0) && ($mta.level($1,$2) >= 5) { !writeini -n slrcommands.ini command $5 $6- !writeini -n slrcommands.ini commands $5 $4 mta.pm $1 $2 Your Command Has Been Added } } } elseif ($3 == !-) { var %b = $readini(slrcommands.ini,commands,$4) if ($readini(slrcommands.ini,command,$4) == $null) mta.pm $1 $2 Error: The Command $4 Has Not Been Added Yet. if (player isin $readini(slrcommands.ini,command,$4)) && (%b == text) { mta.text $1 $replace($readini(slrcommands.ini,command,$4),player,$mta.nick($1,%a)) } elseif (player isin $readini(slrcommands.ini,command,$4)) && (%b == pm) { mta.pm $1 $2 $replace($readini(slrcommands.ini,command,$4),player,$mta.nick($1,%a)) } elseif (players isin $readini(slrcommands.ini,command,$4)) && (%b == text) { mta.text $1 $replace($readini(slrcommands.ini,command,$4),players,$mta.nick($1,%a) $+ 's) } elseif (players isin $readini(slrcommands.ini,command,$4)) && (%b == pm) { mta.pm $1 $2 $replace($readini(slrcommands.ini,command,$4),players,$mta.nick($1,%a) $+ 's) } elseif (%b == pm) { mta.pm $1 $2 $readini(slrcommands.ini,command,$4) } elseif (%b == text) { mta.text $1 $readini(slrcommands.ini,command,$4) } } elseif ($3 == !cmdhelp) { if ($mta.level($1,$2) == 0) mta.pm $1 $2 Error: Incorrect Level else { if ($mta.level($1,$2) > 0) { mta.pm $1 $2 !addcmd <pm or text> <name of the command> <what text it says> .timer mta.pm $1 $2 Codes: pm (pm the text to the player) - text (say the text in text) - player (returns a players nick ie/ DirtBikeRider) - players (returns a players nick with a s on the end ie/ DirtBikeRiders) } } } elseif ($3 == !remcmd) { if ($mta.level($1,$2) == 0) mta.pm $1 $2 Error: Incorrect Level if ($readini(slrcommands.ini,command,$4) == $null) mta.pm $1 $2 Error: This Command Has Allready Been Removed elseif ($4 == $null) mta.pm $1 $2 Error: !remcmd <cmd name> else { if ($mta.level($1,$2) > 0) && ($mta.level($1,$2) < 5)mta.pm $1 $2 $slr.inco if ($mta.level($1,$2) > 0) && ($mta.level($1,$2) >= 5) { !remini -n slrcommands.ini command $4 !remini -n slrcommands.ini commands $4 mta.pm $1 $2 The Command $4 Has Been Removed } } } } on *:SIGNAL:mta.text: { if ($3 == hello) mta.text $1 Hello PPL. elseif ($3 == hi) mta.text $1 Hi All. elseif ($3 == bye) mta.text $1 Bye Peeps. elseif ($3 == brb) mta.text $1 /me $mta.nick($1,$2) Will be Right back, Reason: $4 $+. elseif ($3 == afk) mta.text $1 /me $mta.nick($1,$2) Will be Afk, Reason: $4- $+. elseif ($3 == nickname) mta.text $1 Your Nickname: $mta.nick($1,$2) $+ . elseif ($3 == info) mta.text $1 Races: $mta.races($1) Race on: $mta.race($1) $+ . } on *:SIGNAL:mta.join: { if ($mta.nick($1,$2) == player) { mta.pm $1 $2 Please change your nick 60 seconds or automaticaly kicked. .timer 1 60 mta.kick $1 $2 mta.text $1 Nickname - Player Kicked: Not changing nick. } } on *:SIGNAL:mta.startrace: { mta.text $1 Map Started! $mta.race($1) $+ . mta.text $1 Map ID: $mta.races($1,$mta.race($1)) $+ . } on *:SIGNAL:mta.death: { mta.pm $1 $2 Auto Message: You may now grab a cola! } alias wac.vban { ;this alias needs work... im not doing it for u !hadd prstemp votenick %a !hadd prstemp voters %b mta.text $1 Type !voteb If You Want $mta.nick($1,%a) Banning. Reason: $4- $iif($4- == $null, Not Set) $+ . mta.text $1 Votes Need to ban: $ceil($calc($mta.players($1) / 2)) if ($3 == !voteb) { mta.text $1 Total Votes for banning: $numtok($hget(wacmain,bans),41) $+ / $+ $ceil($calc($mta.players($1) / 2)) wac.voting $1- } } alias wac.voting { var %a = $iif($4 == $null,$2,$iif($mta.getid($1,* $+ $4 $+ *) == $null,$2,$v1)) if ($numtok($hget(wacmain,bans),41) == $ceil($calc($mta.players($1) / 2))) { mta.text $1 Banning $mta.nick($1,%a) $+. mta.ban $1 %a } } alias wac.betting { var %a = $iif($4 == $null,$2,$iif($mta.getid($1,* $+ $4 $+ *) == $null,$2,$v1)) ; the line below needs work, there is no -1 in mta.getid, modify the line above if u need to check for absent id's if (%a == -1) mta.pm $1 $2 Error - Absent ID else { $+(.timerbet,$1,%a) mta.text $1 Place your Bets! mta.pm $1 $2 You have betted on $mta.nick($1,%a) to win, type !unbet to unbet before the time runs out! $+(.timerbet,$1,$2) off mta.text $1 No more bets! } } ;Thanks [uVA]Scooby & [uVA]Bart
×
×
  • Create New...