Jump to content

Wojak

Members
  • Posts

    321
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Wojak

  1. how is setTeams function called? (event, command, bind key?)
  2. it opens instantly for me... (if you are double clicking, try selecting and using F3) the window is handled by EDF resource, this is a core MTA resource, so i wont edit it the only things i can change it the window are properties names, and properties order...
  3. thank you for the icons, they will be included in the next release, and you will be credited as for youre problem: -curently testmod is not included in editor (i dont know if i ever make it), to test the resource in editor: 1 save the map and remember the name 2 /stop editor 3 /start 4 /tart 5 /start teleporteditor - teleports will not be cteated if: 1 destynation_id property is not valid 2 teleporteditor is not runing (After you complete the map add this line to map meta.xml: ) THERE IS NO SCRIPT FILE CREATED, THIS RESOURCE IS HANDLING THE TELEPORTS, SO IT NEED TO BE RUNING WITH THE MAP
  4. many functions i needed where client only, so the script is client side all is in the first post i added as many features as i could think of
  5. This is the resource that many people where waiting for since the relies of the 1.0 map editor was released Polski opis (Polish description): viewtopic.php?f=124&t=32751 This resource allows you to create teleports in MTA map editor, it also handles them in game based on the map file. You can link between places, interiors and dimensions, you have full control on element position, rotation and speed after the teleportation, you can even create speed boost pickups and cannons if you want. IMAGES DOWNLOAD https://community.multitheftauto.com/ind ... ls&id=1960 exemplar map: https://community.multitheftauto.com/ind ... ls&id=1961 INSTRUCTIONS Tutorial video: Contains: Part I - Installation 0:02 Part II - Creating basic teleport 0:23 Part III - testing 2:07 Part IV - using map on the server 3:32 How to load the definitions: “Click the Definitions button in the main menu and double click the resource in the left list. Then close the window and roll the mousewheel in the element panel until the resource comes up. At that point you can create and manipulate custom elements of that resource like any other element.” After you complete the map add this line to map meta.xml: THERE IS NO SCRIPT FILE CREATED, THIS RESOURCE IS HANDLING THE TELEPORTS, SO IT NEED TO BE RUNING WITH THE MAP There are two kinds of elements that you must add in the map editor: Teleport_p – it is represented by a marker with arrow inside and attached 3D text in map editor, it will be a marker with text in game. Ring marker can be rotated (only ring rotation will be set in game) This element has the fallowing properties: - position: x,y,z 3d coordinates - rotation: is important only for ring marker - type: marker type - size: marker size - color: marker color - description: this text will be attached to the marker - desccolor: color of the text attached to the marker - destynation_id: id of a place you want this marker to teleport to, click on browse, and select element from the list, if the list is empty create a destination first. If this property is invalid, teleport will not be created. - restriction: if false, everything can enter, if playerOnly than only player with no vehicle can enter, if inVehicleOnly than only player in vehicle can enter. - dimension_: dimension in witch the teleport will be created and accessible - interior_: interior in witch the teleport will be created and accessible destination_p it is represented by a RC bandit with arrow, it will be invisible in game, the way that RC bandit is facing is very important, this in not only the rotation that element will have after the teleportation, bus also the direction the element will be going. This element has the fallowing properties: - position: x,y,z 3d coordinates - relative: if set to false, the element will be moved tt the coordinates above; if set to coord, coordinates above will be added to element hit coordinates (position =0,0,20 and relative= coord will increase the z hit coordinates by 20 units); if set to coordNrot, x,y,z axis will be adjusted to element rotation after the teleportation (x = left, right; y = front,back; z= up,down)( position =0,20,0 and relative= coordNrot will move the element forward by 20 units) - rotation: element rotation and direction after the teleportation - use_dest_rot: if true the rotation above will be used, if false the rotation above will be ignored, and hit rotation will be used. - fixed_speed: the speed in km/h that the element will have after the teleportation, if set to more than 0, the hit speed and speed_multiplayer will be ignored - speed_multiplayer: if between 0 and 1 it will decrease the hit speed (0.5 will decrease the speed by half) if more then 1 it will increase element hit speed (2 will increase two times) - t_dimension: the dimension that will be set after the teleportation - t_interior: the interior that will be set after the teleportation when you connect the teleport with destination, selecting one of this elements will draw a icon on both- icon is visible from any distance, interior and dimension, so you can keep track on witch places ate connected New in 0.1.2: - new icons made by Moo-Mapper; - increased icon size on selected elements; - new additional way of assigning destinations for teleports. If you select a teleport with no destination assigned, or create a new one, than select a destination element, or create a new one, resource will ask you, if you want to connect this elements – see screenshot 4 (gui window will popup with a little delay – the delay is intended) - camera forced behind the vehicles after teleportation. I’ve tried to do it also with the peds, but it don’t work for some reason…
  6. właśnie przy 250 zaczynają się palić (niezależnie od modelu) a potem 5s i boom
  7. z tego co pamiętam pojazdy wybuchają przy hp = 250 i mniej, ustaw na 251 i powinno być ok
  8. easy way is not always beter i think someone who understand the element tree (drifterCZE) also know how getElementType works... there may be no difference for human observer, but there is a diference fo a computer. I will try a real life analogy: Imagine you work in the ofice and you can help people with last name starting on C, but people with last name starting on A,B (+ rest of alphabet) kep coming through your'e door, and you have to say to every one of them: "I can't help you, now get out!" this is what trigering onElementDataChange for root element and checking the source means it would be easier to stick the note on the door "I can only help people with last name on C" - create a dummy element, set it as a parent of elements you want to trigger the event for, and trigger the event for the dummy element
  9. function is called every time some data changes on any element (vehicle, ped, ect), some resorces (zombies for example) change the data for non player elements all the time, so the function is caled for no reason, only to chack if the source is a player drifterCZE want to be shure that the source is always a player, and the function will be not caled for non player elements I'm sorry but i can not explain it better
  10. Wojak

    spawn

    freeze the player for a second after the spawn - map should load by that time
  11. @Citizen: You may undarstand the sentence, but not necessarily a context and youre cod is correct, but it not solvs the problem (drifterCZE want to save some memory resources) https://wiki.multitheftauto.com/wiki/Event https://wiki.multitheftauto.com/wiki/SetElementParent https://wiki.multitheftauto.com/wiki/Element_tree
  12. people should avoid using stuff that they dont understand to well if it comes to scripting
  13. that will not solve his problem- he still need to trigger the event for root element, and as far i know it mean looping through all elements in all resources... the only alternative is to use the dumy element, but you dont need to check it each few second, as players count only change on join and quit, so you only need to set player parent if onPlayerJoin is triggerd (you need to use root element on this event, but it will triger only once per join)
  14. you use x, x + width, y , y+ depth in 4 combinations
  15. hmm... createMarker creates a element node in resorce dynamic map and rerurn a pointer of that element, iven if the pointer is lical, the element is not destroyed with the variable ( also 'if ( veh ) then' is wrong, it should be' if isElement( veh ) then') so every time yourFunction () is called, new marker is created, and it is not destroyed. Is tat good?
  16. DxDrawLine3D have a streaming problem... https://wiki.multitheftauto.com/wiki/Get ... ldPosition https://wiki.multitheftauto.com/wiki/DxDrawLine you also need to calculate the 3D coordinats for each corner
  17. @volk-rus: no comment... @AZOZE: trolley = createObject (i ,2780, x, y, z, 0, 0, 0 ) function createObject expect obiect id as 1 parameter, not interior id... you set interior with this: https://wiki.multitheftauto.com/wiki/SetElementInterior
  18. ad 1 https://wiki.multitheftauto.com/wiki/ShowChat ad 2 https://wiki.multitheftauto.com/wiki/Ele ... Edit_field albo https://wiki.multitheftauto.com/wiki/Element/GUI/Memo https://wiki.multitheftauto.com/wiki/GuiCreateEdit / https://wiki.multitheftauto.com/wiki/GuiCreateMemo https://wiki.multitheftauto.com/wiki/GuiEditSetReadOnly / https://wiki.multitheftauto.com/wiki/GuiMemoSetReadOnly https://wiki.multitheftauto.com/wiki/ShowCursor ad 3 hmm ostatnio takie rzeczy wydziałem w wersji DP 3, w obecnej wersji jak dla mnie synchro jest na wysokim poziomie więc nie wiem... ad 4 da się to zrobić po stronie clienta, ale musisz to "ręcznie" zsynchronizować (przesyłając dane przez server), więc zrób to po stronie servera, wtedy "samo" się zsynchronizuje
  19. yes if the Marker is serverside, you will check it serverside, and the vehicle has a syncer (is in range of 140 game distance units from any player)
  20. volk-rus i dont know if someone tell you this before, but you can not make a script by copying random parts of other people code... i mean this exports.killmessages:outputMessage( {getPlayerName(attacker),{"padding",width=3},{"icon",id=waffe},{"padding",width=3}, {"icon",id=256},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)}, getRootElement(),rK,gK,bK) it is a copy, paste from the link Citizen give you, and you even dont know whot this code do (not many people know, as there is no wiki page for killmessages) i see at lest two errors in youre cod ("use debug no errors" my ass) function ZombieKillmessage(ammo, attacker, weapon, bodypart) "ammo" contains "atacker" "atacker" contains "weapon" "weapon" contains " bodypart" " bodypart" contains hp loss https://wiki.multitheftauto.com/wiki/OnPlayerDamage also you use "waffe" that is not define in you're script (waffe means weapon in german) exports.killmessages:outputMessage({getPlayerName(attacker),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)},getRootElement(),rK,gK,bK) first parameter is "tekst" and it can be a string or a table, second parameter is "visible for" and it can be ane player, or root element for all players, last parameters are "red","green","blue" in the table {"padding",width=3} is a 3 pixel space, rest should be obvious
  21. the problem with accountname is most likely the reason, but if volk-rus wont understand why there is a problem wit this variable he will still ask people to debug his scripts for him... He is making his own gamemode, and should be experience scripter by now, but he slill have a problem with basic stuff... getPlayerAccount(source) used before logIn ( players, accounts, passs ) will most likely return a guest account, and i dont even know if you can get a name fo that... i also think that local accounts = getAccount ( users, passs ) local accountname = getAccountName (accounts) is the same as local accountname = users if "users" is a valid account name
  22. paste this after line 3 and show us the output, and the acl outputChatBox(tostring(users)..", "..tostring(accountname)..", "..tostring(getPlayerName(source)))
  23. I going to do something for you, and let you fix this code yourself triggerServerEvent ( "onSendLogineng", getRootElement(), getLocalPlayer(), guiGetText(GUIEditor_Edit[8]), guiGetText(GUIEditor_Edit[9]) ) you see, you put a root element sa a second parameter, that menns the source of this event will be the root element, not a player. https://wiki.multitheftauto.com/wiki/Element_tree getLocalPlayer() returns a player on whos computer the script is running, so argument "players" in function "onLogineng" will contain a player getPlayerAccount() cann not be run for root element, but it can be run for a player hope you will understand and fix ALL the errors (there is more than one in youre script...)
  24. i think local accountname = users but you should show us what trigger "onSendLogineng", as we can only guess what source,players, users and passs are...
  25. Wojak

    Respawn

    i think it goes something like this:
×
×
  • Create New...