Jump to content

CamShake&count


Recommended Posts

1. You can do this via event onClientPlayerWeaponFire and

createExplosion 

or you can make this via function

setCameraMatrix 

2. For loop

  
for n = 1, 3 do 
 -- ... 
end 
  

Edited by Guest
Link to comment
function onClientPlayerWeaponFireFunc ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) 
    local pX, pY, pZ = getElementPosition ( localPlayer ) 
    createExplosion ( pX, pY, pZ, 6 ) 
end 
addEventHandler ( "onClientPlayerWeaponFire", localPlayer, onClientPlayerWeaponFireFunc ) 

Link to comment

1.

local text = guiCreateLabel() 

Use all arguments or write this in comments, otherwise he can understand it's normal.

2.

guiSetText(text,cont) 

count variable is number, but you should use string. ( See wiki ) So you need use tostring function.
guiSetText( text, tostring( cont ) ) 

Link to comment
Guest Guest4401
2.
guiSetText(text,cont) 

count variable is number, but you should use string. ( See wiki ) So you need use tostring function.
guiSetText( text, tostring( cont ) ) 

guiSetText automatically converts numerical value to string and displays it, so there's no need to do that actually.

9Cb9h.png

Edited by Guest4401
Link to comment

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...