Jump to content

lemon21

Members
  • Posts

    4
  • Joined

  • Last visited

Details

  • Gang
    LSPD

lemon21's Achievements

Vic

Vic (3/54)

0

Reputation

  1. lemon21

    Help me!

    Hello! I am beginner for scripting... I want put in the script line, who give player drugs for one circle. --[[ --[[ (c) Kikisons, 2014 Skripts izstrādāts RP.EXS.LV MTA serverim, Kreiss frakcijai. ]]-- mysql = exports.mysql -- Importējam mySQL, datubāzes savienojumam. local startBlip = createBlip(-1549.9873046875, -2762.40625, 48, 51, 2, 0, 0, 0, 0, 0, 999999) function trucking_init(thePlayer, commandname) if getElementData(thePlayer, "faction") == 79 then setElementData(thePlayer, "trucking", 0) setElementData(thePlayer, "truckingprofit", 0) setElementData(thePlayer, "truckingMarkerVisible", 0) outputChatBox("Iekāp automašīnā, lai redzētu sākumpunktu.", thePlayer) destroyElement(startMarker) destroyElement(jobMarker) destroyElement(jobBlip) end end addCommandHandler("kreiss", trucking_init, false, false) -- function showStartMarker(thePlayer) if (getElementData(thePlayer, "faction") == 79 and getElementData(thePlayer, "trucking") == 0 and getElementData(thePlayer, "truckingMarkerVisible") ~= 1) then startMarker = createMarker (-1549.9873046875, -2762.40625, 48, "cylinder", 4.0, 255, 0, 0, 150, thePlayer) addEventHandler("onMarkerHit", startMarker, startTrucking) setElementData(thePlayer, "truckingMarkerVisible", 1) end end addEventHandler("onVehicleEnter", getRootElement(), showStartMarker) function startTrucking(thePlayer) if (getElementData(thePlayer, "faction") == 79) then theVehicle = getPedOccupiedVehicle (thePlayer) vehicleID = getElementModel(theVehicle) if vehicleID == 403 then if getVehicleTowedByVehicle(theVehicle) then outputChatBox("Sākam darbu...", thePlayer, 0, 255, 0) setElementData(thePlayer, "trucking", 1) truckJob(thePlayer) else outputChatBox("Piekabini treileri, lai sāktu darbu.", thePlayer, 255, 0, 0) end else outputChatBox("Tev ir jāatrodas Linerunner markas automašīnā!", thePlayer, 255, 0, 0) end else outputChatBox("Tikai \"Kreiss\" frakcijas biedriem ir iespēja izmantot šo darbu!", thePlayer, 255, 0, 0) end end function truckJob(thePlayer) theVehicle = getPedOccupiedVehicle (thePlayer) if getElementData(thePlayer, "faction") == 79 then if getVehicleTowedByVehicle(theVehicle) then local progress = getElementData(thePlayer, "trucking") if progress == 1 then destroyElement(startMarker) end marker = markers[tonumber(progress)] if marker then x = marker[1] y = marker[2] z = marker[3] end if progress <= 11 and progress > 0 then jobMarker = createMarker(x, y, z, "cylinder", 4.0, 255, 102, 51, 150, thePlayer) jobBlip = createBlip(x, y, z, 0, 4, 255, 102, 51, 255, 0, 999999, thePlayer) addEventHandler("onMarkerHit", jobMarker, timerIncreaseJob) else destroyElement(jobMarker) destroyElement(jobBlip) endJob(thePlayer) return end else outputChatBox("Tev nav piekabināts treileris!", thePlayer, 255, 0, 0) end else outputChatBox("Nav pieejams!", thePlayer, 255, 0, 0) end end function timerIncreaseJob(thePlayer) theVehicle = getPedOccupiedVehicle (thePlayer) if getElementData(thePlayer, "faction") == 79 then if getVehicleTowedByVehicle(theVehicle) then truck = getPedOccupiedVehicle(thePlayer) trailer = getVehicleTowedByVehicle(theVehicle) setElementFrozen(truck, true) setElementFrozen(trailer, true) outputChatBox("Uzgaidiet, kamēr jūsu fūre tiek izkrauta." , thePlayer, 255, 102, 51) setTimer(increaseJob, 20000, 1, thePlayer) else outputChatBox("Tev nav piekabināts treileris!", thePlayer, 255, 0, 0) end else outputChatBox("Nav pieejams!", thePlayer, 255, 0, 0) end end function increaseJob(thePlayer) theVehicle = getPedOccupiedVehicle (thePlayer) if getElementData(thePlayer, "faction") == 79 then if getVehicleTowedByVehicle(theVehicle) then truck = getPedOccupiedVehicle(thePlayer) setElementFrozen(truck, false) setElementData(thePlayer, "truckingprofit", getElementData(thePlayer, "truckingprofit") + 80) outputChatBox("Jūs veicāt savu "..getElementData(thePlayer, "trucking")..". piegādi šajā fūrē.", thePlayer, 255, 255, 255) --outputChatBox("Jūs nopelnijāt $80. [Kopā: $"..getElementData(thePlayer, "truckingprofit").."]" , thePlayer, 255, 255, 255) outputChatBox("Frakcija par to saņēma $1600." , thePlayer, 255, 255, 255) mysql:query_free("UPDATE `factions` SET `bankbalance` = `bankbalance` + 1600 WHERE `id` = 79") setElementData(thePlayer, "trucking", getElementData(thePlayer, "trucking") + 1) destroyElement(jobMarker) destroyElement(jobBlip) truckJob(thePlayer) else outputChatBox("Tev nav piekabināts treileris!", thePlayer, 255, 0, 0) end else outputChatBox("Nav pieejams!", thePlayer, 255, 0, 0) end end function endJob(thePlayer) theVehicle = getPedOccupiedVehicle (thePlayer) if getElementData(thePlayer, "faction") == 79 then if getVehicleTowedByVehicle(theVehicle) then exports.global:giveMoney(thePlayer, 2000) outputChatBox("Darbs pabeigts. Atgriezies bāzē. Frakcija saņēma: $"..getElementData(thePlayer, "trucking")*1600 ..".", thePlayer, 0, 255, 0) outputChatBox("Lai strādātu atkal, raksti /kreiss", thePlayer) outputChatBox("Tu saņem $2000 prēmiju par pabeigtu darbu!", thePlayer) setElementData(thePlayer, "trucking", 0) setElementData(thePlayer, "truckingprofit", 0) else outputChatBox("Tev nav piekabināts treileris!", thePlayer, 255, 0, 0) end else outputChatBox("Nav pieejams!", thePlayer, 255, 0,0) end end
  2. Cmoon, pleas send me active script, one more time...(first time)
  3. Sorry, but i have beginner(noob).
  4. Hi Muti Theft Auto forum palyer, i want ferm script (sorry about my english ) Cordinat :{-377.4970703125, -1412.51953125, 25.7265625} {-346.1923828125, -1378.908203125, 15.457473754883} ((-314.4228515625, -1376.3583984375, 10.369009971619)) ((-294.916015625, -1446.5302734375, 11.090042114258)) ((-312.994140625, -1471.2978515625, 11.117794036865)) ((-320.7373046875, -1499.625, 12.788132667542)) ((-336.3408203125, -1533.8955078125, 16.02587890625)) ((-321.79296875, -1559.1962890625, 14.552065849304)) ((-282.71875, -1551.2509765625, 6.2305297851562)) ((-239.6083984375, -1534.8759765625, 6.4919843673706)) ((-213.76171875, -1516.4384765625, 7.5979609489441)) ((-240.1259765625, -1510.1572265625, 7.149169921875)) ((-277.876953125, -1498.9384765625, 5.8011450767517)) ((-295.423828125, -1483.6474609375, 8.3123455047607)) ((-281.7802734375, -1448.9013671875, 8.6120891571045)) ((-257.1259765625, -1416.5947265625, 8.5616540908813)) ((-230.73046875, -1404.763671875, 8.0790767669678)) ((-194.95703125, -1398.833984375, 5.3488802909851)) ((-164.564453125, -1408.96484375, 3.0381872653961)) ((-166.5888671875, -1386.154296875, 3.2844614982605)) ((-192.78125, -1367.462890625, 4.8287181854248)) ((-220.4326171875, -1343.486328125, 9.683424949646)) ((-261.5986328125, -1335.0888671875, 7.7573232650757)) ((-302.72265625, -1327.314453125, 8.5609006881714)) ((-354.5302734375, -1317.7890625, 22.309753417969)) ((-406.8583984375, -1298.216796875, 30.361581802368)) ((-466.1796875, -1316.171875, 31.874683380127)) ((-536.4150390625, -1332.0478515625, 18.221940994263)) ((-566.0791015625, -1324.1005859375, 22.107227325439)) ((-557.8330078125, -1378.474609375, 16.875686645508)) ((-520.8974609375, -1412.3681640625, 13.197632789612)) ((-477.806640625, -1415.8828125, 16.18523979187)) ((-422.3076171875, -1408.0498046875, 22.813444137573)) ((-383.16015625, -1406.9921875, 25.362461090088)) ((-377.58203125, -1447.548828125, 25.7265625))
×
×
  • Create New...