proracer
Members-
Posts
499 -
Joined
-
Last visited
Everything posted by proracer
-
Can you tell us what doesn't work? ( /debugscript 3 )
-
Sorry for my noob mistake (forgot 'then' to close 'if'), it's fixed now.Try again.
-
Try this: function onPlayerQuitSaveClothes() local playeracc = getPlayerAccount(source) if (playeracc) then setAccountData(playeracc, "player.clothes", getPedClothes" class="kw2">getPedClothes(source, 0)) end end function onPlayerJoinSaveClothes() local playeracc = getPlayerAccount(source) if (playeracc) then local clothes = getAccountData(playeracc, "player.clothes") if (clothes) then addPedClothes(source, clothes) end end end addEventHandler("onPlayerQuit", root, onPlayerQuitSaveClothes) addEventHandler("onPlayerJoin", root, onPlayerJoinSaveClothes) Small note: Didn't wanted to put lua code because it gives "class = kw2" bugs.
-
I think he means that he was just joking...
-
I already explained, check my post on top.
-
Can you tell us what you actually want so it's easier for us..?
-
1. getPedClothes retrieves 2 strings (clothes texture, clothes model) and also you used the wrong arguments, can't you read Wiki? It clearly says it needs ped element (which you put correctly) and integer (and you have put a string in there). 2. setPedClothes doesn't exist, you must use addPedClothes. Read a little! https://wiki.multitheftauto.com/wiki/GetPedClothes https://wiki.multitheftauto.com/wiki/AddPedClothes
-
Try something before than you can provide the code you wrote and we will try to correct your mistakes.
-
So download LUA compiler from the thread's author...
-
I didn't understood you quite well there. Maybe try this or...? http://www.javascripter.net/faq/hextorgb.htm
-
Then you should try it yourself and learn LUA language.
-
I think you should try working on more easier scripts than these.
-
Try to imagine to have 360° FOV
-
Ok thanks dude.
-
I was testing simple functions like example these ones. addEventHandler("onResourceStart", resourceRoot, blowAllPlayers, function blowAllPlayers() for i,v in iterElements("player") do if getElementHealth(v) == 0 then return false else setElementHealth(v, 0) outputChatBox("Everyone are now dead!", root, 0, 252, 255, false) end end end ) And simple one... addEventHandler("onResourceStart", resourceRoot, testFunc, function testFunc() outputChatBox("Hello World") end end ) In both says I forgot to close a bracket in first line... If it's a bug I think it should be fixed
-
Here is a nice explanation of gridlists and how to use it. https://wiki.multitheftauto.com/wiki/Scripting_the_GUI_-_Tutorial_1
-
New nitro effect is only available by replacing file in GTASA directory.You can't script that everyone will see for example pink nitro flame color.Only you can see it...
-
If you want to play sound for the killer than you can try this. function kill (killer) local sound = playSound("wasted.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onClientPlayerWasted", killer, kill) Tell me if it gives any errors.
-
Serverside: addEvent ( "onPlayerChangeVehicleColor", true ) addEventHandler ( "onPlayerChangeVehicleColor", getRootElement ( ), function ( color ) outputChatBox ( color ) local c = tonumber ( color ) setVehicleColor ( veh[source], c, c, c, c ) end ) You forgot handler , still don't know if it works..
-
Can you plz show more codes because this is just a mess in 2 lines.
-
function kill () local sound = playSound("wasted.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), kill) You did wrong because playSound is only called from clientside and you used onPlayerWasted which is Serverside.
-
Try this... function clr() for i, v in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = 5 color[2] = 3 color[3] = math.random(0,126) color[4] = math.random(0,126) setVehicleColor ( v, color[1], color[2], color[3], color[4] ) end end setTimer ( clr, 100, 0 ) addEventHandler ("onResourceStart", root, clr)
-
"46" is the ID for the sound not the pickup if you mean that.
-
Why can't you look at the Wiki for something...? https://wiki.multitheftauto.com/wiki/PlaySoundFrontEnd
-
Type /debugscript 3 and tell us your errors.
