Jump to content

'LinKin

Members
  • Posts

    636
  • Joined

  • Last visited

Everything posted by 'LinKin

  1. Thanks arezu- I had done it this way. But yours is obviously more efficient. function refreshMoneyToGive () for i = 1, #moneyToGiveTable do table.remove(moneyToGiveTable, i) end local amount = currentPlayerCount local increase = 0 for i = currentPlayerCount, 1, -1 do amount = amount + increase moneyToGiveTable[i] = amount increase = increase + 1 end end And then I just took the money to give like this: moneyToGive[rank]
  2. I need to find the formula that gives me what I want. Which is the following: With 5 players in server: Rank 1 = $ 15 Rank 2 = $ 11 Rank 3 = $ 8 Rank 4 = $ 6 Rank 5 = $ 5 Do you notice the pattern? - Last rank will get the amount of cash corresponding to the players in the server. Then the upper rank will get the former rank's amount of cash + the number of positions climbed... Let me explain graphically because It's kinda confusing using words. Read this from the bottom to the top: Rank 1 = $ 11+4 = $ 15 Rank 2 = $ 8+3 = $ 11 Rank 3 = $ 6+2 = $ 8 Rank 4 = $ 5+1 = $ 6 Rank 5 = $ 5 I need to find out a formula for that.. Can you help me?
  3. No, yes Citizen. I've been developing this for like 1 month. And onPlayerFinishDD triggers when: Someone dies (exept when the winner of the match dies) When a player quits I think it's more efficient for DD. Because in every server of DD where they have kills script, for example if u kill a player but he quits before dying, u would not get the kill. But using this event (onPlayerFinishDD) u would not have that 'error'/bug. @Madex: I will think about more options for the formula. I have this info (money gained per event) Kill = 15 Ast.Kill = 10 +1 Min Playtime = 5 I'd need to 'adjust' the money gained by finishing the match in a certain position, so that it's more than 15.. If you have any idea just write it down, It'd be appreciated
  4. Uh, Thank you for that fast reply.
  5. It's me who would sell the script. Not buy it. I know that it's not like a biiig script anyway. But still I don't want tricky-kids to give it to others or to sell it and gain money from it.
  6. Hello, I've this: onPlayerFinishDD There I get the rank of the player. (Position when he died) I want to give some money to the player according to the position(rank) and the number of players online in the server. But I cannot find a good formula... Can someone here give me a hand with that? It really requires creativity PD: Also onPlayerWinDD Thanks.
  7. Hello, Have you ever sold a script? - How was the experience? There are a lot of people that are hmm.. (only offensive words come to my mind) and they call themselves scripters but in reality they are not. They're just selling edited scripts. (Some times just changing the meta's author because they don't have any scripting skill at all). I might sell a script, but, I want to know how can I make sure that it will not be edited or resold by the person I will sell it to. I was thinking about doing something with the server's IP & Name. Also to compile it and encrypt it using luac.multitheftauto.com Any more security? I don't want my resource to be 'leaked' (not sure if that's the correct word). Or even worse, that the person I sell it to, start to sell it around like if he/she were the owner. Do you know what I mean? Thanks, LinKin.
  8. Yea. I've done a DD kills script so it will not be so hard to do this one. Thank you guys.
  9. I'm going to try. But hm, yes one can survive a explosion. When you are on fire, and you hit an explosive barrel, your vehicle is not blown. Now in this case, for projectiles, if the projectile doesn't hit the player directly but it explodes near to it, then the player would lose some HP but not die. Hm. I think that I got what you're trying to say: onClientVehicleDamage - Save the player who caused that damage. addEventHandler("onClientVehicleDamage", root, function(attacker, weapon) if attacker and weapon then if weapon == 19 then setElementData(localPlayer, "probKiller", attacker) end end end) And then onPlayerWasted, take that stored value. Am I right?
  10. Hello, I'm using createProjectile The creator element is a player's vehicle. So, when I shoot someone and kill him, how can I display something like "LinKin has killed RandomGuy" in the chatbox? Thanks.
  11. Thanks. What has updated in the Wiki page? I cannot notice
  12. Ahhh, no I've not tried but I think you're right! Do you know which is the interval of that number? Maybe 0 < x < 1 ..?
  13. Hello, createProjectile() The starting Force.. a float between what? I tested setting it to 1 and then to 900 and it was pretty the same. Even put 0 and it was the same What is it exactly? Thanks.
  14. Eh, well. I had downloaded the 1.3.5 before it officially came up. And I was trying to connect to a server oppened by 'Host Game' in-game. So It would be like a local server?. I'm currently not in the PC I was using yesterday, but I got the same version here. Multi Theft Auto v1.3.5-release-6121.2 Copyright © 2003 - 2014 Multi Theft Auto Now, regarding to "why don't you just accept the update when the 'You must update' message appears?". Of course it will not work if you aren't connected to the internet. But when I was connected, I clicked Update button. Then it said 'Waiting to response - 25" (Countdown 25(Not sure if it was 25)). And the download became very very slow... So I didn't reach to download it. Maybe another useful information is that when I changed the minclientversion in mtaserver.conf to the latest one (1.3.5-9.06121.0) just few people I asked to try were able to download the update. But other's were shown a message saying that "There's no update currently available, Please visit http://www.mtasa.com". I changed the mtaserver.conf some time ago (before 1.3.5 came up officially)
  15. Yes. I'm now downloading one from https://nightly.multitheftauto.com/ and another one from http://www.moddb.com/mods/multi-theft-a ... ndreas-135 The last link download is a lot faster than the nightly one.. wow. and same size 20,6 MB
  16. Second time. The same error
  17. Patience has a limit ccw. I was downloading the installer from http://www.mtasa.com, and about 75% of the download it 'finished' and I clicked it, then it showed this error: http://postimg.org/image/5icbhh53x/ Hmm..
  18. Yes, damn. Just found that function. Thank you.
  19. Hi, -Edited- How come that in this MTA 1.3.5, all of a sudden, when you disconnect and click again 'Host Game' to open it again it tells you that to join this server you must update MTA... what is wrong with that ? It's happened to me twice. The 1st time I don't remember if I had internet or not (Because I start the Host Game server when I don't have internet). And this time, I was working there (Host Game server) without internet, and some hours after, I connected to the internet.. Then I had to restart the server, so I disconnected and clicked in Host Game again, and then that "error" came up saying that I had to update MTA before joining that server... Then I disconnected from the internet, restarted the PC, and tried again, but the same "error" appeared. How come is working that way?
  20. Hello, I found this on the internet, and made a little change because it wasn't working properly when R or G or B were 0. function decToHex(IN) local B,K,OUT,I,D=16,"0123456789ABCDEF","",0 while IN>0 do I=I+1 IN,D=math.floor(IN/B),math.fmod(IN,B)+1 OUT=string.sub(K,D,D)..OUT end if I > 0 then return OUT else return "00" end end function rgbToHex(r, g, b) local output = decToHex® .. decToHex(g) .. decToHex(b); return output end But now, I've noticed another problem.. If R or G or B are < 10 it fails.. For example when I try to convert R: 9 G: 255 B: 255 It returns this hex code: 9FFFF which is wrong.... Idk how to fix it
  21. Is there something wrong with the gamepanel? I'm redirected to a blank page after I login
  22. Yes it's working. And thanks for your help myonlake.
  23. So, doing it the noob way, I think I acomplished what I wanted. I'm using timers tho it's easier for me. However I will try to use tickCount. EDIT: Removed the code
  24. For example, if I do myTable[1] = nil and then I do table.insert(myTable, "some text"), would lua automatically place this in the 1st position of the table?
×
×
  • Create New...