Jump to content

arezu

Members
  • Posts

    446
  • Joined

  • Last visited

Everything posted by arezu

  1. arezu

    Functions

    You can use onClientVehicleCollision event
  2. He already solved the problem.
  3. Just a note; Its better to use setElementHealth(source, 0) in this case because if somebody is close to the afk player, they will die too.
  4. getLatentEventHandles returns the latent events triggered by the system, which means if you use it client sided, it will return all your triggerLatentServerEvents. You should instead use getLatentEventHandles and then status on that server sided right after triggering triggerLatentClientEvent and then you could triggerClientEvent the progress to the player you want to show the progress to (there are other good ways to do it too).
  5. From lua website: You can fix that by adding "%" in front of the "magic" character, like this: local result = string.gsub(theString, "%)", " ");
  6. the 4th argument is true by default, so you must have been doing something wrong before.
  7. Follow what Solidsnake suggested, you have a variable that stores your dimension the previous frame and then you compare your new dimension onClientPreRender with the variable you had stored, only then has your dimension changed and you can trigger your own event. It will only trigger once then per dimension change and server wont lag at all. You can even change the object dimension client sided if you wish, then its fully client sided.
  8. arezu

    Cache

    Yes, the file is downloaded and loaded into ram but never gets saved on the harddrive. But mind you, the scripts that has cache="false" in meta wont wait for all files to finish downloading before starting to load which means if you for example try to open a file, draw an image or replace a texture etc before onClientResourceStart has been triggered then it will fail. While if you have cache="true" (default) then it will wait for all files to finish downloading before loading the script.
  9. You know that it will only show for all players except for the player that joined right? so you need at least two players to test it.
  10. Dont expect help when you got stolen script.
  11. You can use shader to make the smoke invisible, but it will still lag. I don't think there is any way to disable smoke in mta without replacing files in your gta folder.
  12. Copying my gamemode and selling it for money? okay... if you try to sell it, then i'll give my own out for free and nobody will buy your copy.
  13. it was very easy so i made it for you http://www.mediafire.com/download/bh1zb3bwag1l63g/removePedShadow.zip
  14. That script doesn't always work correctly, here is better one: local shootTimer = nil function shoot() local vehicle = getPedOccupiedVehicle(localPlayer) if not isElement(vehicle) then return end if(not isTimer(shootTimer))then local posX, posY, posZ = getElementPosition(vehicle) shootTimer = setTimer(function()end, 3333, 1) createProjectile(vehicle, 19, posX, posY, posZ, 1.0) end end bindKey("vehicle_fire", "down", shoot) bindKey("vehicle_secondary_fire", "down", shoot)
  15. (faceplam) It's the kind of math you learn when you are less than 10 years old. Very easy.
  16. arezu

    Sprint limit

    You can try with setPedStat and change stat for stamina (22).
  17. The way it's done in my server is by using onClientExplosion to get the creator of the rocket that exploded and then getDistanceBetweenPoints3D to your own vehicle and a timer to see if you died within the time it takes for a vehicle on fire to explode (in case the explosion was not a direct hit and instead caused your vehicle to start burning). Then trigger to server for syncing. This method is not the best, but its accurate enough.
  18. ffs... timers? Use getTickCount()... It's server sided, how are you expecting him to use getTickCount() to check if one second passed without having something that runs constantly? and there is no problem with timers when there is only one timer. Also, 'i' and 'player' should which places in the loop.
  19. I forgot that getRandomPlayer doesn't loop all players. But anyways: I guess this means he wants it client sided, so getRandomPlayer wont work.
  20. arezu

    question

    False, you can use toggleControl to disable water firing and then bindKey for the same key to make it shoot bullets instead.
  21. It just hurts to see that while loop... local players = {} for k, player in ipairs(getElementsByType("player"))do if(player ~= localPlayer)then table.insert(players, player) end end local randomPlayer = players[math.random(#players)]
  22. tocolor(255, 255, 255, 255) Use this. Wont make the image tinted in any color.
×
×
  • Create New...