Szerző Téma: ZeroMTA Városházára NPC lerakása  (Megtekintve 1405 alkalommal)

ZeroMTA Városházára NPC lerakása
« Dátum: 2017. Január 28. - 14:08:37 »
0
Üdv!
A városházára hogyan bírok munkás npc-t lerakni? amikor rámegy kijönnek a munkák . ? ? 

Nem elérhető Ben

  • 1754
  • Ben apó
    • Profil megtekintése
ZeroMTA Városházára NPC lerakása
« Válasz #1 Dátum: 2017. Január 30. - 13:21:21 »
+1
Szerintem te sehogy

Nem elérhető System

  • 406
    • Profil megtekintése
ZeroMTA Városházára NPC lerakása
« Válasz #2 Dátum: 2017. Január 30. - 17:15:51 »
0
Alapból ott van csak rossz a vw és/vagy interior.

ZeroMTA Városházára NPC lerakása
« Válasz #3 Dátum: 2017. Január 31. - 16:54:39 »
0
Idézetet írta: Ben date=1485778881


   
      Szerintem te sehogy
   


köszönöm kedves \"Ben\" , de már sikeresen megoldottam... 
4 napja kezdtem el magát a LUA nyelvet, de ilyen társaságra igazán nincs szükségem.

Nem elérhető Ben

  • 1754
  • Ben apó
    • Profil megtekintése
ZeroMTA Városházára NPC lerakása
« Válasz #4 Dátum: 2017. Január 31. - 20:00:54 »
+1
Nekem még mindig nem megy, ezt most te nyerted

ZeroMTA Városházára NPC lerakása
« Válasz #5 Dátum: 2017. Február 01. - 17:39:45 »
0
Idézetet írta: Ben date=1485889254


   
      Nekem még mindig nem megy, ezt most te nyerted
   


Tessék itt a job-system.lua (csak írd felűl erre.)
 
 
 

wEmployment, jobList, bAcceptJob, bCancel = nil
local jessie = createPed( 12, 359.712890625, 173.5654296875, 1008.3893432617 )
--local jessie = createPed( 141, 359.7060, 173.5371, 1008.3828 )
setPedRotation( jessie, 272 )
setElementDimension( jessie, 5 )
setElementInterior( jessie , 3 )
setElementData( jessie, \"talk\", 1 )
setElementData( jessie, \"name\", \"Jessie Smith\" )
setPedAnimation ( jessie, \"INT_OFFICE\", \"OFF_Sit_Idle_Loop\", -1, true, false, false )
setPedFrozen(jessie, true)
function showEmploymentWindow()

-- Employment Tooltip
if(getResourceFromName(\"tooltips-system\"))then
   triggerEvent(\"tooltips:showHelp\",getLocalPlayer(),7)
end

triggerServerEvent(\"onEmploymentServer\", getLocalPlayer())
local width, height = 300, 400
local scrWidth, scrHeight = guiGetScreenSize()
local x = scrWidth/2 - (width/2)
local y = scrHeight/2 - (height/2)

wEmployment = guiCreateStaticImage(x-100, y, 751, 400,\"kep.png\", false)
--dxDrawImage ( x, y, 751, 400, \'kep.png\' )

jobList = guiCreateGridList(0.05, 0.38, 0.45, 0.5, true, wEmployment)
local column = guiGridListAddColumn(jobList, \"Munka Neve\", 0.7)
-- TRUCKER
local row = guiGridListAddRow(jobList)
guiGridListSetItemText(jobList, row, column, \"Csomagszállító\", false, false)


-- BUS
local row = guiGridListAddRow(jobList)
guiGridListSetItemText(jobList, row, column, \"Busz sofőr\", false, false)

-- CITY MAINTENACE
local team = getPlayerTeam(getLocalPlayer())
local ftype = getElementData(team, \"type\")
if ftype ~= 2 then
end

local frakcio = getElementData(localPlayer, \"faction\")
if(frakcio == 52) then
local row = guiGridListAddRow(jobList)
guiGridListSetItemText(jobList, row, column, \"Szerelő - Frakcióval!\", false, false)
end

-- LOCKSMITH
local row = guiGridListAddRow(jobList)
guiGridListSetItemText(jobList, row, column, \"Lakatos\", false, false)

bAcceptJob = guiCreateLabel(0.57, 0.375, 0.23, 0.09, \"\", true, wEmployment)
bCancel = guiCreateLabel(0.57, 0.535, 0.23, 0.09, \"\", true, wEmployment)

showCursor(true)

addEventHandler(\"onClientGUIClick\", bAcceptJob, acceptJob)
addEventHandler(\"onClientGUIDoubleClick\", jobList, acceptJob)
addEventHandler(\"onClientGUIClick\", bCancel, cancelJob)
end
addEvent(\"onEmployment\", true)
addEventHandler(\"onEmployment\", getRootElement(), showEmploymentWindow)
function acceptJob(button, state)
if (button==\"left\") then
   local row, col = guiGridListGetSelectedItem(jobList)
   local job = getElementData(getLocalPlayer(), \"job\")
   
   if (row==-1) or (col==-1) then
      outputChatBox(\"Válassz munkát.\", 255, 0, 0)
   elseif (job>0) then
      outputChatBox(\"Már van munkád, elött vedd fel.\", 255, 0, 0)
   else
      local job = 0
      local jobtext = guiGridListGetItemText(jobList, guiGridListGetSelectedItem(jobList), 1)
      
      if ( jobtext==\"Delivery Driver\" or jobtext==\"Taxi Driver\" or jobtext==\"Bus Driver\" ) then  -- Driving job, requires the license
         local carlicense = getElementData(getLocalPlayer(), \"license.car\")
         if (carlicense~=1) then
            outputChatBox(\"You require a drivers license to do this job.\", 255, 0, 0)
            return
         end
      end
      
      if (jobtext==\"Csomagszállító\") then
         displayTruckerJob()
         job = 1
      elseif (jobtext==\"Taxi sofőr\") then
         job = 2
         displayTaxiJob()
      elseif  (jobtext==\"Busz sofőr\") then
         job = 3
         displayBusJob()
      elseif (jobtext==\"Közterület Fenntartó\") then
         job = 4
      elseif (jobtext==\"Szerelő - Frakcióval!\") then
         displayMechanicJob()
         triggerServerEvent(\"giveMechanicJob\", getLocalPlayer())
         job = 5
      elseif (jobtext==\"Lakatos\") then
         displayLocksmithJob()
         job = 6
      end
      
      triggerServerEvent(\"acceptJob\", getLocalPlayer(), job)
      
      destroyElement(jobList)
      destroyElement(bAcceptJob)
      destroyElement(bCancel)
      destroyElement(wEmployment)
      wEmployment, jobList, bAcceptJob, bCancel = nil, nil, nil, nil
      showCursor(false)
   end
end
end
function cancelJob(button, state)
if (source==bCancel) and (button==\"left\") then
   destroyElement(jobList)
   destroyElement(bAcceptJob)
   destroyElement(bCancel)
   destroyElement(wEmployment)
   wEmployment, jobList, bAcceptJob, bCancel = nil, nil, nil, nil
   showCursor(false)
end
end

 
 

ZeroMTA Városházára NPC lerakása
« Válasz #6 Dátum: 2017. Április 19. - 22:36:26 »
0
Csak az a gond vele hogy berakom és egy Retro Villige-és panelt kapok :D Meg ha felveszem a buszos melót akor kidob mert \"nem vagy buszos\". 
« Utoljára szerkesztve: 2017. Április 19. - 22:36:44 írta #Tom »

ZeroMTA Városházára NPC lerakása
« Válasz #7 Dátum: 2017. Április 24. - 20:07:54 »
0
Azért megjegyezném, Ben csak részeg, de igaza van!!!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal