Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 Please say me what is wrong. Link to comment
proracer Posted February 13, 2011 Share Posted February 13, 2011 function onPlayerJoinLoadClothes ( ) local acc = getPlayerAccount ( source ) if acc then for i=0,17 do local texture, model = getPedClothes ( source ) if texture and model then setAccountData(acc, "clothes." .. tostring(i) .. ".texture", texture) setAccountData(acc, "clothes." .. tostring(i) .. ".model", model) end end end addEventHandler("onPlayerJoin", root, onPlayerJoinLoadClothes) function onPlayerQuitSaveClothes ( ) local playeracc = getPlayerAccount ( source ) if playeracc then for i=0,17 do local texture, model = getPedClothes ( source ) if texture and model then setAccountData(playeracc, "clothes." .. tostring(i) .. ".texture", texture) setAccountData(playeracc, "clothes." .. tostring(i) .. ".model", model) end end end end addEventHandler("onPlayerQuit", root, onPlayerQuitSaveClothes) Link to comment
Castillo Posted February 13, 2011 Share Posted February 13, 2011 is that a joke proracer? you got different functions for the same thing Link to comment
Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 Thanks, but again errors SCRIPT ERROR: save_clothes\clothes.lua:26: 'end' expected (to close 'function' at line 1) near '' WARNING: Loading script failed: save_clothes\clothes.lua:26: 'end' expected (to close 'function' at line 1) near '' Link to comment
Castillo Posted February 13, 2011 Share Posted February 13, 2011 WHAT YOU ARE DOING IS A MESS, you got the function to save them but now you need to make the one that LOADS THE CLOTHES. Link to comment
Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 This is not for load? function onPlayerJoinLoadClothes ( ) local acc = getPlayerAccount ( source ) if acc then for i=0,17 do local texture, model = getPedClothes ( source ) if texture and model then setAccountData(acc, "clothes." .. tostring(i) .. ".texture", texture) setAccountData(acc, "clothes." .. tostring(i) .. ".model", model) end end end addEventHandler("onPlayerJoin", root, onPlayerJoinLoadClothes) Link to comment
Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 I fix this erorrs and now console say me bad argument 'getPlayerClothes' Link to comment
Castillo Posted February 13, 2011 Share Posted February 13, 2011 You got the 2 functions for SAVE not LOAD. Link to comment
proracer Posted February 13, 2011 Share Posted February 13, 2011 Try this... function onPlayerJoinLoadClothes ( ) local acc = getPlayerAccount ( source ) if acc then for i=0,17 do getAccountData(acc, "clothes." .. tostring(i) .. ".texture") getAccountData(acc, "clothes." .. tostring(i) .. ".model") addPedClothes ( source, "clothes." .. tostring(i) .. ".texture", "clothes." .. tostring(i) .. ".texture", i) end end end addEventHandler("onPlayerJoin", root, onPlayerJoinLoadClothes) function onPlayerQuitSaveClothes ( ) local playeracc = getPlayerAccount ( source ) if playeracc then for i=0,17 do local texture, model = getPedClothes ( source ) if texture and model then setAccountData(playeracc, "clothes." .. tostring(i) .. ".texture", texture) setAccountData(playeracc, "clothes." .. tostring(i) .. ".model", model) end end end end addEventHandler("onPlayerQuit", root, onPlayerQuitSaveClothes) Link to comment
Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 no work [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' [2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' Link to comment
eAi Posted February 13, 2011 Share Posted February 13, 2011 How about looking at the documentation for the function that it's very clearly telling you you're using incorrectly? Link to comment
Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 It is impossible to make Link to comment
Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 Why this peds don't won't dance? function pedLoad () APed = createPed ( 178, 327.61187744141, 2478.4943847656, 17.784637451172 ) BPed = createPed ( 246, 321.29089355469, 2481.6147460938, 17.79061784668 ) CPed = createPed ( 87, 321.67388916016, 2476.1999511719, 17.784637451172 ) setTimer(setPedRotation,5000,1,APed,270 ) setTimer(setPedRotation,5000,1,BPed,225 ) setTimer(setPedRotation,5000,1,CPed,315 ) setTimer(setPedAnimation,5000,1,APed,"DANCING","DAN_Down_A",-1,true,true,true ) setTimer(setPedAnimation,5000,1,BPed,"DANCING","DAN_Left_A",-1,true,true,true ) setTimer(setPedAnimation,5000,1,CPed,"DANCING","DAN_Right_A",-1,true,true,true ) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) Link to comment
Tomek123 Posted February 13, 2011 Author Share Posted February 13, 2011 How i can do somthing like this : http://img840.imageshack.us/i/gtasa2011 ... 01521.jpg/ http://img836.imageshack.us/i/gtasa2011 ... 00210.jpg/ Link to comment
qaisjp Posted February 14, 2011 Share Posted February 14, 2011 (edited) I don't know, make it yourself? Search for it on the forums? Look on the community? If you cant type "www.forum.multitheftauto.com" or "www.wiki.multitheftauto.com" then TYPE forum.multitheftauto.com AND wiki.multitheftauto.com! IF YOU WANT TO make A GOOD server, LEARN Lua! Edited June 9, 2020 by qaisjp User has recalled this post Link to comment
Castillo Posted February 14, 2011 Share Posted February 14, 2011 That script must be "interiors" resource default with MTA, you just start the resource "Interiors" and should get it. Link to comment
Tomek123 Posted February 20, 2011 Author Share Posted February 20, 2011 How i can change stats of player? Link to comment
Castillo Posted February 20, 2011 Share Posted February 20, 2011 Muscle stats, skills, etc? if so then use: setPedStat Link to comment
Tomek123 Posted February 20, 2011 Author Share Posted February 20, 2011 I want change kills and this. Link to comment
Tomek123 Posted February 20, 2011 Author Share Posted February 20, 2011 tnx i know now how change somthing =) but how do this in admin panel? Link to comment
Castillo Posted February 20, 2011 Share Posted February 20, 2011 What? btw don't double post Link to comment
Tomek123 Posted February 20, 2011 Author Share Posted February 20, 2011 How i can change stats kill? I try change and not work: function changekills(thePlayer, commandName) -- Output whether the setPlayerStat was successful in changing the BODY_MUSCLE STAT if setPedStat(thePlayer, 121, 999) then outputChatBox("") else outputChatBox("") end end addCommandHandler("kills", changekills) 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