Script, editare si utilizarea Multi Theft Auto

 

Informații cu privire la script (editare) si utilizare Multi Theft Auto (MTA) puteti afla in special pe site-ul https://wiki.multitheftauto.com/wiki/Main_Page 

Citind https://wiki.multitheftauto.com/wiki/Main_Page puteti afla multe despre MTA si sa depasiti faza de copiere si intuitie pe care o folosesc mare majoritate si sa invatati cum se creaza o harta, un gamemode, funcții de scripting de documente de ajutor, cum se scrie un exemplu cod, tutoriale sau pur si simplu cum se joacă MTA.

Prezentare generala site https://wiki.multitheftauto.com/wiki/Main_Page

Scripting

 

General Lua Ajutor

Pagini concepute pentru a ajuta înțelegerea dvs. de Lua

 

 

Practica

Editare job-system

De regula slujbele se dau la primarie.

Pentru a afla locatia de acordare a slujbei, ne ducem in locatia unde dorim sa acordam slujbe si tastam /getpos.

Ne notam datele geografice obtinute.

Deschidem fisierul c_job_system.lua, iar aici se trec coordonatele si slujbele.

 

Exemplu:

wEmployment, jobList, bAcceptJob, bCancel = nil

 

local jessie = createPed( 141, 359.7138671875, 173.8720703125, 1008.3893432617) -- Austin - 5/4/13

--local jessie = createPed( 141, 359.705078125, 173.5732421875, 1008.3893432617 )

setPedRotation( jessie, 272.81390380859 )

setElementDimension( jessie, 29 )

setElementInterior( jessie , 3 )

 

 

setElementData( jessie, "talk", 1, false )

setElementData( jessie, "name", "Jessie Smith", false )

--setPedAnimation ( jessie, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, true, false, false )

setElementFrozen(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 = guiCreateWindow(x, y, width, height, "Lista de Slujbe", false)

               

                jobList = guiCreateGridList(0.05, 0.05, 0.9, 0.8, true, wEmployment)

                local column = guiGridListAddColumn(jobList, "Titlul SLujbei", 0.9)

 

                -- TRUCKER

   local row = guiGridListAddRow(jobList)

                guiGridListSetItemText(jobList, row, column, "Transportator de Marfă", false, false)

               

                -- TAXI

                local row = guiGridListAddRow(jobList)

                guiGridListSetItemText(jobList, row, column, "Șofer de Taxi", false, false)

.............................................................................................................................................

                               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

 

 

 

Comentarii

Trebuie să fii autentificat pentru a adăuga un comentariu!

Nu a fost făcut nici un comentariu.

FidelityWorks.ro foloseste cookies pentru a-ti oferi o experienta cat mai placuta. Mai multe detalii