Jump to content

aunque

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

aunque's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. I'm new to Lua and I want it to freeze when a marker arrives and unfreeze after 3 seconds. How can I do that? can you write sample code.
  2. kargo_arac = {} kargo_teslim = {} function meslekbitis(oyuncu) if oyuncu then if isElement(kargo_arac[oyuncu]) then destroyElement(kargo_arac[oyuncu]) destroyElement(meslekbitis_marker2) setElementData(oyuncu, "kargo:meslek", false) setElementData(oyuncu, "meslek", false) local para = 1000 givePlayerMoney(oyuncu, para) outputChatBox("#9ACD32[Kargo Mesleği]: #FFFFFFİşi bitirdin, Ücret olarak 1000 TL ödendi.",oyuncu,255,255,255,true) end end end function meslekiptal(oyuncu) if oyuncu then if isElement(kargo_arac[oyuncu]) then destroyElement(kargo_arac[oyuncu]) destroyElement(meslekbitis_marker2) destroyElement(kargobitis_blips) setElementData(oyuncu, "kargo:meslek", false) setElementData(oyuncu, "meslek", false) outputChatBox("#9ACD32[Kargo Mesleği]: #FFFFFFMeslek aracından indiğin için iş iptal edildi.",oyuncu,255,255,255,true) destroyElement(meslekbitis_marker2) end end end function ikincimeslek(oyuncu) if oyuncu then if isElement(kargo_arac[oyuncu]) then destroyElement(meslekbitis_marker) destroyElement(kargobitis_blips) outputChatBox("#9ACD32[Kargo Mesleği]: #FFFFFFKargoların indirililiyor, ücretiniz almak için kargo dağıtım merkezine geri dön.",oyuncu,255,255,255,true) meslekbitis_marker2 = createMarker(-62.74648, -1111.28027, 1.07812, "checkpoint", 2.5 , 255, 185, 15) end end end addEvent("meslek:basla", true) addEventHandler("meslek:basla", root, function() setElementData(source, "kargo:meslek", true) setElementData(source, "meslek", true) kargo_arac[source] = createVehicle(456, -29.71848, -1122.65125, 1.07812) outputChatBox("#9ACD32[Kargo Mesleği]: #FFFFFFHaritadan kargo teslim bölgesi işaretlendi oraya giderek kargoyu teslim et.",oyuncu,255,255,255,true) warpPedIntoVehicle(source, kargo_arac[source]) setVehicleLocked(kargo_arac[source], true) meslekbitis_marker = createMarker(-157.16824, -282.63116, 3.90531, "checkpoint", 2.5 , 255, 185, 15) addEventHandler("onMarkerHit", meslekbitis_marker, ikincimeslek) kargobitis_blips = createBlip(-157.16824, -282.63116, 3.90531, 56) addEventHandler("onVehicleExit", kargo_arac[source], meslekiptal) addEventHandler("onMarkerHit", meslekbitis_marker2, meslekbitis) end) I'm trying to learn lua language but I'm having a problem, i have prepared such a job code, but function meslekbitis(oyuncu) if oyuncu then if isElement(kargo_arac[oyuncu]) then destroyElement(kargo_arac[oyuncu]) destroyElement(meslekbitis_marker2) setElementData(oyuncu, "kargo:meslek", false) setElementData(oyuncu, "meslek", false) local para = 1000 givePlayerMoney(oyuncu, para) outputChatBox("#9ACD32[Kargo Mesleği]: #FFFFFFİşi bitirdin, Ücret olarak 1000 TL ödendi.",oyuncu,255,255,255,true) end end end This part doesn't do what I want when I enter the pointer. How can I solve this problem?
  3. Thanks for your help, I solved the problem.
  4. destroyElement(meslekbitis_marker) the code is not working how can i run it?
  5. No just kargo_arac[source] = createVehicle(456, -29.71848, -1122.65125, 1.07812) I want for this vehicle is:456
  6. Unfortunately still the same
  7. I'm just starting to learn the Lua language thanks for your help but this time it will not detect the marker on the profession tool.
  8. I prepared a job script in this way, but the last markers are accepted even if they are entered with different tools and that marker does not disappear, how can I solve this? kargo_arac = {} kargo_teslim = {} function meslekbitis(source) if source then if isElement(kargo_arac[source]) then destroyElement(kargo_arac[source]) destroyElement(meslekbitis_marker) setElementData(source, "kargo:meslek", false) setElementData(source, "meslek", false) local para = 123 givePlayerMoney(source, para) end end end addEvent("meslek:basla", true) addEventHandler("meslek:basla", root, function() setElementData(source, "kargo:meslek", true) setElementData(source, "meslek", true) kargo_arac[source] = createVehicle(456, -29.71848, -1122.65125, 1.07812) warpPedIntoVehicle(source, kargo_arac[source]) setVehicleLocked(kargo_arac[source], true) local meslekbitis_marker = createMarker(-157.16824, -282.63116, 3.90531, "checkpoint", 2.5 , 255, 185, 15) addEventHandler("onMarkerHit", meslekbitis_marker, meslekbitis) kargobitis_blips = createBlip(-157.16824, -282.63116, 3.90531, 56) end)
×
×
  • Create New...