.:HyPeX:. Posted February 9, 2015 Posted February 9, 2015 Hello everyone, so far i'm trying to understand a bit things on how to customly load resources. My question so far is how to retrive the .mp3 files loaded in the meta. XML Atributes maybe, but how? Thanks HyPeX My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
Gallardo9944 Posted February 9, 2015 Posted February 9, 2015 check nodes called "file", take attributes called "src" and check their extension. Code Debugger - Minimalistic MTA debug line replacement
.:HyPeX:. Posted February 10, 2015 Author Posted February 10, 2015 check nodes called "file", take attributes called "src" and check their extension. how do i check their extension? Split by the . and then check for the rest? (Or find by .mp3?) My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
Tomas Posted February 10, 2015 Posted February 10, 2015 An example: local filepath = "songs/rock.mp3" local filepath = string.gsub(filepath,"songs/","") local songName = gettok(filepath,1,string.byte('.')) local songExtension = gettok(filepath,2,string.byte('.')) print(songName) -- > rock print(songExtension) -- > mp3 Currently developing for International Gaming Community - Join us!
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