Tubbie
Members-
Posts
60 -
Joined
-
Last visited
Everything posted by Tubbie
-
DOH! I feel stupid Hmm... just wondering, but was it correct for DM?
-
Hmmm.. to show you what I mean: function countdown(count) if (count > 0) then outputChatBox(count, getRootElement(), 255, 255, 255) setTimer(countdown(count - 1), 1000, 0) else outputChatBox("Go Go Go!!!", getRootElement(), 255, 255, 255) end end addCommandHandler("countdown", countdown(5)) Remember, I don't know if it works, if it's correct and how to test it, it's just to give you a hand. Hope it works though, that would be nice ofcourse I'm particularily not sure about the parameters in the CommandHandler and in the Timer. Oh and I don't know how to do the ! command, so it now should work with a / hmmm... Anywayz... another option is: function countdownRec(count) if (count > 0) then outputChatBox(count, getRootElement(), 255, 255, 255) setTimer(countdownRec(count - 1), 1000, 0) else outputChatBox("Go Go Go!!!", getRootElement(), 255, 255, 255) end end function countdown() countdownRec(5) end addCommandHandler("countdown", countdown) Let me know how it goes My main concerns are using / instead of ! and using parameters
-
Hmm I guess it could be done very easily using setTimer and a recursive function with an argument containing how much secs are left and errmmm... if 0, print "GO!" or whatever LOL I don't know how to create a new command for usage in the console and I don't know how to print in the chat, but otherwise I'll write it for you LOL Damn lack of time ghehe
-
Hmmm oh yeah, you're right... wel anyway, it shows MTA has great potential so basically... he sees freeroam like errr.. some sort of lobby where you can choose games or whatever. Or even just like single player GTA with missions and stuff. Hmm, okay could be fun, but seems utopia
-
Paul_Blair is so right about freeroam! I mean, I really really really looked forward to freeroam. I've almost never played deathmatch in mta vc 0.5 and I never will play deathmatch in this new release I guess. Freeroam offers a lot more opportunities and fun. And... the RPG elements rule! Freeroam does not nessecarily have to be boring or for lamers who don't want to get there hinies shot. With the scripting possibilities and with weapons enabled, freeroam can be chaos and fun. Hmm even without weapons it's fun, except if you encounter a lot of cheating lamers with weapons which they use against you if they just stick with shooting your enemies and act as your personal bodyguard, I can live with those cheaters Hmmm I've got a lot of ideas to make freeroam even more fun and I'm willing to script. Well, now I only have to make time But anywayz, freeroam is what I was waiting for... deathmatch and stuff seem so restricted and really bounded to me... that's why I want freeroam It's just GTA where you cruise around and bash people and now you can do it with your friend and do a lot of other cool stuff LOL. It's just a matter of taste, really... I'm not a big fan of deathmatch while others are... and some people just like to race! But that's one of the strengths of MTA, cuz you can have it all!
-
Oh wait... I see the variable min is highlighted... so I think that's an operator in LUA, hmm.. why don't you try this: function balanceTeams(thePlayer) local teams = {getTeamFromName("grove"), getTeamFromName("ballas"), getTeamFromName("police"), getTeamFromName("gangster")} local counts = {} for i = 1, teams.n do counts[i] = countPlayersInTeam(teams[i]) end local pos = 1 local count = counts[pos] for i = 2, teams.n do if counts[i] < c then count = counts[i] pos = i end end setPlayerTeam(thePlayer, teams[pos]) end It should work what do you think about the algorithm? Does it make sense to you?
-
Hmm what error messages do you get? Is it syntax? Cuz I'm not sure about the syntax LOL Perhaps my arrays are not correct or I use the same variable, i, which may not be valid... I don't know well, since you asked for it, I guess you have some more LUA experience.. ghehe By the way, did you check the team names, since I was not sure of them... oh and erm... if you change it to two teams, does it work? function balanceTeams(thePlayer) local teams = {getTeamFromName("grove"), getTeamFromName("ballas")} local counts = {} for i = 1, teams.n do counts[i] = countPlayersInTeam(teams[i]) end local pos = 1 local min = counts[pos] for i = 2, teams.n do if counts[i] < c then min = counts[i] pos = i end end setPlayerTeam(thePlayer, teams[pos]) end
-
Hmm so the macrotool got me trippin LOL I think it is cool when it works, but... I'm just wondering, why can't MTA handle it by default? It's really annoying to just be able to bind different commands, I don't see why a few of the same commands cannot be bound
-
An interesting discussion about this subject can be found here
-
Hmm I'm totally new to LUA and I've never created anything in LUA yet, so here's my try... don't know if it works and stuff, so please let me know how it goes. I want to start programming in LUA and make things for MTA as well, LOL... still lacking time tho Anywayz, I think the player should join the team with the least players... in that case you will always balance as good as possible. If teams are equal, the player just joins the first team. Hmmm, forgive me, I don't know what the team names are, so I just made up a few Whatever, here it goes: function balanceTeams(thePlayer) local teams = {getTeamFromName("grove"), getTeamFromName("ballas"), getTeamFromName("police"), getTeamFromName("gangster")} local pos = 1 local min = countPlayersInTeam(teams[pos]) for i = 2, teams.n do count = countPlayersInTeam(teams[i]) if count < c then min = count pos = i end end setPlayerTeam(thePlayer, teams[pos]) end Alternatively, if you want one count call less, you may store all counts in an array beforehand... function balanceTeams(thePlayer) local teams = {getTeamFromName("grove"), getTeamFromName("ballas"), getTeamFromName("police"), getTeamFromName("gangster")} local counts = {} for i = 1, teams.n do counts[i] = countPlayersInTeam(teams[i]) end local pos = 1 local min = counts[pos] for i = 2, teams.n do if counts[i] < c then min = counts[i] pos = i end end setPlayerTeam(thePlayer, teams[pos]) end Note this script is extendible to as much teams you like... just add some teams to the teams array et voilà Good luck and let me know how it goes! Oh by the way... WHY the HELL does LUA start counting at 1? I'm soooo used to Java LOL... LUA seems kinda weird to me, but I'll live
-
Oh cool! So it's an external program.. hmm, worth a try, definately Yeah.. I can also ask the serveradmin LOL... hmm great ideas! Thx guys
-
Err... macrotool? What do you mean? I really feel stupid now cuz it must be something really basic Thx for your reply btw
-
Hmm... but wont you get a lot of syncing issues? It will be like... bullettime for you and normal speed for the rest. This is a problem which has never been solved, so I doubt it will work clientside. But IF it works, I'm very interested in how this works LOL Oh and the adrenaline pill... haven't seen it, but now you mention it... yeah that wuz so cool in MTA 0.5! It's scriptable though
-
Hi guys! I have a small question... in freeroam, you can customize CJ with addclothes and removeclothes and setstat and stuff. Currently, I have to type all these commands again and again when I join a server... and that kinda sucks. Now I know how to bind commands to a key and I know how to bind different commands to the same key, but you cannot bind 2 or more of the same commands to a key. How can I customize my CJ with my standard gear by pressing one button? This is what works: bind x setskin 0 bind x removeclothes 0 bind x addclothes 1 cornrowsb cornrows bind x setstat 23 999 but... I want to add some more clothes and stats, and when I try to bind another addclothes command, it says it's already bound... that sucks is there any workaround?
-
Hmm, yeah that would be kinda annoying, but perhaps it is possible to make it just another game mode, so you know what to expect... or otherwise implement it in freeroam LOL it's up to the server admins, they can ofcourse decide whether to use DBZ-style action or not hmm I'm lookin' forward to flying and using special powers I would like to start scripting tho, only have to do a lotta school stuff, so it's gonna take a while
-
Yeahhh especially if some scripter creates an awesome Dragon Ball Z mod so we can all kamehameha eachother and stuff... or whatever... just imagine the cool chases! And shootouts from left, right, front, back, up and down... YEAH That would be madness... LOL
-
Maybe you should have a look at this article I came across today http://en.wikigta.org/index.php/Hidden_ ... s_universe
-
Hi there!!!! LOL I came across a really cool mod which makes cj able to fly.. and some other things, but anywayz, that flying is soooo cool! Could be an idea for some LUA programmer with spare time LOL.. would be super cool to just take off in freeroam... I guess it can be done with setpos commands... and well, you can adjust speed (like.. pos increment ) so.. it wouldnt be that hard i guess... only you have to load in some flying pose and maybe you have to play that windy sound when you fall from the sky Hmm, heres a vid on youtube.. that flying really works well https://www.youtube.com/watch?v=Ntv25bz1rLE Fly my precious, fly!!! this is soooo much better than crappy ol' jetpack LOL
-
In addition, it would be very cool to use in certain game modes! For instance, you cannot see your enemy's name or you can play hide and seek or whatever Or otherwise, you can use it if you want to record a cool video but without the player names (or maybe even without the whole hud)
-
Nice nice nice LOL that would be a relief... this means less unfair kickvoting great idea!
-
Great idea kemeros! In that way, you perhaps make things less easy for after-kick-comebacks to votekick their kicker
-
Nah its not a skin... in freeroam you just set your skin to something you like, and after a while that skin doesnt show up anymore and you will get this kind of messed-up skins in return! I have had a CJ spider and some sort of white shirt spider so far but... it's not like, you spawn a CJ skin and it gets spidered... I like to play with them hookers LOL... so I spawn a hooker skin and then I get a CJ spider... hmmmm
-
Cool.... nice overview!! Perhaps you could post some screenies of the underwaterworld too in freeroam? Sometimes you can get underwater if you jump far enough... and you can exit your vehicle and walk around only entering is not possible anymore, but you can have your own scuba party
-
Hi there! Today, we had some problems with a VERY annoying racist on a server, who we had to kick constantly... well, somethimes this poor fella changed his name, but he was easily recognized due to his behaviour. However, when he changed his name to a name ending with a space, we were unable to kick him! Or to warp to him or whatever... the functions cannot handle names with spaces this has to be fixed I guess, otherwise everyone who wants to terrorize servers just puts spaces in his name Cia0wzZ!!
