RoadRageRR Posted June 2, 2013 Share Posted June 2, 2013 Ok, so I just found this great resource: https://community.multitheftauto.com/index.php?p= ... ils&id=960 but it seems, either I am a dumbass (which is very well possible), or you have to be an expert at this.... All im looking to do is create a blip at (1911, -1776) .... idk how to even start... do you put the code in the custom blips .xml file? or do you make your own resource? I tried putting it in the .xml that came with the script but it didnt work and yes the icon.png was in the folder with it... here is what i used from the documentation page... addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), function() exports.customblips:createCustomBlip ( 1911, -1776, 45, 45, "icon.png") end ) any help would be great! Link to comment
Castillo Posted June 2, 2013 Share Posted June 2, 2013 Create a new resource, then put that code on a script file, then make a meta.xml for it and set it as client side, then start it, make sure "customblips" resource is already started. Link to comment
RoadRageRR Posted June 2, 2013 Author Share Posted June 2, 2013 how do you make it "client"? and when i did that, i get an error in the console saying "resource cannot be found... Thank you SO much for your help. Link to comment
Castillo Posted June 2, 2013 Share Posted June 2, 2013 To set it as client side, when you add the script to the meta.xml, set type="client". Link to comment
RoadRageRR Posted June 2, 2013 Author Share Posted June 2, 2013 so, this? <meta> set type="client" addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), function() exports.customblips:createCustomBlip ( 1911, -1776, 45, 45, "icon.png") end </meta> i still get the "Resource could not be found error" is there still a fundamental underlying thing that I am forgetting? the only things i have in the resource i created it the icon and the xml... and i am starting the customblips resource before my own, so that cant be it... Link to comment
Castillo Posted June 2, 2013 Share Posted June 2, 2013 No, you got me wrong, read this manual: https://wiki.multitheftauto.com/wiki/Resources Link to comment
RoadRageRR Posted June 2, 2013 Author Share Posted June 2, 2013 No, you got me wrong, read this manual:https://wiki.multitheftauto.com/wiki/Resources Ok I read it, but I am still at a loss.... I am clueless man.. I have 1 yr java and 3 mos javascript which this resembles but I still have no Idea what Im doing.... you guys just seem to know it or something haha... Im still at a loss on how to set it as client, even though I read that section about it, it didnt give any examples... sorry for the trouble... Link to comment
darkdreamingdan Posted June 2, 2013 Share Posted June 2, 2013 Try the Scripting introduction: https://wiki.multitheftauto.com/wiki/Sc ... troduction Link to comment
RoadRageRR Posted June 3, 2013 Author Share Posted June 3, 2013 Try the Scripting introduction:https://wiki.multitheftauto.com/wiki/Sc ... troduction ok, that helped a little... i now have this: <meta> <script src="client.lua" type="client" /> addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), function() exports.customblips:createCustomBlip ( 1911, -1776, 45, 45, "icon.png") end </meta> where do I go from here? What do i need to put in my lua file? Link to comment
iPrestege Posted June 3, 2013 Share Posted June 3, 2013 You must put the function's at the lua file . Link to comment
Spajk Posted June 3, 2013 Share Posted June 3, 2013 client.lua file addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() exports.customblips:createCustomBlip ( 1911, -1776, 45, 45, "icon.png") end) meta.xml <meta> <script src="client.lua" type="client" /> <file src="icon.png"/> </meta> that should work Link to comment
RoadRageRR Posted June 3, 2013 Author Share Posted June 3, 2013 Hey, thanks man! Works like a charm! Im sorry for the trouble, but this is why I love this community, because you guys are very good and like to help! Have a nice day! Link to comment
Spajk Posted June 3, 2013 Share Posted June 3, 2013 No problem, everyone needs help sometimes. 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