Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-10-04, 12:46


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

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:
local gracz getLocalPlayer()

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

ped2 createPed(60, -134.603805541991116.510253906320.196640014648)
setPedAnimationped2"RAPPING""RAP_B_Loop")

start createMarker (-136.2675781251116.51562520.196640014648"cylinder"1245621)

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.92602539061677.268188476611.074653625488"cylinder"3.52552550)
blip1 createBlipAttachedTo marker141 )
setElementPosition(gracz, -140.878753662111124.333618164119.749988555908 )
setElementData(gracz"praca:kurier"true)
else
info("Ju? zacz??e?/a? prac? jako kurier.")
end
end
end
addEventHandler("onClientMarkerHit"startfunkcja1 )

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.491378784181125.254272460919.749988555908"cylinder"3.52552550)
blipostatni createBlipAttachedTo ostatni41 )
end
end
addEventHandler("onClientMarkerHit"marker1funkcja2 )

function funkcja3(hitElement)
if getElementData (gracz"praca:kurier") == true then
info("Uko?czy?e? prac? Kuriera, za wykonan? robot? dostajesz 250 z?.")
triggerServerEvent("dajKase",root,gracz,250)
triggerServerEvent ("usun"getLocalPlayer(), gracz)
destroyElement(ostatni)
destroyElement(blipostatni)
setElementData(gracz"praca:kurier"false)
end
end
addEventHandler("onClientMarkerHit"ostatnifunkcja3 )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-04, 15:22


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Nie pro?ciej tak? Kod pobrany z prawa jazdy ze starego serwera :

addEventHandler "onClientMarkerHit"root, function ( element )
    if source == marker then
        if element == localPlayer then
            if getElementData element"PrawoJazdy:B" then return outputChatBox "Posiadasz ju? Prawo Jazdy Kat.B!"255255255 end
                if liczba == #miejsca then
                hp getElementHealth getPedOccupiedVehicle element ) )
                return triggerServerEvent "koniecEgzaminu"elementtonumber(hp) ) end
            if liczba == 0 then
                outputChatBox "Zacz??e? egzamin Prawa Jazdy Kategoria B."255255255 )
                triggerServerEvent "onPlayerStart"localPlayer )
            end
            liczba liczba 1
            marker createMarker miejsca[liczba][1], miejsca[liczba][2], miejsca[liczba][3], "checkpoint"1.52550)
            destroyElement source )
        end
    end
    addEvent "onPlayerDestroyMarker"true )
    addEventHandler "onPlayerDestroyMarker"root, function ()
        if source == localPlayer then
            destroyElement marker )
            liczba 0
            marker createMarker ( -102.24218751231.917358398421.94800567627"cylinder"52552552550)
        end
    end)
end)


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: praca :: dorywcza
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku