Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: praca
161. praca
[lua]local districtsBus = {
{1803.40, -1890.18, 12.92},
{1822.92, -1836.23, 12.93},
{1823.85, -1729.07, 12.90},
{1823.24, -1613.84, 12.90},
{1850.34, -1474.88, 12.90},
{1851.56, -1374.52, 12.91},
{1852.04, -1265.57, 12.91},
{1852.33, -1201.12, 21.63},
{1632.63, -1159.41, 23.41},
{1557.64, -1158.76, 23.42},
{1465.43, -1158.48, 23.25},
{1341.92, -1144.88, 23.18},
{1342.31, -1170.09, 23.21},
{1344.71, -1329.55, 12.91},
{1322.94, -1499.40, 12.89},
{1300.14, -1606.03, 12.90},
{1300.73, -1739.03, 12.90},
{1316.89, -1855.01, 12.90},
{1343.80, -1861.75, 12.90},
{1409.51, -1874.71, 12.90},
{1477.18, -1874.22, 12.90},
{1531.29, -1874.54, 12.91},
{1575.12, -1874.79, 12.90},
{1616.38, -1875.04, 12.90},
{1643.36, -1875.20, 12.90},
{1707.55, -1814.39, 12.88},
{1734.30, -1819.29, 12.89},
{1766.82, -1827.63, 12.90},
{1799.87, -1853.22, 12.93},
{1745.09, -1852.72, 12.93},


}

local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus

function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end

if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0

end

triggerServerEvent("destroyVeh", localPlayer)

end


function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxT...
162. Praca Split'a
[color=red][b]Po stronie Servera[/b][/color]
[lua]addEvent("obiektMagazynier", true)
addEventHandler("obiektMagazynier", root, function()
local obiekt = createObject(3800,0,0,1)
setElementData(source, "obiekt", obiekt)
setElementData(source, "wlasnosc", getPlayerName(source))
exports.bone_attach:attachElementToBone(obiekt, source, 1,0, 0.5, -0.5, 0, 0, 0)
setPedAnimation(source, "CARRY", "crry_prtial", 1, true, true, false)
setObjectScale(obiekt, 0.6)
end)

addEvent("delete_obiektMagazynier", true)
addEventHandler("delete_obiektMagazynier", root, function()
if getElementData(source, "wlasnosc") == getPlayerName(source) then
if getElementData(source, "obiekt") then
local obiekt = getElementData(source, "obiekt")
destroyElement(obiekt)
setPedAnimation(source, false)
end
end
end)

addEventHandler("onPlayerQuit", root, function()
if getElementData(source, "wlasnosc") == getPlayerName(source) then
if getElementData(source, "obiekt") then
local obiekt = getElementData(source, "obiekt")
destroyElement(obiekt)
end
end
end)
addEvent("givePlayerMoney",true)addEventHandler("givePlayerMoney", root, function(ile)givePlayerMoney(source, tonumber(ile))end)[/lua]

[color=red][b]Po stronie Clienta[/b][/color]
[lua]local jobPoints = {
{-1267.96, 2734.17, 50.10...
163. Praca
[code]local praca = createMarker(-2491.314453125, 2363.0693359375, 10.272477149963, "cylinder", 1.2, 0, 0, 255)
createBlipAttachedTo(praca, 61)

local miejsca = {
{-260.24542236328,1181.4959716797,20.941585540771},
{-258.55487060547,1151.0509033203,20.941585540771},
{-260.6171875,1131.4033203125,20.941585540771},
{-254.203125,1075.7197265625,20.941520690918},
{-44.9951171875,1081.08203125,20.947021484375},
{-48.8408203125,1113.634765625,20.941585540771},
{1.4712891578674,1076.3726806641,20.941585540771},
{64.8154296875,1005.4150390625,13.747417449951},
{70.23046875,973.1005859375,15.867414474487},
}

addEventHandler("onClientMarkerHit", praca, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox("* Aby rozpocz?? prac? wci?nij Spacje")
end)

bindKey("space", "down", function()
if not isElementWithinMarker(localPlayer, praca) then return end
if not getElementData(localPlayer, "gracz_praca") then
local losuj = math.random(2, #miejsca)
setElementData(localPlayer, "gracz_praca", true)
setElementModel(localPlayer,71)

local cel = createMarker(miejsca[losuj][1], miejsca[losuj][2], miejsca[losuj][3]-1.0, "cylinder", 1.0, 255, 0, 0)
local blip = createBlipAttachedTo(cel, 12)

addEventHandler("onClientMa...
164. [DM] Praca Dorywcza-triggerServerEvent
Witam mam prace dorywcz? i nie wiem dlaczego graczowi jak przejedzie przez marker nie daje pieni?dzy ?, Prosze o pomoc.

Server:

[lua]local m1 = createMarker(-2197.47,292.96,35.12, "cylinder", 4.0, 255, 0, 0)
vehs = {}


function removePreviousVehicles(plr)
for i,v in ipairs(getElementsByType("vehicle", resourceRoot)) do
local sby = getElementData(v, "zrespilGracz")
if sby and sby == plr and getPedOccupiedVehicle(plr) ~= v then
destroyElement(v)
end
end
end

addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("praca", el)
return
end

if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end

local x,y,z = getElementPosition(el)
local bus = createVehicle(408, x,y,z,0.0, 360.0, 269.9)

setElementData(bus, "zrespilGracz", el)
setElementData(bus, "pojazd_paliwo", 50)
setElementData(bus, "pojazd_przebieg", 100)

warpPedIntoVehicle(el, bus)
removePreviousVehicles(el)
triggerClientEvent(el, "STARTJobBus", resourceRoot, bus)

vehs[el] = bus
end)

addEvent("STOPJobBus", true)
addEventHandler("STOPJobBus", resourceRoot, function()
local pojazd = getPedOccupiedVehicle(localPlayer)
if pojazd then
...
165. Praca rolnika.Jak zrobić żeby inni gracze nie widzieli
Witam mam problem poniewa? gdy gracz wejdzie w marker i stworzy mu si? pojazd do pracy (traktor) jego markery wida? chcia?bym ?eby nie by?o ich wida? dla innych graczy tylko dla rolnika.

[code]Start = createMarker(-1034.9000244141,-1177.6999511719,128.19999694824,"cylinder",3,255,0,0,255,getRootElement())
blip = createBlip (-1034.9000244141,-1177.6999511719,128.19999694824, 52, 0, 0, 0, 255, myPlayer )

function startjob (hitElement,myPlayer)
if source == Start then
outputChatBox("Jestes rolnikiem, twoim zadaniem jest zrobic orke po wyznaczonych markerach",hitElement)
auto1 = createVehicle ( 531,-1035.9000244141,-1172.5999755859, 129.19999694824)
warpPedIntoVehicle (hitElement,auto1)
marker1 = createMarker(-1191.5,-1060.5999755859,129.19999694824,"checkpoint",3,255,0,0,255,myPlayer,hitElement)
destroyElement (Start,localplayer)
end
end
addEventHandler("onMarkerHit",getRootElement(),startjob)

function marker1f (hitElement,myPlayer,Source)
if source == marker1 then
destroyElement (marker1)
marker2 = createMarker(-1099.4000244141,-1057,129.19999694824,"checkpoint",3,255,0,0,255,myPlayer,hitElement)
end
end
addEventHandler("onMarkerHit",getRootElement(),marker1f)

function marker2f (hitElement,myPlayer)
if source == marker2 then
destroyElement (marker2)
marker3 = createMarker(-1027.4000244141,-1058.5,129.19999694824,"checkpoint",3,255,0,0,255,myPlayer,hitElement)
end
end
addEven...
166. Praca taxi.
Jak zrobi? aby auto taxi zniknelo oraz aby praca sie zakonczyla gdy gracz wyjdzie z taks?wki ?
167. Praca busiarza
Witam, mam tu prac? busiarza i mam problem gdy? jak robi? 2 osoby t? prac? i jedna osoba wysi?dzie z autobusu(ko?czy prac?) to tamtej osobie te? znikaj? markery i blipy i musi zaczyna? od nowa
kod
Kod:

function onBusStopHit(hitPlayer)
if not hitPlayer == client then return end
triggerServerEvent("bus_finish",client,client)
if isElement(blip) then destroyElement(blip) end
if isElement(marker) then
removeEventHandler("onClientMarkerHit",marker,onBusStopHit)
destroyElement(marker)
end
end

addEventHandler("onClientVehicleExit",rootElement,
function ()
if isElement(marker) then
removeEventHandler("onClientMarkerHit",marker,onBusStopHit)
destroyElement(marker)
end
if isElement(blip) then destroyElement(blip) end
end)
[/code]
168. Praca
Witajcie. Mam do was takie pytanko. Jak zrobi?, ?e zatrudniam si? w urz?dzie (to nie problem) ale, ?e mam ograniczon? liczb? wolnych miejsc. I jak si? dodawa?o osoby do acl przez komend? jak si? zatrudniam do pracy
169. Praca kierowcy autobusu
Witam chcia?bym edytowa? prac? kierowcy autobusu, aby po wyj?ciu z autobusu nie trzeba by?o robi? reconnecta, aby zn?w si? w tej pracy zatrudni?.

Link do skrptu: http://www59.zippyshare.com/v/98O1SFoi/file.html

PS: Nie chc? gotowej pracy tylko linijke kt?r? usun??/doda?. Z g?ry dzi?ki.[/code]
170. Praca Dorywcza :)
Witam napisalem skrypt ( po strone serwera )
B?edy respi? sie 2 pojazdy
i Kiedy wjedzie w ostatni marker to nic sie nie usuwa
KOD

xxxx
171. [SAMP] [Obiekt] Praca dorywcza -
Witajcie.
Chcia?bym przedstawi? kolejny nowy obiekt tym razem zbudowany przez Mc.Duli a jest to Praca dorywcza - Drwal(filmik prezentuj?cy b?dzie na dole). Obiekt znajduje si? w Angel Pine. Nast?pnym zapowiadanym obiektem b?dzie Siedziba Sta?y Granicznej.

si?

PRACA DORYWCZA - DRWAL



Oceniajcie w komentarzach.


172. [INNE] Praca dorywcza
Witam chcia?bym napisa? prace dorywcz? drwal , chodzi mi o to ?e drwal ?cina drzewa pi?? ?a?cuchow? , drzewo ma swoje hp i jak drwal ?cina to dla drzewa mniejszy si? hp , jak zetnie drzewo to znika .



Dzi?ki :piwo:
173. Praca
Witam pisz? ten temat po raz 3. Chodzi mi o destroyElement kt?ry w kodzie poni?ej mia? pe?ni? funkcj? usuwania markera ale nie usuwa go czy moge prosi? o pomoc po raz 3 (no chyba to nie takie trudne ...)

start createMarker(-2532.5,-616.09997558594,131.60000610352,"cylinder",2,254,0,0,255,getRootElement()) 

function 
ladowanie (hitElement
outputChatBox "Podje?e? prace reportera, jedz do miejsca oznaczonego blipem na mapie",hitElement
local yolo createMarker(-2142.1000976563,-221.69999694824,34.299999237061,"cylinder",2,255,0,0,255,getRootElement()) 
local blip createBlip ( -2142.1000976563, -221.6999969482434.29999923706141000255myPlayer 
end 
addEventHandler
("onMarkerHit",start,ladowanie

function 
koniec (hitElement,thePlayer,amount
if 
source == yolo then
destroyElement
yolo 
givePlayerMoney thePlayer75 
outputChatBox "Zako?czy?e? prace.Zarobek: +75 euro",hitElement
end 
end 
addEventHandler
("onMarkerHit",getRootElement(),koniec
174. Praca mechanika
Client

[lua]local w_m={}
--utils
function math.round(number, decimals, method)
decimals = decimals or 0
local factor = 10 ^ decimals
if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor
else return tonumber(("%."..decimals.."f"):format(number)) end
end
function string:split(sep)
local sep, fields = sep or ":", {}
local pattern = string.format("([^%s]+)", sep)
self:gsub(pattern, function(c) fields[#fields+1] = c end)
return fields
end
w_m.wnd = guiCreateWindow(0.1469,0.1667,0.7344,0.675,"Panel mechanika",true)
w_m.btn_napraw = guiCreateButton(0.0277,0.8395,0.3064,0.1327,"Napraw",true,w_m.wnd)
w_m.btn_zamknij = guiCreateButton(0.3427,0.8395,0.3064,0.1327,"Zamknij",true,w_m.wnd)
w_m.lbl_info = guiCreateLabel(0.6, 0.8395, 0.35, 0.1327, "", true, w_m.wnd)
w_m.lbl_costinfo = guiCreateLabel(0.6, 0.8395, 0.35, 0.1327, "", true, w_m.wnd)
guiLabelSetHorizontalAlign(w_m.lbl_info, "center", true)
guiLabelSetVerticalAlign(w_m.lbl_info, "center")
w_m.grid = guiCreateGridList(0.0298,0.0895,0.9383,0.7191,true,w_m.wnd)
guiGridListSetSelectionMode(w_m.grid,1)
guiGridListSetSortingEnabled(w_m.grid,false)
w_m.grid_nazwa = guiGridListAddColumn ( w_m.grid, "Nazwa cz??ci", 0.3 )
w_m.grid_stan = guiGridListAddColumn ( w_m.grid, "Stan cz??ci", 0.3 )
w_m.grid_koszt = guiGridListAddColu...
175. [GF] Praca dorywcza - podstawy
Witam, ot?? nasz?a mnie ochota na zrobienie nowej pracy dorywczej pod Role Playa.
Na sam pocz?tek chcia?bym ogarn?? ca?e gui jak wjedzie si? w marker, og?lnie podj?cie pracy, ale nie wiem kilku rzeczy;

Je?eli chcemy zrobi? na przyk?ad prace koszenia, to trzeba chyba zrobi? odpowiednie obiekty, ale chcia?bym je z timere, tzw. obiekty co np. 5 minut si? respi?.

Po tym chcia?bym zrobi? tak, ?e je?eli wjedzie si? w obiekt, to on znika (i respi si? za te np. 5 minut) a w zamian dostajemy pieni?dze...?

Ogarn??by kto? podstaw??
176. Praca autobusy
Witam mam problem z praca kierowca autobusu poniewasz mam jeden przestanek i po nim bym chcial zeby po tym przestanku praca sie konczyla i pisalo "zakonczyles prace" i zeby potym jednym przestanku odrazu sie dostawalo kase a nie dopiero po wyjsciu z busa i zebym mugl sam ustawic ile ma dawac graczowi kasy.
co dopisac do skryptu i gdzie ?

Piwko napewno poleci ;)


local rootElement = getRootElement()
local busses = {[431] = true, [437] = true}
local busTable = {
[1]={-1990.33325, 138.666671, 26.948751},
}

createBlip(1256.6, -1812.2, 13.41, 55, 3, 0, 0, 255, 255, 0, 250)

function getNewBusLocation(thePlayer, ID)
local x, y, z = busTable[ID][1], busTable[ID][2], busTable[ID][3]
triggerClientEvent(thePlayer,"bus_set_location",thePlayer,x,y,z)
end

function busJob(thePlayer)
local theVehicle = getPedOccupiedVehicle (thePlayer)
local id = getElementModel(theVehicle)
if id == 431 or id == 437 then
local x, y, z = getNewBusLocation(thePlayer, 1)
setElementData(thePlayer,"buszp",0)
setElementData(thePlayer,"busData",1)
else
end
end
addEventHandler("onVehicleEnter",rootElement,busJob)

function busStart(thePlayer)
local theVehicle = getPedOccupiedVehicle (thePlayer)
local id = getElementModel(theVehicle)
if id == 431 or id == 437 then
outputChatBox("Zacz??e? prac? busiarza!", thePlayer, 255, 255, 0)
end
end
addEventHandler("onVehicleEnter",rootElement,busStart...
177. Praca taxi
Witam mam problem dokladnie z tym ze jak biore prace taxi i pokazuje mi wyznaczone miejsce to te miejsce kazdy widzi jak zrobic zebym tylko ja je widzial na f11 i radarze ?

Prosze o to skrypt:


local pickups = {
[1]={ 2060.7685546875, -1941.1181640625, 13.14103603363 },
[2]={ 2114.5068359375, -1611.302734375, 13.167269706726 },
[3]={ 1932.9521484375, -1776.1259765625, 13.16081237793 },
[4]={ 1057.41796875, -1568.4853515625, 13.166387557983 },
[5]={ 1133.2607421875, -1286.6201171875, 13.245727539063 },
[6]={ 1197.380859375, -1576.9228515625, 13.2406873703 },
[7]={ 1275.6181640625, -1717.5087890625, 13.241578102112 },
[8]={ 1041.908203125, -1869.1728515625, 13.15417766571 },
[9]={ 680.9248046875, -1763.6552734375, 13.168544769287 },
[10]={ 597.5556640625, -1598.90234375, 16.215705871582 },
[11]={ 357.197265625, -1443.72265625, 34.185447692871 }
}

local dropoffss = {
[1]={ 1965.54296875 , -1883.013671875, 13.160305023193 },
[2]={ 1467.3916015625, -1736.419921875, 13.242918014526 },
[3]={ 2376.1064453125, -1728.4091796875, 13.162055015564 },
[4]={ 1066.5029296875, -1200.86328125, 18.405519485474 },
[5]={ 584.8916015625, -1328.7021484375, 13.25985622406 },
[6]={ 989.75, -1372.083984375, 13.244333267212 },
[7]={ 1116.333984375, -1410.7666015625, 13.267498970032 },
[8]={ 1437.5244140625, -1039.8212890625, 23.564819335938 },
[9]={ 2124.4521484375, -1116.4931640625, 25.031726837158 },
[10]={ 2700.8857421875, -1091.896484375, 69.064071655273 },
[11]={ 2...
178. Praca złodzieja
Hej mam taki problem, zrobi?em prace z?odzieja, je?eli wejd? w odpowiedni marker to wtedy loguje si? do teamu "Zlodziej" i mog? okrada? domy, jednak pojawia si? problem ustali?em zasad? ?e z?odziej mo?e w ka?dej chwili zosta? zaaresztowany, i jest bug, bo je?eli zaczn? prace i wylosuje mi si? punkt to mog? wtedy si? wylogowa? z pracy, i nie jestem w frakcji z?odzieja, czyli ludzie mogli by wchodzi? w marker, zaczyna? prace, ustawia? ?e j? ko?cz? i nadal pracowa?..
Pr?bowa?em zrobi? tak ?e je?eli nacisn? button ?eby wylogowa? si? z pracy to wtedy znikaj? blipy, jednak kupa, nie dzia?a..


[code]local robberHouses =
{
{2068.2900, -1731.7000, 13.40000};
{2068.0000, -1717.0000, 13.50000};
{2066.3500, -1703.6100, 14.00000};
{1578.9305, -1854.7676, 12.52316};
{1578.8262, -1849.8280, 12.50225};
{1578.8118, -1844.7125, 12.47879};
{1578.6039, -1838.1161, 12.45906};
{1578.8076, -1830.3185, 12.41063};
{1579.0154, -1822.3708, 12.36126};
{1561.1942, -1851.2946, 12.54688};
{1560.9133, -1856.3010, 12.54688};
{1548.7744, -1864.3113, 12.54688};
{1516.6418, -1863.8145, 12.54688};
{1508.3979, -1864.4238, 12.54688};
{1831.1066, -1842.7246, 12.57813};
{1846.855, -1867.9115, 12.578130};
{1849.4114, -1924.5156, 12.54688};
{1871.175, -1923.9319, 12.546880};
{1892.6923, -1925.1014, 12.54688};
{1914.3218, -1923.9233, 12.54688};
{1936.0159, -1923.5731, 12.54688};
{1950.9832, -1985.4805, 12.54688};
{1954.7863, -2003.8013, 12.54688};
{1974.76...
179. Praca kierowcy tira
Witam, mam pytanie odno?nie pracy.
Mam prac?, kt?ra dzia?a:

jest marker, wchodz? w niego to mnie teleportuje do tira. Podczepiam naczep? i jad? do celu. W lokalizacji docelowej jest drugi marker kt?ry niszczy mi tira i naczep? oraz daje kas?.

Problem polega na tym, ?e marker pocz?tkowy si? nie odnawia.
Blip owszem, pojawia si? na mapie w lokalizacji pocz?tkowej. Ale nie ma ju? tam markera...

Skrypt jest ca?kowicie po stronie servera.

Ca?y skrypt posiadam z community, bo stwierdzi?em, ?e na gotowych b?dzie mi si? ?atwiej uczy?(ostatnim razem jak pisa?em od zera skrypt, to nie do ko?ca dzia?a? na hostowanym servie. Ale to inny temat).

[lua]--// Made by: MoPoMaN

--//Tables and other stuff
tableLocationsX = {}
tableLocationsY = {}
tableLocationsZ = {}

tableMoney = {}
locationCount = 4

--//Location 1
tableLocationsX[1] = 2253.7
tableLocationsY[1] = -84.0
tableLocationsZ[1] = 25.3

tableMoney[1] = 500

--//Location 2
tableLocationsX[2] = 1093.7
tableLocationsY[2] = -931.6
tableLocationsZ[2] = 41.9

tableMoney[2] = 550

--//Location3
tableLocationsX[3] = -47.3
tableLocationsY[3] = -1137.5
tableLocationsZ[3] = 0.07

tableMoney[3] = 500

--//Location4
tableLocationsX[4] = 1198
tableLocationsY[4] = -1828
tableLocationsZ[4] = 12.3

tableMoney[4] = 350

function startScript ()
--Marker
marker = createMarker (2177, -2258, 13.7, "cylinder", 1.1, 255, 90, 0, 255)
addEventHandler ("onMarkerHit", marker, star...
180. Praca Gazety
Witam, mam pewien problem, zrobi?em sobie prac? gazety lecz nie dzia?a jak powinna ot?? buguje si? jak 2 gracze wykonuj? t? prac?....

[lua]function startGazeciarz(plr)
if not(getElementData(plr, "gracz_xpraca")) then
local rnd = math.random (1, #Punkty)
marker = createMarker(Punkty[rnd][1], Punkty[rnd][2], Punkty[rnd][3]-0.96, "cylinder", 1, 0, 0, 255, 255, plr)
blip = createBlip(Punkty[rnd][1], Punkty[rnd][2], Punkty[rnd][3]-0.96, 41, 2, 255, 0, 0, 255, 0, 3000, plr)

if numer == 0 then
outputChatBox("** Zakazuje si? jechania do punkt?w pojazdem, tylko rowerami! **", plr)
outputChatBox("* Rozpocz??e? prac?, dostarcz gazet? do miejsca na mapie!", plr)
setElementData(plr, "gracz_praca", true)
end

addEventHandler("onMarkerHit", marker, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if numer == 10 then
numer = 0
destroyElement(blip)
destroyElement(marker)
givePlayerMoney(el, koszt)
setElementData(el, "gracz_praca", false)
outputChatBox("* Zako?czy?e? prac?, podsumuj?c otrzymujesz: ".. koszt .." EUR i ".. koszt2 .." GP", el)
else
destroyElement(blip)
destroyElement(marker)
numer = numer + 1
startGazeciarz(el)
end
end)
else
outputChatBox("* Ju? posiadasz aktywn? prac?!", plr)
end
end
addEventHandler("onMarkerHit...
181. [SKRYPT] Praca wędkarza
Siema, chc? wam przedstawi? prosty skrypt, kt?ry dodaje na pomo?cie w San Fierro punkty rybackie, dzi?ki kt?rym mo?emy zarobi? troch? pieni?dzy ;) Nie wstawiam SS bo uwa?am ?e wszystko jest raczej jasne

Licz? na :piwo: :P

Kod:

http://www.mediafire.com/download/59s4wcobjgq98jp/wedkarz.rar
182. Praca Dorywcza
Witam. Ot??, napisa?em sobi? kod na skrypt pracy dorywczej. Ale po wje?dzie w marker 1, nic si? nie dzieje. Prosz? o pomoc, naturalnie :piwo:
[lua]local gracz = getLocalPlayer()

function info(tekst)
exports.msgboxrpg:showBox("info",tekst)
end

ped2 = createPed(60, -134.60380554199, 1116.5102539063, 20.196640014648)
setPedAnimation( ped2, "RAPPING", "RAP_B_Loop")

start = createMarker (-136.267578125, 1116.515625, 20.196640014648, "cylinder", 1, 24, 56, 21)

function funkcja1(hitElement)
if hitElement == getLocalPlayer() then
if getElementData (hitElement, "praca:kurier") == false then
info("Rozpocz??e? prac? jako kurier. Dowie? paczk? w dane miejsce.")
triggerServerEvent ("Dajpojazd", getLocalPlayer(), hitElement)
marker1 = createMarker (2182.9260253906, 1677.2681884766, 11.074653625488, "cylinder", 3.5, 255, 255, 0)
blip1 = createBlipAttachedTo ( marker1, 41 )
setElementPosition(gracz, -140.87875366211, 1124.3336181641, 19.749988555908 )
setElementData(gracz, "praca:kurier", true)
else
info("Ju? zacz??e?/a? prac? jako kurier.")
end
end
end
addEventHandler("onClientMarkerHit", start, funkcja1 )

function funkcja2(hitElement)
if getElementData (gracz, "praca:kurier") == true then
info("Odwioz?e? paczk?, teraz oddaj pojazd do firmy.")
destroyElement(marker1)
destroyElement(blip1)
ostatni = createMarker (-137.49137878...
183. Praca smieciarza
Witam, zrobi?em sobie prac? ?mieciarza problem tkwi w tym ?e nie mog? zrobi? ?eby z tablicy wszystkie punkty si? pokazywa?y i jak wjad? w wybrany z nich usuwa si? marker, pr?bowa?em, bawi?em si? ale nie mog? si? z tym upora?.

addEventHandler("onVehicleEnter"root, function(playerseatjacked)
    if 
getElementData(source"smieciarka") == 1 then
        
if seat==0 then
            setElementFrozen
(sourcefalse)
            
setElementData(source"smieciarka_ladunek"0)
            
setElementData(source"pojazd_opis""Zape?nienie: 0%")
            
outputChatBox("* Rozpocz??e? prac? jako Smieciarz!"player)
            for 
i in pairs(Punkty) do
                
marker createMarker(Punkty[i] [1], Punkty[i] [2],  Punkty[i] [3], "cylinder"600255)

            
addEventHandler("onMarkerHit"marker, function(el)
                
destroyElement(marker[i])
            
end)
            
end
        end
    end
end
)


// brat starszy maxerxxl, pozwolenie na za?o?enie tematu
184. Praca, jeden gracz
Witam serdecznie. Mam wielki problem. Pr?bowa?em sam si? z nim upora?, ale moja wiedza jest zbyt ma?a :( . Chodzi o to, ?e w pracy autobus, gdy jaki? gracz na serwerze wejdzie do autobusu ka?demu wy?wietli si? info na czacie "Zacz??e? prace kierowcy autobusu (...)" A gdy kilka os?b wejdzie do autobusu, to jeden b?dzie m?g? "kra??" przystanki drugiemu. Jak zrobi? ?eby praca by?a tak jakby dla jednego gracza. Tutaj kod:

C-side:
[lua]
local client = getLocalPlayer( )
local rootElement = getRootElement()
local marker = nil
local blip = nil

addEvent("otobus_durak_loc",true)
addEventHandler("otobus_durak_loc",rootElement,
function (x, y, z)
marker = createMarker(tostring(x), tostring(y), tostring(z)-1, "cylinder", 3.5, 0, 255, 119, 170)
blip = createBlipAttachedTo( marker, 0, 2, 0, 255, 119, 255 )
addEventHandler("onClientMarkerHit",marker,onBusStopHit)
end)

function onBusStopHit(hitPlayer)
if not hitPlayer == client then return end
triggerServerEvent("gorev_bitir",client,client)
if isElement(blip) then destroyElement(blip) end
if isElement(marker) then
removeEventHandler("onClientMarkerHit",marker,onBusStopHit)
destroyElement(marker)
end
end

addEventHandler("onClientVehicleExit",rootElement,
function ()
if isElement(marker) then
removeEventHandler("onClientMarkerHit",marker,onBusStopHit)
destroyElement(marker)
end
if isElement(blip) then destr...
185. Praca autobus
Witam serdecznie wszystkich, kt?rzy czytaj? ten post :) Mam malutki problem. Ko?cz? ju? prace dorywcz? autobus i ustawi?em, ?e prace powinno si? zaczyna? tylko w poje?dzie id: 437, czyli coach, czyli po polsku autokar tz. autobus. Ale problem polega na tym, ?e faktycznie, prace mo?na wykonywa? tylko w autobusie, bo to tam dostaje kas? za przyjechanie markera, jednak wsiadaj?c do ka?dego pojazdu pojawia mi si? pierwszy marker i informacja, kt?r? zrobi?em. Tutaj potem kawa?ek S-side, kt?re jest potrzebne w tej kwesti :D Mam nadziej?, ?e uda wam si? mi pom?c, a za pomoc daje :piwo:
Kawa?ek S-side:

local busses 
= {[437] = true} -- to jak zwykle na pocz?tku kodu

--poni?ej reszta kodaminwypisane markery.....

function 
onVehicleEnter(thePlayer)
outputChatBox ("Zacz??e? prace kierowcy autobusu. Na ka?dym przystanku zatrzymaj si? na 8sek. Pami?taj, aby nie opuszcza? pojazdu.")
local xyyeniDurak(thePlayer1)
setElementData(thePlayer,"Data",1)
  
end
addEventHandler
("onVehicleEnter",rootElement,onVehicleEnter)

--
reszta kodu


[ Dodano: 2014-08-27, 00:22 ]
PS: jak wjad? w ten pierwszy marker, kt?ry pojawia si? jak wejd? w ka?de auto, nie dostaje kasy, marker znika a kolejny si? nie pojawia. Jak zrobi? to, ?eby ten marker nie pokazywa? si? w ka?dym aucie, tylko ?eby pokaza? si? w ID: 437
186. Praca
Witam, mam do?? du?y problem.
Zrobi?em prac?, obok kt?rej spawnuje si? pojazd kt?rym trzeba przetransportowa? "hajsy" dla magazynu, problem jest taki ?e wystarczy ?e pojad? do magazynu tym burrito i bez brania pracy mog? odda?, wi?c prosz? o sprostowanie jak zrobi? taki warunek by bez niego nie da?o si? odda? "hajs?w"

I prosz? o wypowiedzenie si? w poprzednim po?cie, co do namierzania i? mo?liwe ?e nikt nie zauwa?y? ?e nadal jest b??d w db :) Pozdro.

To kodzik:

Kod:

addEventHandler("onMarkerHit",sklepfc,
function(element)
auto = getPedOccupiedVehicle ( element )
if not auto then return end
if auta[getElementModel(auto)] then
outputChatBox ( "[Informacja] Pojed? do magazynu w Las Venturas by zap?aci? za kupiony przez sklep towar.",element,100,100,0,true)
else
outputChatBox ("[B??d] Potrzebujesz odpowiedniego pojazdu by odebra? zlecenie !",element,200,200,0,true)
end
end)

addEventHandler("onMarkerHit",magazyn,
function(element)
auto = getPedOccupiedVehicle ( element )
if not auto then return end
if auta[getElementModel(auto)] then
outputChatBox( "[Informacja] Oddano pieni?dze w?a?cicielowi magazynu, obok czeka kolejne zlecenie sprawd? je!",element,200,200,0,true)
destroyElement(pojazd)
else
outputChatBox ("[B??d] Potrzebujesz odpowiedniego pojazdu, lub nie dobra?e? zlecenia !",element,200,200,0,true)
end
end)
187. Praca Mechanika
Witam, znalaz?em temat na necie w kt?rym by? zamieszczony kod do pracy Mechanika, aczkolwiek kod mi nie dzia?a, prosi? bym o pomoc.

C-side:
[code]local marker = createMarker( 1037.8309326172, -1029.5063476563, 31.1015625, "Cylinder", 1.5, 255, 153, 0, 150)
local localVehicle = getPedOccupiedVehicle(localPlayer)
--- marker createMarker ( float x, float y, float z, [string theType, float size, int r, int g, int b, int a] )

GUIEditor_Button = {}
GUIEditor_Memo = {}
GUIEditor_Label = {}

function guiMyCwindow(w,h,t)
local x,y = guiGetScreenSize()
return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false)
end

windowjob = guiMyCwindow(301,250,"mechanic job")
guiSetVisible(windowjob, false)
GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob)
GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob)
GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob)
GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take mechanic job, press Take job.nnIf you don't want to, press Cancel.",false,windowjob)
guiEditSetReadOnly(GUIEditor_Memo[1],true)

function mecjob(hitElement)
if getElementType(hitElement) == "player" then
if not guiGetVisible(windowjob) then
guiSetVisible(windowjob, true)
showCursor(true)
end
end
end
addEventHandler("onClientMarkerHit", marker,...
188. Praca Dorywcza
Witam! Zrobi?em sobi? prac? dorywcz?, lecz jedna rzecz nie dzia?a. Kiedy maj?c prac?, wje?d?am w marker roz?adunku - nic si? nie dzieje; totalnie. Za pomoc, naturalnie :piwo:

KOD KLIENT:[lua]function info(tekst)
exports.msgboxrpg:showBox("info",tekst)
end

markerPracy = createMarker ( 750.4638671875,-1335.3283691406,13,"cylinder",1.5,255,255,255 )

--Funkcja wyswietlenia GUI zaladunku
addEventHandler ( "onClientMarkerHit", markerPracy, function(element)
if element ~= getLocalPlayer() then return end
guiSetVisible(kurierOkno, true)
guiSetVisible(podejmij, true)
guiSetVisible(opis, true)
guiSetVisible(anuluj, true)
showCursor ( true )
end)

--Gui Zaladunku
kurierOkno = guiCreateWindow(451, 234, 382, 316, "", false)
guiWindowSetMovable(kurierOkno, false)
guiWindowSetSizable(kurierOkno, false)
podejmij = guiCreateButton(459, 488, 139, 39, "Podejmij Prac?",false)
anuluj = guiCreateButton(684, 488, 139, 39, "Zamknij",false)
opis = guiCreateLabel(459, 271, 373, 184, "Kurier Poczty Santos - Wcielasz si? w rol? kuriera Poczty Santos.nZa?adowywujesz paczk?, poczym wieziesz do klienta. Za wykonanen zadanie, bez uszkodzenia paczki otrzymujesz 1 Best Points i 500$.",false)
guiSetFont(opis, "default-bold-small")
guiLabelSetColor(opis, 0, 227, 255)
guiLabelSetHorizontalAlign(opis, "center", false)
guiSetVisible(kurierOkno, false)
guiSetVisible(podejmij, false)
guiSetVisib...
189. Praca dorywcza - kurier
Witam! Napisa?em prac? dorywcz? kuriera, lecz niestety nie dzia?a, po wej?ciu na serwer odrazu pojawia si? gui roz?adunku, a po wej?ciu w markery nic si? nie dzieje. Za pomoc = :piwo:

Kod klient:[lua]function info(tekst)
exports.msgboxrpg:showBox("info",tekst)
end

markerPracy = createMarker ( 750.4638671875,-1335.3283691406,13.538581848145,"cylinder",1.2,255,255,255 )
blipPracy = createBlip ( 750.4638671875,-1335.3283691406,13.538581848145, 51 )

--Funkcja wyswietlenia GUI zaladunku
function wyswietlGUI()
addEventHandler ( "onClientMarkerHit", markerPracy, function(hitPlayer)
if source ~= marker and element ~= getLocalPlayer() then return end
guiSetVisible ( kurierOkno, true )
showCursor ( true )
end)
end

--Przyjecie i odmowienie pracy
addEventHandler ( "onClientGUIClick", anuluj, function()
guiSetVisible(kurierOkno,false)
showCursor(false)
end)

addEventHandler ( "onClientGUIClick", podejmij, function()
guiSetVisible(kurierOkno,false)
showCursor(false)
celBlip = createBlip ( 2801.4165039063, -1087.7769775391, 30.721715927124, 41 )
celMarker = createMarker ( 2801.4165039063, -1087.7769775391, 30.721715927124, "cylinder", 1.5, 255, 255, 0, 170 )
info("Punkt celu oznaczony zosta? na mapie, dowie? tam paczki kt?re zosta?y ci za?adowane.")
end)

--Gui Zaladunku
kurierOkno = guiCreateTab("Praca Dorywcza - Kurier Poczty santos")
kurierTlo = guiCreateTabPanel(451, 234...
190. Praca Dorywcza
Witam! Pisz? skrypt z pomoc? kolegi na prace dorywcz?. Lecz jednak co? nie dzia?a... Za popraw? = :piwo: .
W db3 nic, a markery si? nie pokazuj?...

KOD:[lua]--Skalowanie
function Skaluj(sw, sh, sw2, sh2)
local sWidth,sHeight = guiGetScreenSize()
local scaleX, scaleY=(sWidth/1280), (sHeight/800)
return (sw*scaleX), (sh*scaleY), (sw2*scaleX), (sh2*scaleY)
end


x,y,w,h = Skaluj ( 451, 234, 382, 316 )
x1,y1,w1,h1 = Skaluj ( 459, 488, 139, 39 )
x2,y2,w2,h2 = Skaluj ( 684, 488, 139, 39 )
x3,y3,w3,h3 = Skaluj ( 459, 271, 373, 184 )

--Gui podj?cia
sprz?tanieOkno = guiCreateWindow(x,y,w,h, "Praca Dorywcza - Sprz?tanie Miasta",false)
guiWindowSetMovable(sprz?tanieOkno, false)
guiWindowSetSizable(sprz?tanieOkno, false)
podejmij = guiCreateButton(x1,y1,w1,h1, "Podejmij Prac?",false,sprz?tanieOkno)
guiSetProperty(podejmij, "NormalTextColour", "FF11FF00")
anuluj = guiCreateButton(x2,y2,w2,h2, "Anuluj",false,sprz?tanieOkno)
guiSetProperty(anuluj, "NormalTextColour", "FFFF0000")
opis = guiCreateLabel(x3,y3,w3,h3, "Sprz?tanie Miasta Santos - Jezdzisz Sweeperem po miescie wjezdzaszntworz? si? blipy na mapie za kt?rymi musisz jecha?. Za wykonane zadanie otrzymujesz 1 Best Points i 1000$.",false,sprz?tanieOkno)
guiSetFont(opis, "default-bold-small")
guiLabelSetColor(opis, 0, 227, 255)
guiLabelSetHorizontalAlign(opis, "center", false)


--Praca
local au...
191. Praca Dorywcza
Cze??! Rozpocz??em prac? nad "Pracami Dorywczymi". Mam dopiero gui i jakie? rozpocz?cia z pracami, pomo?e kto?? Chcia?bym aby po wej?ciu w marker wy?wietla? si? panel. Za pomoc = :piwo:

Kod:

kurierOkno 
guiCreateWindow(451234382316"Praca Dorywcza - Kurier Poczty Santos",false)
guiWindowSetMovable(kurierOknofalse)
guiWindowSetSizable(kurierOknofalse)
podejmij guiCreateButton(45948813939"Podejmij Prac?",false,kurierOkno)
guiSetProperty(podejmij"NormalTextColour""FF11FF00")
anuluj guiCreateButton(68448813939"Anuluj",false,kurierOkno)
guiSetProperty(anuluj"NormalTextColour""FFFF0000")
opis guiCreateLabel(459271373184"Kurier Poczty Santos - Wcielasz si? w rol? kuriera Poczty Santos.nZa?odwujesz paczk?, poczym wieziesz do klienta. Za wykonanen zadanie, bez uszkodzenia paczki otrzymujesz 1 Best Points.",false,kurierOkno)
guiSetFont(opis"default-bold-small")
guiLabelSetColor(opis0227255)
guiLabelSetHorizontalAlign(opis"center"false)
192. Praca - Tablice i Markery
Witajcie. Jak m?g?bym zrobi? punkty przez, kt?re trzeba by?oby przeje?d?a? 1 po 1 i ?eby to tylko jednej osobie si? zalicza?o ? W sensie jak praca autobusiarza, ?e jedziesz z jednego punktu do drugiego i np. dostajesz pieni?dze za to. Pomo?e kto? ? :)
Stawiam zimne :piwo:
193. Praca kierowcy autobusu
Witajcie.

Mam system na prac? w taxi i tam boty si? pojawiaj? w jaki? tam miejscach, a jak zrobi? w systemie pracy kierowcy autobusu ?eby boty wszystkie by?y wy?wietlone ?

Oto kod z tych bot?w [chyba] :

[lua]
function startJob ( thePlayer )
local x, y, z = unpack ( pickups [ math.random ( #pickups ) ] )
markers [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 0 )
mposi = { getElementPosition( markers [ thePlayer ] ) }
local skins = unpack ( pedCus [ math.random ( #pedCus ) ] )
peds [ thePlayer ] = createPed( skins, x, y, z )
blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 58 )
addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit )
end

function inVEH ( thePlayer )
if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then
if ( getElementModel ( source ) == 431 ) then
startJob ( thePlayer )
end
end
end
addEventHandler ( "onVehicleEnter", getRootElement(), inVEH )

function warpit ( thePlayer )
if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then
local vehiclee = getPedOccupiedVehicle ( thePlayer )
if ( getElementModel ( vehiclee ) == 431 ) then
setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 )
destroyJob ( thePlayer )
local x, y, z = unpack ( dropoffss ...
194. [GF] Praca na serwerze.
Cze??, doda?em na serwer prace po wykonaniu przez ni? zadania dostaje na moment kas? i nagle anty money hack zabiera j?.
Jak zrobi? ?eby nie zabiera?a tej kasy?
Anty money hack:
Kod:

public UpdateMoney()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gPlayerLogged[i])
{
if(GetPlayerCash(i) != GetPlayerMoney(i))
{
new hack = GetPlayerMoney(i) - GetPlayerCash(i);
if(hack >= 50000)
{
new string[128];
format(string, sizeof(string), "[Ostrze?enie:] %s (ID:%d) pr?buje doda? sobie $%d - To mo?e by? cheat",GetPlayerNameEx(i),i, hack);
HackLog(string);
}
ResetMoneyBar(i);
UpdateMoneyBar(i,PlayerInfo[i][pCash]);
}
}
}
}
return 1;
}

Kawa?ek kodu pracy:
Kod:

if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint6))
{
SetPlayerCheckpoint(playerid, Checkpoint7, 7.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint7))
{
GivePlayerMoney(playerid, 200);
GameTextForPlayer(playerid, "~g~You Completed the job, well done!", 3000, 3);
SetVehicleToRespawn(2);
DisablePlayerCheckpoint(playerid);
combinejobrunning = 0;
}
}
}

B?d? :piwo: :piwo: :piwo: