Jump to content

Custom Blips HELP


Recommended Posts

Posted

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!

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

To set it as client side, when you add the script to the meta.xml, set type="client".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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... :|

Posted
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...

Posted

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?

Posted

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

Posted

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! :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...