Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

      1. Events
    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
lolrazz

Noob help with Lua.

Recommended Posts

lolrazz

Hello.

 

I cant get the shockwave mod to work with the last lua.

 

local shockwave = {}local keyPressed = falselocal force = 60function shockwave.unload()endfunction shockwave.init()endfunction applyForce(playerCoord, entity)local coord=ENTITY.GET_ENTITY_COORDS(entity,true)local dx=coord.x - playerCoord.xlocal dy=coord.y - playerCoord.ylocal dz=coord.z - playerCoord.zlocal distance=math.sqrt(dx*dx+dy*dy+dz*dz)local distanceRate=(force/distance)*math.pow(1.04,1-distance)ENTITY.APPLY_FORCE_TO_ENTITY(entity, true, distanceRate*dx,distanceRate*dy,distanceRate*dz, math.random()*math.random(-1,1),math.random()*math.random(-1,1),math.random()*math.random(-1,1), true, false, true, true, true, true)endfunction shockwave.tick()if (get_key_pressed(Keys.Add)) thenkeyPressed = trueelseif keyPressed thenkeyPressed = falselocal player = PLAYER.PLAYER_PED_ID()local playerCoord=ENTITY.GET_ENTITY_COORDS(player,true) local Table,Count = PED.GET_PED_NEARBY_VEHICLES(player, 1)local playerVehicle = PLAYER.GET_PLAYERS_LAST_VEHICLE()local inVehicle=PED.IS_PED_IN_VEHICLE(player,playerVehicle,true)for k,v in ipairs(Table) doif(not inVehicle or playerVehicle ~= v) then-- ENTITY.SET_ENTITY_CAN_BE_DAMAGED(v,true)-- VEHICLE.DISABLE_VEHICLE_IMPACT_EXPLOSION_ACTIVATION(v,true)applyForce(playerCoord, v)endendTable,Count = PED.GET_PED_NEARBY_PEDS(player, 1,1)for k,v in ipairs(Table) doPED.SET_PED_RAGDOLL_ON_COLLISION(v,true)PED.SET_PED_RAGDOLL_FORCE_FALL(v)applyForce(playerCoord, v)endendendreturn shockwave

Can somone finde the problem?

 

Share this post


Link to post
Share on other sites
lolrazz

Noone? :(

Share this post


Link to post
Share on other sites
EdUaRdO - Brazil

Try to remove "--" from here

 

 

-- ENTITY.SET_ENTITY_CAN_BE_DAMAGED(v,true)-- VEHICLE.DISABLE_VEHICLE_IMPACT_EXPLOSION_ACTIVATION(v,true)
Edited by EdUaRdO - Brazil

Share this post


Link to post
Share on other sites
lolrazz

 

Try to remove "--" from here

-- ENTITY.SET_ENTITY_CAN_BE_DAMAGED(v,true)-- VEHICLE.DISABLE_VEHICLE_IMPACT_EXPLOSION_ACTIVATION(v,true)

 

Doesn't work. :(

Share this post


Link to post
Share on other sites
Fireboyd78

Ok, so what exactly is your problem? Is this your mod or someone else's?

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.