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

    2. News

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    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
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
Display Name

Can someone convert this .lua mod into .net script?

Recommended Posts

Display Name
---------- SMOKING MOD ----------
function INJURED()
Wait(0)
---PLAYER_ID---
local PLAYER_ID
PLAYER_ID = GET_PLAYER_ID()
if (PLAYER_ID < 0) then Wait(0) return end
local p = {}  GET_PLAYER_CHAR(GET_PLAYER_ID(), p)  local PLAYER_CHAR = p.a
---PLAYER_ID_END
local g = {}  local char_speed = {}
while(HAVE_ANIMS_LOADED("move_injured_upper") == 0)do REQUEST_ANIMS("move_injured_upper") Wait(300)
end
GET_CHAR_SPEED(PLAYER_CHAR, char_speed)
GET_CHAR_HEALTH(PLAYER_CHAR, g)
 if(char_speed.b >= 6.5)and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "move_injured_upper", "idle") == 1)
 then TASK_PLAY_ANIM_SECONDARY_UPPER_BODY(PLAYER_CHAR, "idle", "move_injured_upper", 0.0, 0, 0, 0, 0, 1)
 Wait(500)
 end
 if(g.a <= 150)and(char_speed.b >= 0.8)and(char_speed.b <= 6.5)
 and(IS_BUTTON_PRESSED(0, 5) == 0)and(IS_BUTTON_PRESSED(0, 7) == 0)and(IsKeyPressed(1) == 0)
 and(IsKeyPressed(2) == 0)and(IS_CHAR_IN_ANY_CAR(PLAYER_CHAR) == 0)
 and(IS_CHAR_ON_FOOT(PLAYER_CHAR) == 1)and(IS_CHAR_IN_AIR(PLAYER_CHAR) == 0)
 and(IS_PLAYER_CLIMBING(PLAYER_ID) == 0)and(IS_CHAR_SWIMMING(PLAYER_CHAR) == 0)
 and(IS_CHAR_GETTING_UP(PLAYER_CHAR) == 0)and(IS_CHAR_SITTING_IDLE(PLAYER_CHAR) == 0)
 --and(IS_CHAR_STOPPED(PLAYER_CHAR) == 1)
 --and(IS_CHAR_IN_WATER(PLAYER_CHAR) == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "move_injured_upper", "idle") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "cellphone", "cellphone_talk") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "cellphone", "cellphone_text") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "cellphone", "cellphone_in") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "cellphone", "cell_text_to_ear") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "cellphone", "cellphone_out") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "upset_in_bed_idle") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "lie_on_bed_l") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "lie_on_bed_r") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_ext", "smoke_stub_out") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_scn_idles", "stand_smoke") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_spliff", "create_spliff") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "stand_eat_fastfood_2") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "buy_burger_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "eat_burger_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_server", "eat_burger_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_server", "buy_burger_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "buy_hotdog_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "eat_hotdog_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "eat_nuts_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "buy_nuts_plyr") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_plyr", "buy_drink") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_plyr", "partial_drink") == 0)
 and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]_plyr", "create_spliff") == 0)
 
 then
 TASK_PLAY_ANIM_SECONDARY_UPPER_BODY(PLAYER_CHAR, "idle", "move_injured_upper", 0.6, 0, 0, 0, 1, -2)
 Wait(500)
 end
end


function EQ_HGUN()
Wait(0)
---PLAYER_ID---
local PLAYER_ID
PLAYER_ID = GET_PLAYER_ID()
if (PLAYER_ID < 0) then Wait(0) return end
local p = {}  GET_PLAYER_CHAR(GET_PLAYER_ID(), p)  local PLAYER_CHAR = p.a
---PLAYER_ID_END
local crnt_weap = {}  local char_speed = {}
  while(HAVE_ANIMS_LOADED("[email protected]") == 0)do REQUEST_ANIMS("[email protected]") Wait(300)
  end
  GET_CURRENT_CHAR_WEAPON(PLAYER_CHAR, crnt_weap)
  GET_CHAR_SPEED(PLAYER_CHAR, char_speed)
  if(crnt_weap.a == 7)or(crnt_weap.a == 9)then
   if(char_speed.b >= 4.5)then
    if(IS_BUTTON_PRESSED(0, 5) == 0)and(IS_BUTTON_PRESSED(0, 7) == 0)and(IsKeyPressed(1) == 0)
    and(IsKeyPressed(2) == 0)and(IS_CHAR_IN_ANY_CAR(PLAYER_CHAR) == 0)
    and(IS_CHAR_ON_FOOT(PLAYER_CHAR) == 1)and(IS_CHAR_IN_AIR(PLAYER_CHAR) == 0)
    and(IS_PLAYER_CLIMBING(PLAYER_ID) == 0)and(IS_CHAR_SWIMMING(PLAYER_CHAR) == 0)
    and(IS_CHAR_GETTING_UP(PLAYER_CHAR) == 0)and(IS_CHAR_IN_WATER(PLAYER_CHAR) == 0)
    and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "holster") == 0)
    and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "holster_crouch") == 0)
    and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "reload") == 0)
    and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "reload_crouch") == 0)
    and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "move_injured_upper", "idle") == 0)
	then HGUN_FLAG = 1
	end
   end
  end
  if(IS_CHAR_SWIMMING(PLAYER_CHAR) == 1)and(HGUN_FLAG == 1)
  then TASK_PLAY_ANIM_SECONDARY_UPPER_BODY(PLAYER_CHAR, "pistol_partial_b", "[email protected]", 0.0, 0, 0, 0, 0, 1)
  HGUN_FLAG = 0 Wait(2000)   
  end
  if(crnt_weap.a ~= 7)and(crnt_weap.a ~= 9)
  or(char_speed.b < 4.5)or(IS_BUTTON_PRESSED(0, 5) == 1)
  or(IS_BUTTON_PRESSED(0, 7) == 1)or(IsKeyPressed(1) == 1)
  or(IsKeyPressed(2) == 1)
  or(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "holster") == 1)
  or(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "holster_crouch") == 1)
  or(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "reload") == 1)
  or(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "reload_crouch") == 1)
  or(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "move_injured_upper", "idle") == 1)
  or(IS_CHAR_IN_ANY_CAR(PLAYER_CHAR) == 1)
  or(IS_CHAR_ON_FOOT(PLAYER_CHAR) == 0)or(IS_CHAR_IN_AIR(PLAYER_CHAR) == 1)
  or(IS_PLAYER_CLIMBING(PLAYER_ID) == 1)or(IS_CHAR_SWIMMING(PLAYER_CHAR) == 1)
  or(IS_CHAR_GETTING_UP(PLAYER_CHAR) == 1)or(IS_CHAR_IN_WATER(PLAYER_CHAR) == 1)
  then HGUN_FLAG = 0
  end
  if(HGUN_FLAG == 1)and(IS_CHAR_SWIMMING(PLAYER_CHAR) == 0)and(IS_CHAR_IN_AIR(PLAYER_CHAR) == 0)
  and(IS_PLAYER_CLIMBING(PLAYER_ID) == 0)and(IS_BUTTON_PRESSED(0, 5) == 0)and(IS_BUTTON_PRESSED(0, 7) == 0)
  and(IsKeyPressed(1) == 0)and(IsKeyPressed(2) == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "climb_std", "fall_land") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "climb_std", "fall_collapse") == 0)
  and(IS_CHAR_GETTING_UP(PLAYER_ID) == 0)and(IS_PED_RAGDOLL(PLAYER_CHAR) == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_inair_l") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_inair_r") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_inair_l") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_inair_r") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_takeoff_l") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_takeoff_r") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_takeoff_l") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_takeoff_r") == 0)
  and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "move_injured_upper", "idle") == 0)
  then
   if(crnt_weap.a == 7)then
   GIVE_WEAPON_TO_CHAR(PLAYER_CHAR, 7, 0, 0) Wait(500)
   end
   if(crnt_weap.a == 9)then
   GIVE_WEAPON_TO_CHAR(PLAYER_CHAR, 9, 0, 0) Wait(500)
   end
   if(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "[email protected]", "pistol_partial_b") == 0)
   and(IS_CHAR_SWIMMING(PLAYER_CHAR) == 0)and(IS_CHAR_IN_AIR(PLAYER_CHAR) == 0)
   and(IS_PLAYER_CLIMBING(PLAYER_ID) == 0)and(IS_BUTTON_PRESSED(0, 5) == 0)and(IS_BUTTON_PRESSED(0, 7) == 0)
   and(IsKeyPressed(1) == 0)and(IsKeyPressed(2) == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "climb_std", "fall_land") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "climb_std", "fall_collapse") == 0)
   and(IS_CHAR_GETTING_UP(PLAYER_ID) == 0)and(IS_PED_RAGDOLL(PLAYER_CHAR) == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_inair_l") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_inair_r") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_inair_l") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_inair_r") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_takeoff_l") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_std", "jump_takeoff_r") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_takeoff_l") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "jump_rifle", "jump_takeoff_r") == 0)
   and(IS_CHAR_PLAYING_ANIM(PLAYER_CHAR, "move_injured_upper", "idle") == 0)
   then
   TASK_PLAY_ANIM_SECONDARY_UPPER_BODY(PLAYER_CHAR, "pistol_partial_b", "[email protected]", 2.1, 0, 0, 0, 1, -2)
   end
  end
end

function smoking_main()
Wait(1000)
  while true do
  Wait(0)
  INJURED()
  EQ_HGUN()
  end
end

-- start
smoking_main();

 

Basically it changes running animation for Niko when he is a holding a pistol. How hard would it be to convert this .lua mod into .net script? I have no programming knowledge.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

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

×

Important Information

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