Xabache Posted January 12, 2015 Share Posted January 12, 2015 I found and modified the Skin chooser in the GUI but was disappointed to see that on spawn the skins i had ejected were still coming up. How to harmonize the two? where is the on spawn skin file located? Link to comment
Et-win Posted January 12, 2015 Share Posted January 12, 2015 it's handy to post the link of the resource from out of the community. Link to comment
Xabache Posted January 12, 2015 Author Share Posted January 12, 2015 Pardon my lack of specifics, i do speak of stock MTA 1.4 with GTA 1.0. I have modified skins.xml in freeroam to not allow various skins to be chosen through the F1 GUI, but on spawn, when they first join the room or after death my list is not referenced and all skins show up. I want to use my short list as the on spawn list to limit some of these skins. I do not know where this on spawn list is kept in MTA or referenced from GTA but replaceable by MTA? Link to comment
Et-win Posted January 12, 2015 Share Posted January 12, 2015 Without resource we can't help you........ PS: You can better post this in the scripting area. Link to comment
Xabache Posted January 13, 2015 Author Share Posted January 13, 2015 There is no resource to say, i am dealing with totally stock MTA. First join, no changes to anything, you spawn as a random person, from what list within stock MTA does this skin choice come from? Link to comment
Et-win Posted January 13, 2015 Share Posted January 13, 2015 Which gamemode? Because in RACE it's different as well............ That's why I said which resource. If you mean the PLAY gamemode, then you can clearly see this in 'broph.lua': repeat until setElementModel(player,math.random(312)) This is the code where it takes a random skin. If you mean the skins list in the PLAY gamemode by browsing F1, then you could see in the PLAY gamemode in 'meta.xml': <include resource="freeroam" /> <include resource="spawnmanager" /> So then if you check both resources, you will find in the FREEROAM resource the 'skins.xml' file. Link to comment
Xabache Posted January 14, 2015 Author Share Posted January 14, 2015 Yes! This is what I could not find, and I must say i was looking right at it. So this spawns skins 1-312 "randomly". What I would like to do then is use this random number after it passes through a while loop checking it for its own limitations If I could write this in mIRC with a little obvious lua snuck in I would say while (!%rand) { var %try = math.random(312) if (!$istok(242 311 45 142,%try,32)) { var %rand = %try } } where it would check its random number is not the skin numbers i wish to exempt from random spawn: 242 311 45 142, but as soon as it is say 56 or 63 it would let it pass. So what might i need to know to do this here... function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(312)) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end 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