Jump to content

Tekken

Helpers
  • Posts

    1,423
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Tekken

  1. oh yeah you're right try this function clickfunc(button, state, player) if button == "left" and state == "down" then if getElementType(source) == "object" and getElementData(source, "owner") == player then local x, y, z = getElementPosition(source); local model = getElementModel(source); bindKey(player, "arrow_u", "down", mozgatas, source); setElementData(source, "mozgathato", true); end end end function mozgatas(player, key, state, element) if getElementData(element, "owner") == player and getElementData(element, "mozgathato") then local x,y,z = getElementPosition(element); setElementPosition(element, x, y-0.5, z); end end
  2. Client add this triggerServerEvent('anEvent', localPlayer, vMax, money) server do this function getSelectedHandling(vmax, money) local theVehicle = getPedOccupiedVehicle (client ) if theVehicle then outputChatBox("you have to pay:"..money) else outputChatBox ( "You do not have a Vehicle!", client, 255, 0, 0, true ); end end addEvent("anEvent", true); addEventHandler("anEvent", resourceRoot, getSelectedHandling); try and tell me
  3. why with bindKey and ton with onElementClicked ?
  4. Sorry but don't have any idea of what you trying to archive.
  5. use moveObject function to move it. just add it into clickfunc function The "onElementClicked" event should check if source has "mozgathato" elemetData
  6. function removeLightsOff() for i1 = 4212, 4222 do removeWorldModel(i1, 10000, 0, 0, 0); end for i2 = 4715, 4717 do removeWorldModel(i2, 10000, 0, 0, 0); end for i3 = 4720, 4725 do removeWorldModel(i3, 10000, 0, 0, 0); end for i4 = 4739, 4752 do removeWorldModel(i4, 10000, 0, 0, 0); end for i5 = 5057, 5059 do removeWorldModel(i5, 10000, 0, 0, 0); end for i6 = 5661, 5665 do removeWorldModel(i6, 10000, 0, 0, 0); end for i7 = 5990, 5992 do removeWorldModel(i7, 10000, 0, 0, 0); end for i8 = 6192, 6196 do removeWorldModel(i8, 10000, 0, 0, 0); end for i9 = 7072, 7097 do removeWorldModel(i9, 10000, 0, 0, 0); end for j1 = 7206, 7208 do removeWorldModel(j1, 10000, 0, 0, 0); end for j2 = 7221, 7226 do removeWorldModel(j2, 10000, 0, 0, 0); end for j3 = 7280, 7280 do removeWorldModel(j3, 10000, 0, 0, 0); end for j4 = 7331, 7333 do removeWorldModel(j4, 10000, 0, 0, 0); end for j5 = 7892, 7892 do removeWorldModel(j5, 10000, 0, 0, 0); end for j6 = 7942, 7944 do removeWorldModel(j6, 10000, 0, 0, 0); end for j7 = 8372, 8372 do removeWorldModel(j7, 10000, 0, 0, 0); end for j8 = 9088, 9089 do removeWorldModel(j8, 10000, 0, 0, 0); end for j9 = 9121, 9129 do removeWorldModel(j9, 10000, 0, 0, 0); end for k1 = 9154, 9159 do removeWorldModel(k1, 10000, 0, 0, 0); end for k2 = 9277, 9283 do removeWorldModel(k2, 10000, 0, 0, 0); end for k3 = 9285, 9286 do removeWorldModel(k3, 10000, 0, 0, 0); end for k4 = 9885, 9886 do removeWorldModel(k4, 10000, 0, 0, 0); end for k5 = 9932, 9934 do removeWorldModel(k5, 10000, 0, 0, 0); end for k6 = 10057, 10058 do removeWorldModel(k6, 10000, 0, 0, 0); end for k7 = 10146, 10147 do removeWorldModel(k7, 10000, 0, 0, 0); end for k8 = 11410, 11412 do removeWorldModel(k8, 10000, 0, 0, 0); end for k9 = 13461, 13461 do removeWorldModel(k9, 10000, 0, 0, 0); end for t1 = 13461, 13461 do removeWorldModel(t1, 10000, 0, 0, 0); end for t2 = 13484, 13485 do removeWorldModel(t2, 10000, 0, 0, 0); end for t3 = 13493, 13493 do removeWorldModel(t3, 10000, 0, 0, 0); end for t4 = 17954, 17957 do removeWorldModel(t4, 10000, 0, 0, 0); end end removeLightsOff(); try this
  7. Using the example I gave you? you sure? This one: function lerakja(thePlayer) local x, y, z = getElementPosition(thePlayer); local targy = createObject(2167, x+1, y+1, z-1); setElementData(targy, "owner", thePlayer); addEventHandler("onElementClicked", targy, clickfunc); end addCommandHandler("obj", lerakja); function clickfunc(button, state, player) if button == "left" and state == "down" then if getElementType (source ) == "object" and getElementData(source, "owner") == player then local x, y, z = getElementPosition(source); local model = getElementModel(source); outputChatBox("you are use now this object: ID: "..model); local cp = createMarker(x, y-0.2, z+2.5, "arrow", 0.7, 255, 181, 64, 250); end end end
  8. Tekken

    Help

    The code? That told you you are trying to compare a string "THIS IS A STRING" to a boolean false true -- those are booleans Like this if "TEXT" == true then --do something end depending on your code the right approche may be if "text" == tostring(VARIABLE) then -- do something end As I said earlier we need the code to give an exact answer. Good luck.
  9. takePlayerMoney -- Use it ONLY server side ! to send data from client to server or vice versa use triggerClientEvent or triggerServerEvent May you explain a bit further?
  10. Well the example I give you let’s you interact with only one object while creating many,doesn’t it?
  11. Just realized a thing function lerakja(thePlayer) local x, y, z = getElementPosition(thePlayer) targy = createObject(2167, x+1, y+1, z-1) setElementData(targy, "owner", thePlayer) addEventHandler ( "onElementClicked", targy, clickfunc ) end addCommandHandler("obj",lerakja) function clickfunc ( button, state, player ) if button == "left" and state == "down" then if getElementType (source ) == "object" and getElementData(source,"owner") == player then local x, y, z = getElementPosition(source) local model = getElementModel(source) outputChatBox("you are use now this object: ID: "..model) cp = createMarker(x, y-0.2, z+2.5, "arrow", 0.7, 255, 181, 64, 250) end end end This should work May I know what you are exactly trying to archive? Didn’t quite understand yet
  12. Wait just do table[player][1] = object And create a table.count function like this function tablecount(table) if type(table) == "table" then local count = 0; for i,v in ipairs(table) do count = count +1; end return count; end return false; end and do table[player][(tablecount(table[player]) or 0) + 1]
  13. You define the table with the player first targy[player] = {}
  14. Replace #targy[player] to #targy[player] or 0
  15. Well count the id’s targy[player][ tonumber(#targy[player]) + 1 ] = element; tonumber not needed normally but just to be sure
  16. Tekken

    [HELP] Voice

    Does your playercount have changed?
  17. May I know how do you manage trains? Do you have a resource?
  18. Just use if targy[player] == source then —do something.. end onElementClicked
  19. Treaba sta in felul asta, voice e o resursa care trebuie sa fie instalata in serverul pe care te joci tu, mai mult ea trebuie sa fie deblocata in mtaserver.conf daca nu ai server, orice modificare faci acolo nu este luata in considerare. Tot ce poti face tu ca jucator este sa ceri proprietarului serverului pe care joci sa puna voice. Tu ca jucator nu "trebuie" sa te interesezi decat la ce poti face in joc. Succes!
  20. May this explain why after it worked ? Also how can I do it ?
  21. @Tut Hi I just rechecked and doesn't actually work when I try changing compressions type with other texture, but I have found the notworking.dff you gave me is slightly smaller than what I give you, may I know if you made any changes?
  22. Magic TXD work great, but i will give a try
×
×
  • Create New...