Jump to content

DarkLink

Members
  • Posts

    610
  • Joined

  • Last visited

Everything posted by DarkLink

  1. thanks for ur reply, but look this: for i,k in ipairs (getElementsByType("vehicle")) do -- how do I do what is here only for the first five cars, when reach the six exit for or do nothing.. end Thanks buffalo.
  2. Hey wojak I tryed what you said but doesnt work, tryed with my custom elements that are passage elements. doing this: addEvent("onClientElementCreate",true) addEventHandler("onClientElementCreate", root, function() if getElementType(source) == "passage" then local passages = getElementsByType(passage) if table.getn(passages) > 4 then exports.editor_main:destroySelectedElement() -- client only function outputChatBox("gamemode doesnt permit more than 4 cars") end end end) But doesnt say nothing, and I can have the element on map editor, its not destroyed. I add this on my borderpatrol.edf file: Maybe because you made an event but we are not triggering it ? Its just a client side event, dont u need a triggerClientEvent? Thanks in advance bro. Cya.
  3. Guys is there a way to stop looping a table? I mean the table have 10 elements, but I just want to loop the table for the first five, the other five wont get loaded, just ignored. Appreciate some help guys. Thanks.
  4. What do you need to do is make a table as dictionaires. You can read about it here: http://lua-users.org/wiki/TablesTutorial Then would be something like: t = { maria="hermoneyhere", darklink="hismoneyhere", john="hismoneyhere" } Then guess you want to print the money of all players? Something like: for k,v in pairs(t) do outputChatBox(k .. " has this money: " .. v) end Then would appear on console something like: ofc I am the richest :b I hope I could help you. PS: I think you are portuguese? maybe brasil?
  5. Hey guys, I came here for a information update about the development. I have been away from my house somedays, arrived this week, found out many bugs on teams and on teleports but could fixed it already with wojak help and SDK. And I have make a good thing for mappers, I guess. So maybe the devolpment are at 60% I wanna to finish this before August start I go to Morocco, africanism ;D Peace guys. Thanks all.
  6. DarkLink

    EDF Files

    I notice that its not so easy like I though, wojak explained me, I need exported functions.. and a script running when map editor runs. I will just use team data notes when creating a spawnpoint, much easier, I guess. Thanks anyway SDK
  7. are you sure that you are passing player as argument for function geld? can you show to us that part of the code? when you call the function?
  8. DarkLink

    EDF Files

    My problem is, I guess I didnt explain good so here it is: is there a way to have the teams already created when a mapper load the defitions of my gamemode and start mapping? Then when he tries to place spawnpoints he can already choose which team to choose, and then will be parent of that team, on .map file. I guess I explained myself better now Thanks alot!
  9. DarkLink

    Team skin

    you get the skin before joining a team, using getElementModel and store it. setElementData(player, "skin", getElementModel(player)). Then when a player leaves a team, use getElementData(player,"skin", false) -- false so dont go up and down the tree, just the player element. And after the get use the setElementModel using the model you get . I hope you understand. Good luck
  10. found out your problem, getTime doesnt give strings, its int value. dont use " " something like: if hour == 23 and mins == 59 then
  11. I think ur problem is on the timer, it will check every real second. But I guess the seconds on gta world arent real... try to change ur timer to setTimer( Welt1, 100, 0 )
  12. some error on console? I guess its everything okay . hour is 12 or 24 , getTime wiki doesnt say
  13. DarkLink

    EDF Files

    Anyone? I need some help :c Thanks in advance!
  14. And that scope wont be global? I mean for all the files server side? Maybe I dont know this much too, need learning
  15. Ye john is right, your problem is on arrowMarker variable its local of the function, make it ousite, or use example of john that is global Good luck.
  16. On marker hit event is trigger when u hit a marker, so arrowMarker is the marker that will trigger the event. It needs to be a marker declared on that script, dont know if it is. You dont need to attach a marker to andromada. You create a marker that will trigger the function that teleport. Simple Just make the marker where you want to teleport when you hit it, u can use createMarker I hope I could help .
  17. WORKING! Thanks alot mate! Didnt know about this mistakes :b I understand now
  18. DarkLink

    EDF Files

    Okay guys I am here asking for EDF files documentation, beside this one: https://wiki.multitheftauto.com/wiki/Edf Is there any other info teaching scripters how to use this? I am trying to do something that cant understand how.. I want that mappers when place spawnpoint element, need to choose for which team will be. So I want to make custom teams beside the map, all maps of this gamemode will have that team X and Y, and everytime they place spawnpoints need to say for which team will be. And on map file would appear something like this, so I can handle on my lua files : <team name="Police"> <spawnpoint id="spawnpoint (14)" skin="0" posX="923.24896240234" posY="2407.8386230469" posZ="26.800882339478" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (14)" skin="0" posX="932.21612548828" posY="2454.58203125" posZ="10.8203125" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (15)" skin="0" posX="967.66394042969" posY="2455.8859863281" posZ="10.8203125" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (16)" skin="0" posX="950.62976074219" posY="2449.9562988281" posZ="10.8203125" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (17)" skin="0" posX="944.82995605469" posY="2457.4929199219" posZ="10.8203125" rotX="0" rotY="0" rotZ="0" /> </team> <team name="Emigrants"> <spawnpoint id="spawnpoint (8)" skin="0" posX="-518.18017578125" posY="2587.4965820313" posZ="53.4140625" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (9)" skin="0" posX="-226.75570678711" posY="2601.5900878906" posZ="62.703125" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (10)" skin="0" posX="-28.101783752441" posY="2332.1057128906" posZ="24.140625" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (11)" skin="0" posX="-510.70172119141" posY="2599.6372070313" posZ="53.415428161621" rotX="0" rotY="0" rotZ="0" /> <spawnpoint id="spawnpoint (12)" skin="0" posX="-215.47108459473" posY="2597.8271484375" posZ="62.703125" rotX="0" rotY="0" rotZ="0" /> </team> Thanks alot guys.
  19. Okay thanks guys, I found out what is causing the error. When I have this on .map file I get error, when I dont have it, its ok. .. <passage id="passage (1)" size="2" passage destination="passage (3)" posX="2486.3046875" posY="-1661.8643798828" posZ="12.374344825745" rotX="0" rotY="0" rotZ="0" /> <passage id="passage (2)" size="2" passage destination="passage (4)" posX="2482.7746582031" posY="-1663.1722412109" posZ="12.382147789001" rotX="0" rotY="0" rotZ="0" /> <passage id="passage (3)" size="2" passage destination="passage (1)" posX="2478.8254394531" posY="-1661.8198242188" posZ="12.382147789001" rotX="0" rotY="0" rotZ="0" /> <passage id="passage (4)" size="2" passage destination="passage (2)" posX="2481.6726074219" posY="-1657.4172363281" posZ="12.365883827209" rotX="0" rotY="0" rotZ="0" /> .. This is a custom element, markers that will make teleport for the destination. So you guys know what is wrong here? Thanks.
  20. Ye castilo is right, the arguments are only rgb and the player but thanks for your help.
  21. Thanks for your reply? What do you mean by editing the files just down to the code I pasted? Its everything ok down.. Thanks.
  22. I guess its a problem with map file, but dont know how to fix it I started doing my map with ctf definitions, now made my own definitions and set it on map, like u can see. But something went wrong Thanks for ur reply.
  23. Okay guys, I changed abit my scripts, trying to make it working with edf files. and I guess, I am messed up things a bit Now getElementPosition of element on map doesnt work, neither getElementData(element, posX) .. I have on console bad argument at getElementData and getElementPosition , tryed each one. My script: local radar = getElementByID("radar") local x,y,z = getElementData(radar, "posX", false), getElementData(radar, "posY", false), getElementData(radar, "posZ", false) also tryed local radar = getElementByID("radar") local x,y,z = getElementPosition(radar) both gave me errors. And map file: <map edf:definitions="borderpatrol,editor_main"> <object id="radar" doublesided="false" model="4832" interior="0" dimension="0" posX="494.01837158203" posY="2283.5415039063" posZ="67.924118041992" rotX="0" rotY="0" rotZ="235.99731445313" /> .... ... .. .. </map> on meta.xml: <meta> <info author="Tiago Martins" version="0.1" type="gamemode" name="DarkLink" description="A gamemode about border patrol and emigration" edf:definition="borderpatrol.edf"/> <map src="teleporte.map" dimension="0" /> ... ... (many scripts here..) </meta> Thanks guys, any clue?
  24. I use the get and then the set? Thanks.
×
×
  • Create New...