Jump to content

Blips in .lua


Mooza

Recommended Posts

Posted (edited)

Hello guys, I need some help about scripting. I have a race map, and I would like to put a few blips on the map. I want to make it visible for all players. I have tried something in the .lua file, but it doesnt work in the game.

Here is that I have done:

function resource_starts_1 () 
creatBlip ( 4262.7416992188, -1555.828125, 43.400787353516, 3, 2, 0, 0, 0, 255, 0, 99999.0 ) 
creatBlip ( 4651.177734375, -1554.4113769531, 25.819654464722, 11, 2, 0, 0, 0, 255, 0, 99999.0 ) 
creatBlip ( 5051.4858398438, -1583.2768554688, 57.828727722168, 23, 2, 0, 255, 0, 255, 0, 99999.0 ) 
creatBlip ( 5006.5146484375, -1283.5164794922, 85.884986877441, 33, 2, 0, 0, 0, 255, 0, 99999.0 ) 
creatBlip ( 4856.8994140625, -1413.4611816406, 85.478088378906, 41, 2, 255, 0, 0, 255, 0, 99999.0 ) 
creatBlip ( 4680.8935546875, -1610.9580078125, 104.85077667236, 48, 2, 0, 0, 0, 255, 0, 99999.0 ) 
creatBlip ( 4667.119140625, -1711.8497314453, 110.76747131348, 53, 2, 0, 0, 0, 255, 0, 99999.0 ) 
end 
addEventHandler ( "onClientResourceStart", getRootElement(), resource_starts_1 ) 

Can you tell me what did I do wrong or what is needed yet?

Edited by Guest
Posted

<meta> 
    <script src="blips.lua" type="server"/> 
</meta> 

  
createBlip ( 4262.7416992188, -1555.828125, 43.400787353516, 3 ) 
createBlip ( 4651.177734375, -1554.4113769531, 25.819654464722, 11 ) 
createBlip ( 5051.4858398438, -1583.2768554688, 57.828727722168, 23 ) 
createBlip ( 5006.5146484375, -1283.5164794922, 85.884986877441, 33 ) 
createBlip ( 4856.8994140625, -1413.4611816406, 85.478088378906, 41 ) 
createBlip ( 4680.8935546875, -1610.9580078125, 104.85077667236, 48 ) 
createBlip ( 4667.119140625, -1711.8497314453, 110.76747131348, 53 ) 

i think should work.

P.S: please use LUA tags

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

Did the error just say "Error" or did it say something more specific that might indicate what the problem was?

Posted

when I try to open the resource in my map editor, it kicks me from the game; it says: error with downloading files.

Posted

maybe there is a problem with the numerals I think.. but I have already tried the blips with all their options (size, ordering, visible distance), then only with the icon ID, and etc. but any of them doesn't work :(

Posted

they worked fine with me, also the script is not kicking you from the server.

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.

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