Tete omar Posted June 20, 2012 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
Kenix Posted June 20, 2012 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 http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Castillo Posted June 20, 2012 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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Tete omar Posted June 20, 2012 Author Posted June 20, 2012 for n = 1, 3 do -- ... end But someone told me that setElementData can do that, right ?
Kenix Posted June 20, 2012 Posted June 20, 2012 What you want? Explain please. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Tete omar Posted June 20, 2012 Author 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 ...
TAPL Posted June 20, 2012 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'
Al3grab Posted June 21, 2012 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) ING : [xXx]~Al3grab
Kenix Posted June 21, 2012 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. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Al3grab Posted June 21, 2012 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 ? ING : [xXx]~Al3grab
Kenix Posted June 21, 2012 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 ) ) http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Guest Guest4401 Posted June 21, 2012 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
Kenix Posted June 21, 2012 Posted June 21, 2012 I tested before and guiSetText return false. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Guest Guest4401 Posted June 21, 2012 Posted June 21, 2012 I tested before and guiSetText return false. Strange, it worked for me .
Tete omar Posted June 21, 2012 Author 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
Guest Guest4401 Posted June 21, 2012 Posted June 21, 2012 guiCreateFont -- to create custom font guiSetFont -- to set font
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