ZueiraPlays Posted June 3, 2013 Posted June 3, 2013 Hello! I have a server of DayZ MTA and would like to add a panel of gender selection. It should only appear before you create an account, then, even if you die, it does not appear anymore. Preview: I do not know to create resources ... so if anyone can help me ... Male = Skin 73 and Female = Skin 287
ZueiraPlays Posted June 6, 2013 Author Posted June 6, 2013 you need that images for create like it ! Ok: Link of images: Background: http://i293.photobucket.com/albums/mm45 ... 0a5568.png Window: http://i293.photobucket.com/albums/mm45 ... e978c9.png Charecters: Male Skin: http://i293.photobucket.com/albums/mm45 ... 344d48.png Female Skin: http://i293.photobucket.com/albums/mm45 ... fb9073.png *SELECT YOUR GENDER, Male and Female he's just a text. ID and name of skins: Male skin= 73 (standart.txd and standart.dff) Female Skin= 287 (female.txd and female.dff)
mcer Posted June 7, 2013 Posted June 7, 2013 You can use it. https://wiki.multitheftauto.com/wiki/IsPedDead replaces "outputchatbox" with the code of the GUI
mcer Posted June 7, 2013 Posted June 7, 2013 You can use it.https://wiki.multitheftauto.com/wiki/IsPedDead replaces "outputchatbox" with the code of the GUI In thePlayer you need use "sourcePlayer ", This tells the Script "see if the user Is dead and what it need to do."
Spajk Posted June 9, 2013 Posted June 9, 2013 Try this: client.lua function chooseG() background = guiCreateStaticImage(0, 0, 1, 1, "background.png", true) window = guiCreateStaticImage(0.2, 0.125, 0.6, 0.75, "window.png", true,background) male = guiCreateStaticImage(0.1, 0.125, 0.2, 0.6, "male.png", true,window) female = guiCreateStaticImage(0.7, 0.125, 0.6, 0.75, "female.png", true,window) addEventHandler("onClientGUIClick", male, playerChosen) end function playerChosen() if(source==male)then triggerServerEvent("gender:setGender",localPlayer,1) elseif(source==female)then triggerServerEvent("gender:setGender",localPlayer,0) end destroyElement(background) end addEvent("gender:chooseGender",true) addEventHandler("gender:chooseGender",root,chooseG) server.lua function login(oldacc,acc) local gender = getAccountData(acc,"gender") if(gender~=0 and gender~=1)then triggerClientEvent(source,"gender:chooseGender",source) end end addEventHandler('onPlayerLogin', root, login) function setG(gender) -- 1 = male, 0 = female local acc = getPlayerAccount(source) if(acc)then setAccountData(acc,"gender",gender) end end addEvent("gender:setGender",true) addEventHandler("gender:setGender",root,setG) meta.xml <meta> <script src="server.lua "type="server"/> <script src="client.lua "type="client"/> <file src="background.png"/> <file src="window.png"/> <file src="male.png"/> <file src="female.png"/> </meta> Name your images as: background.png window.png male.png female.png I didnt test it, so I am not sure if it works.
Spajk Posted June 13, 2013 Posted June 13, 2013 http://www.mediafire.com/?l53q521il35a7qh there you go
ZueiraPlays Posted June 18, 2013 Author Posted June 18, 2013 http://www.mediafire.com/?l53q521il35a7qhthere you go Ok, the images has not bug, but I need it select the gender... Example: I clicked on male image and started the game with skin number 73, or clicked on female image and started the game with skin number 71... It is only once. If he dies no longer appears. Only when you create the account. Are you understand?
Spajk Posted June 18, 2013 Posted June 18, 2013 Well yea, it only lets you choose the first time you login with your account. When should it appear? It doesnt change the skins. If you want it to change skins, tell me the skin ID's for males and females.
ZueiraPlays Posted June 19, 2013 Author Posted June 19, 2013 Well yea, it only lets you choose the first time you login with your account. When should it appear?It doesnt change the skins. If you want it to change skins, tell me the skin ID's for males and females. Ok: 1- I enter in the server 2- The login panel appears 3- I create a account 4- The gender panel appears 5- If I click on the male image, I start with the male skin (ID 73 and name standart.txd and standart.dff) If I click on the female image, I start with the female skin (ID 11 and name female.txd and female.dff) 6- If i die, the panel do not appears, only if create a account.
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