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: pracy.
1. Wymagania do pracy.
Siemka! Chcia?bym aby doda? wymagania do pracy zio?a.

Z tego co si? orientuj? to chyba ta linijka:

if getElementData(el, "player:srp") < 1250 then outputChatBox('✘#ffffff Nie spe?niasz wymaga? - Wymagania 1250 SRP', el, 255, 0, 0, true) return end[code]







[code]Client:

q = {
{-1523.00, 2621.56, 55.84, 92.075073242188},
{-1512.79, 2637.70, 55.84, 92.075073242188},
{-1517.99, 2646.68, 55.84, 92.075073242188},
{-1517.91, 2622.10, 55.84, 89.723968505859},
{-1520.47, 2633.49, 55.84, 272.09979248047},
{-1522.98, 2643.00, 55.84, 270.33645629883},
{-1526.63, 2622.53, 55.84, 270.92422485352},
{-1525.68, 2636.54, 55.84, 270.33645629883},
}
function stworzmaryche(plr, md)
x = math.random(1, #q)
object = createObject(14400, q[x][1], q[x][2], q[x][3]-0.55, 0,0, q[x][4], false)
setObjectScale(object, 0.5)
marker = createMarker(q[x][1], q[x][2], q[x][3]+4, "arrow", 1.4, 255,0,0, 40)
blip = createBlip(q[x][1], q[x][2], q[x][3],12)
marker2 = createMarker(q[x][1], q[x][2], q[x][3], "corona", 1.2, 0,0,0)
setElementAlpha(marker2, 255)
end

sx,sy = guiGetScreenSize()
screenW, screenH = guiGetScreenSize()
px, py = (screenW/1366),(screenH/768)

function mysz(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
...
2. Ustawianie wymagań pracy.
Siema mam taki problem ?e ustawiam potrzebn? ilo?? RP w pracy ale nawet gracz z 0RP mo?e j? rozpocz?? i w?a?nie mi to nie dzia?a
3. 2x więcej pieniędzy z pracy.
Otrzymuj? 2x wi?cej pieni?dzy z pracy, nie mam poj?cia dla czego.

Kod:

function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxTarget and getPedOccupiedVehicle(el) then return end
if jobTarget == maxTarget and not getPedOccupiedVehicle(el) then return end

if jobTarget == #districtsBus then
finishJob()
playSoundFrontEnd(5)
outputChatBox("* Zako?czy?e?/a? prac?.")
else
local kasa = math.random(5,5)
showMarker()
playSoundFrontEnd(12)
if getElementData(localPlayer,"player:premium") then
local kasa = math.random(5,5)
triggerServerEvent("givePlayerMoney", localPlayer, kasa)
outputChatBox("Otrzymujesz "..kasa.." PLN za dojechanie do punktu.")
else
triggerServerEvent("givePlayerMoney", localPlayer, kasa)
outputChatBox("Otrzymujesz "..kasa.." PLN za dojechanie do punktu.")
end
end
end


S? dwa tiggerServerEvent'y dlatego, ?e jedno jest pod zwyk?ego gracza a drugie pod premium. Wcze?niej by?o wszystko normalnie. Zrobi?em serverside givePlayerMoney dlatego, ?e w innej pracy nie dostawa?em pieni?dzy... A teraz jak usun??em ten serverside to normalnie dostaj? pieni?dze z tej innej pracy. Tak jakby ten kod by? gdzie? ukryty, mo?na go jako? usun??? Nie mam ju? go w ?adnym skrypcie, pomocy![/code]
4. Skrypt Pracy. Brakuje jednej Funkcji
Witam i? zrobi?em skrypt na prace ale mam problem a chodzi o to ?e jak wjade autem w PKT to ?eby mnie zamrozi?o na okre?lony czas. pr?bowa?em to ju? wsz?dzie ale nie dzia?a. Prosze powiedzie? mi co jak i gdzie. Najlepiej prosz? o gotowy kod tylko wklei?.
Nie wa?ne co jest w tych pod?ogach ale podajcie mi gdzie ma by? ten freez po prostu nie chce wyjawia? kodu jak co jest zrobione.
addEventHandler "onClientMarkerHit"root, function ( element )
if 
source == marker_cel then
    
if element == localPlayer then
        
if getElementData ___ then
            outputChatBox 
___ )
            
rnd tonumber ___ )
            
marker_cel1 createMarker ___ )
            
blip_cel1 createBlip ___ )
             
setElementData ___ )
            
setElementData ___ )
            
destroyElement marker_cel )
            
destroyElement blip_cel )
end
end
end
end
)
5. Start pracy.
Witam wszystkich. Tworze skrypt na prace czyszczenia ulic. Chcia?bym aby w markerze startu skrypt startowa? po wje?dzie pojazdem ze skryptu lub o wskazanym ID. Chodzi o to ze jak sie wejdzie normalnie, praca si? nie startuje. R?wnie? ze jak si? wjedzie innym pojazdem to tez praca nie startuje.

Urywek kodu:

addEventHandler
("onMarkerHit"m1,
function()
    
setMarkerSize(m10)
    
cel 0
    p_sweeper
(el)
end)


Pr?bowa?em tak ale nie dzia?a:

addEventHandler
("onMarkerHit"m1,
function(
theVehicle)
    
local id=  getElementModel theVehicle )
    if 
id== 574 then
        
if isElementtheVehicle then 
    setMarkerSize
(m10)
    
cel 0
    p_sweeper
(el)
end
end
end
)


Prosz? o pomoc. Stawiam :piwo: :piwo: R* R*