Jump to content

CamShake&count


Recommended Posts

Posted (edited)

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

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted
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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
something like that
cont = 3 
setTimer(function() cont = cont -1 end,1000,3) 

you can find resource here https://community.multitheftauto.com - search 'countdown'

cont = 3 
local text = guiCreateLabel() 
setTimer(function() cont = cont -1 guiSetText(text,cont) end,1000,3) 

Wrong.

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted

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

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Guest Guest4401
Posted (edited)
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
Guest Guest4401
Posted
I tested before and guiSetText return false.

Strange, it worked for me :shock:.

9Cb9h.png

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