Jump to content

How to run with weapons


UnKnownGuy

Recommended Posts

Posted

Wrong section next time post your question here, anyways you can run with weapons by changing your walking style to sneak.

Example:

-- use /sneak to chnage your walking style
function changeWalkStyle(player)
	setPedWalkingStyle(player,69)
end
addCommandHandler("sneak",changeWalkStyle)

 

  • Like 1

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
Just now, Walid said:

Wrong section next time post your question here, anyways you can run with weapons by changing your walking style to sneak.

Example:


-- use /sneak to chnage your walking style
function changeWalkStyle(player)
	setPedWalkingStyle(player,69)
end
addCommandHandler("sneak",changeWalkStyle)

 

I typed /sneak in Console and nothing happens

What I do now?

Posted

just copy and past my code server side then press T /sneak that's all.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted (edited)
Just now, Walid said:

just copy and past my code server side then press T /sneak that's all.

I did that and nothing

Please I didn't understand 

I copied that:

  1. -- use /sneak to chnage your walking style
  2. function changeWalkStyle(player)
  3. setPedWalkingStyle(player,69)
  4. end
  5. addCommandHandler("sneak",changeWalkStyle)
  6.  

Then I typed in "T" chat /sneak and nothing happened 

Edited by UnKnownGuy
Posted
4 minutes ago, UnKnownGuy said:

I did that and nothing

??? run and press E or A to switch weapon.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
4 minutes ago, UnKnownGuy said:

I wanna run with M4/AK47 and I can't run with them

I'm pretty sure you don't undrestand how to use it , np try this code client side > restart your resource > switch to M4 > then run.

addEventHandler("onClientPlayerWeaponSwitch", localPlayer, 
    function (prevSlot, newSlot) 
        if (newSlot == 5 and getPedWeapon(localPlayer, 5) == 31) then 
            setPedWalkingStyle(localPlayer, 69) 
        else 
            setPedWalkingStyle(localPlayer, 0) 
        end 
    end 
) 

 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
Just now, Walid said:

I'm pretty sure you don't undrestand how to use it , np try this code client side > restart your resource > switch to M4 > then run.


addEventHandler("onClientPlayerWeaponSwitch", localPlayer, 
    function (prevSlot, newSlot) 
        if (newSlot == 5 and getPedWeapon(localPlayer, 5) == 31) then 
            setPedWalkingStyle(localPlayer, 69) 
        else 
            setPedWalkingStyle(localPlayer, 0) 
        end 
    end 
) 

 

Copy this and past it in Console??

Posted
Just now, UnKnownGuy said:

Copy this and past it in Console??

:eek: Copy and past it client side in your resource then use /restart <resourcename>

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

Wrong section. What do you have in meta.xml? 

<script src="file.lua" type="server"/>

or

<script src="file.lua" type="client"/> -- This is client-side

?

If file.lua have in meta "client" then paste your code and use /restart <resource>

Posted

i recommend you to read all of this : Scripting introduction

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...