IgorPL222
LUA
Wiek: 26 Na forum: 3112 dni Posty: 133
Nick w MP: mxgvr
Piwa : 746
Siema mam prac? kuriera i ona crashuje, nie wiem czy to przez kod, czy przez podmiank?, ale to dzieje si? zawsze przy oddawaniu paczki, b?d? brania jej, czyli gdy tworzy si? podmianka paczki.
Licz? na pomoc:
Kod crasha:
Kod:
Version = 1.5.5-release-11841.0.000
Time = Tue Feb 27 16:31:18 2018
Module = D:\MTA\mods\deathmatch\client.dll
Code = 0xC0000005
Offset = 0x000420B5
EAX=FFFFB42D EBX=00000001 ECX=314B5F4A EDX=4036C610 ESI=314B5F4A
EDI=0C8EECF0 EBP=0028FD54 ESP=0028FD1C EIP=6C0B20B5 FLG=00210283
CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
Kod oddawania paczki:
function cele ( thePlayer )
if thePlayer == getLocalPlayer () then
if getElementData ( localPlayer , "trzymasz" , true ) then
destroyElement ( blip )
destroyElement ( cel )
destroyElement ( ped )
ulatw ()
setElementFrozen ( localPlayer , true )
triggerEvent ( "iyw_notifications:send" , localPlayer , "info" , "Oddajesz paczk? klientowi..." )
setPedAnimation ( localPlayer , "CARRY" , "putdwn105" , 400 , false , false , false , false )
setTimer ( function()
setElementFrozen ( localPlayer , false )
triggerServerEvent ( "givePlayerMoney" , localPlayer , 910 )
triggerEvent ( "iyw_notifications:send" , localPlayer , "success" , "Dosta?e? 910 PLN za dostarczenie paczki" )
setElementData ( localPlayer , "trzymasz" , false )
usunskrzynie ()
end , 400 , 1 )
end
end
end
addEventHandler ( "onClientMarkerHit" , cel , cele )
Kod brania paczki:
function gdziechce ( thePlayer )
if thePlayer == getLocalPlayer () then
if not getElementData ( localPlayer , "trzymasz" , true ) then
if getElementData ( localPlayer , "paczka" ) == 1 or getElementData ( localPlayer , "paczka" ) == 2 or getElementData ( localPlayer , "paczka" ) == 3 or getElementData ( localPlayer , "paczka" ) == 4 or getElementData ( localPlayer , "paczka" ) == 5 then
local paczuszka = getElementData ( localPlayer , "paczka" )
setElementData ( localPlayer , "paczka" , paczuszka - 1 )
local paczucha = getElementData ( localPlayer , "paczka" )
triggerEvent ( "iyw_notifications:send" , localPlayer , "success" , "Wzi??e? paczk? i zosta?o Ci paczek: " .. paczucha .. "" )
setElementData ( localPlayer , "trzymasz" , true )
utrudnij ()
setPedAnimation ( localPlayer , "CARRY" , "liftup105" , 400 , false , false , false , false )
setTimer ( function()
local xd , yd , zd = getElementPosition ( localPlayer )
local skrzynia = createObject ( 1271 , xd , yd , zd - 5 )
exports . bone_attach : attachElementToBone ( skrzynia , localPlayer , 12 , 0.2 , 0.1 , 0 ,- 90 , 30 , 1 )
-- attachElements ( skrzynia , localPlayer , 0 , 0.6 , 0.45 )
setPedAnimation ( localPlayer , "CARRY" , "crry_prtial" , 1 , true )
setElementCollisionsEnabled ( skrzynia , false )
function usunskrzynie ()
destroyElement ( skrzynia )
end
end , 600 , 1 )
end
end
end
end