Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About TheMtaUser555

  • Rank
  1. thanks, that worked. I tried using string.find before but it didn't work, I guess it was because I didn't cancel the event
  2. Nothing happens when I try this ( it's supposed to remove all the HEX code ): addEventHandler('onPlayerChangeNick', root, function(oldNick, newNick) if string.find( newNick, '#%x%x%x%x%x%x') then setPlayerName ( source, oldNick ) end end ) I also tried to use gsub and then setPlayerName, put it spams the chatbox.. Any help would be appreciated
  3. I want to prevent the race mode from launching the race, until everyone finishes downloading the files. How can I do this? Is there any function that returns the download state or something? because some custom maps are really big..
  4. i've tried that, if you read it again it says: This is the point in time at which the vehicle last exploded so not really what I'm looking for, thanks for trying anyways
  5. like, when the car gets on fire..I tried on client render, and triggering it serverside, so each time it went lower than 249 of health it would set it back to 230. but it still explodes I saw something like this on a server, I think it was saes rpg, when the car was on fire, it would last for about 5 minutes and then explode
  6. I tried this, but it didn't work ( I get "nil" ) : function maxMoney() local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do currentCash = getElementData ( thePlayer, "money" ) if currentPlayer() and currentCash > storedCash then currentPlayer(thePlayer) end winner = storedPlayer end end function currentPlayer(source) storedPlayer = source storedCash = getElementData(storedPlayer, "money") end
  7. hi, I want to get the player that has the most cash, from the scoreboard. The problem is I don't know how to do it. Can someone explain or show me how to do it? please and thanks. function maxMoney() local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do tableMoney = getElementData ( thePlayer, "money" ) winnerMoney = math.max(unpack({tableMoney})) end end
  8. @Solidsnake14 got the same result (but 160/161kph this time), I guess it's bugged, or something else must be done. Thanks anyways
  9. read the wiki, it says : velocityX: the X velocity of the source before the collision took place velocityY: the Y velocity of the source before the collision took place velocityZ: the Z velocity of the source before the collision took place
  10. I got my other scripts to work, so I think it should be okay if I asked for some help here. I want to get vehicle's speed before he hits another vehicle, the problem is, it always returns the same speed (180 or 179kph), no matter how fast or slow I'm going. What I'm doing wrong here? http://wiki.multitheftauto.com/wiki/OnC ... eCollision function collision(collider,force, bodyPart, x, y, z, vx, vy, vz) if (getElementType (collider) == "vehicle") and (source == getPedOccupiedVehicle (getLocalPlayer())) then actualspeed = (vx^2 + vy^2 + vz^2)^(0.5) kmh = actualspeed * 180 ou
  11. This is the gamemode: When the crook reaches a certain distance from the cop vehicles, the server should output a message saying "Escaped". And OnClientVehicleStartEnter didn't solve the problem, because this is played on Race gamemode But thanks anyways. if anyone knows how to fix it, please help me.
  12. What about fDistance = getDistanceBetweenPoints3D ( fVehicleX, fVehicleY, fVehicleZ, fX, fY, fZ ) ? isn't it global? I need it to get the distance between the cars, I know what it does. I just wanted to output the message once, which I guess it isn't possible with the clientrender event
  • Create New...