Tete omar Posted June 20, 2012 Share Posted June 20, 2012 (edited) 1- is there any code that shake the game cam ? like the explosion's camShake ? [ CreateExplosion ] 2- i want code that count the numbers like [1] [2] [3] into a gui-label also it's on race servers Edited June 20, 2012 by Guest Link to comment
Kenix Posted June 20, 2012 Share Posted June 20, 2012 (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 June 20, 2012 by Guest Link to comment
Castillo Posted June 20, 2012 Share Posted June 20, 2012 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
Tete omar Posted June 20, 2012 Author Share Posted June 20, 2012 for n = 1, 3 do -- ... end But someone told me that setElementData can do that, right ? Link to comment
Tete omar Posted June 20, 2012 Author Share Posted June 20, 2012 Ok i give u an example .. in the race servers .. when the race start isn't numbers show up into the display ? like [ 3 ] - [ 2 ] - [ 1 ] go ... Link to comment
TAPL Posted June 20, 2012 Share Posted June 20, 2012 something like that cont = 3 setTimer(function() cont = cont -1 end,1000,3) you can find resource here https://community.multitheftauto.com - search 'countdown' Link to comment
Al3grab Posted June 21, 2012 Share Posted June 21, 2012 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) Link to comment
Kenix Posted June 21, 2012 Share Posted June 21, 2012 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. Link to comment
Al3grab Posted June 21, 2012 Share Posted June 21, 2012 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. And why is that ? Link to comment
Kenix Posted June 21, 2012 Share Posted June 21, 2012 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 Posted June 21, 2012 Share Posted June 21, 2012 (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. Edited June 21, 2012 by Guest4401 Link to comment
Kenix Posted June 21, 2012 Share Posted June 21, 2012 I tested before and guiSetText return false. Link to comment
Guest Guest4401 Posted June 21, 2012 Share Posted June 21, 2012 I tested before and guiSetText return false. Strange, it worked for me . Link to comment
Tete omar Posted June 21, 2012 Author Share Posted June 21, 2012 Thanks guys i fixed it with my self . but i got 1 more question can i change the front to " Arial Black " not the game's front Link to comment
Guest Guest4401 Posted June 21, 2012 Share Posted June 21, 2012 guiCreateFont -- to create custom font guiSetFont -- to set font Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now