Wysłany: 2017-05-14, 16:51
Kuksss
guwno
Wiek: 22 Na forum: 3781 dni Posty: 102
Nick w MP: guwnp
Piwa : 732
Witam.
Dlaczego po od?o?eniu skrzyni, nie usuwa animacji? Za pomoc daj? .
Kod:
addEventHandler ( "onClientMarkerHit" , cel , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
if getPedOccupiedVehicle ( el ) then
outputChatBox ( "* Nie mo?esz tego od?o?y? b?d?c w poje?dzie !" )
return
end
destroyElement ( blip )
setElementFrozen ( el , true )
outputChatBox ( "* K?adziesz skrzynie, odczekaj 5 sekund." )
setTimer (function()
setElementFrozen ( el , false )
destroyElement ( skrzynia )
destroyElement ( cel )
setPedAnimation ( el , false )
setElementData ( el , "player:job" , false )
if getElementData ( el , "player:premium" ) then
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 20 PLN." )
setPedAnimation ( el , false )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 20 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
else
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 11 PLN." )
setPedAnimation ( el , false )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 11 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
end
end , 4000 , 1 )
end )
else
outputChatBox ( "* Posiadasz aktywn? prac?." )
end
end )
Wysłany: 2017-05-14, 22:45
Krzemo1234
Wiek: 26 Na forum: 3751 dni Posty: 387
Nick w MP: Krzemo
Piwa : 16
Powinno dzia?a?
addEventHandler ( "onClientMarkerHit" , cel , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
if getPedOccupiedVehicle ( el ) then
outputChatBox ( "* Nie mo?esz tego od?o?y? b?d?c w poje?dzie !" )
return
end
destroyElement ( blip )
setElementFrozen ( el , true )
outputChatBox ( "* K?adziesz skrzynie, odczekaj 5 sekund." )
setTimer (function()
setElementFrozen ( el , false )
destroyElement ( skrzynia )
destroyElement ( cel )
setPedAnimation ( el , false )
setElementData ( el , "player:job" , false )
if getElementData ( el , "player:premium" ) then
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 20 PLN." )
setPedAnimation ( el , true )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 20 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
else
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 11 PLN." )
setPedAnimation ( el , true )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 11 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
end
end , 4000 , 1 )
end )
else
outputChatBox ( "* Posiadasz aktywn? prac?." )
end
end )
Podpis
Jeśli ci pomogłem zostaw zimne
Wysłany: 2017-05-14, 23:28
Emm
***** ***
Wiek: 32 Na forum: 3880 dni Posty: 3191
Nick w MP: Emm
Piwa : 6162
Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Po co Ci to 'setPedAnimation(el, true)' po sprawdzeniu czy gracz ma premium, czy te? nie?
Wywal to ca?kowicie i zostaw tylko 'setPedAnimation(el, false)' i testuj.
addEventHandler ( "onClientMarkerHit" , cel , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
if getPedOccupiedVehicle ( el ) then
outputChatBox ( "* Nie mo?esz tego od?o?y? b?d?c w poje?dzie !" )
return
end
destroyElement ( blip )
setElementFrozen ( el , true )
outputChatBox ( "* K?adziesz skrzynie, odczekaj 5 sekund." )
setTimer (function()
setElementFrozen ( el , false )
destroyElement ( skrzynia )
destroyElement ( cel )
setPedAnimation ( el , false )
setElementData ( el , "player:job" , false )
if getElementData ( el , "player:premium" ) then
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 20 PLN." )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 20 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
else
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 11 PLN." )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 11 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
end
end , 4000 , 1 )
end )
Nie testowane, ale powinno dzia?a?.
Podpis
Użytkownik : 20.10.2015r
GTAO Member : 06.03.2016r
Support-Team : 20.01.2016r
Moderator : 30.03.2016r
Mod-Team : 08.10.2016r
Vice Admin : 04.05.2018r
Administrator : 03.05.2022r
[you]
! Koniecznie zapoznaj się z
regulaminem forum .
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również
regulaminy działów , w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez
Administrację , przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w
tym dziale .
Najważniejsze informacje od
Administracji możesz przeczytać
tutaj oraz
tutaj .
Ostatnio zmieniony przez Emm 2017-05-15, 00:04, w całości zmieniany 3 razy
Wysłany: 2017-05-14, 23:46
Krzemo1234
Wiek: 26 Na forum: 3751 dni Posty: 387
Nick w MP: Krzemo
Piwa : 16
Fix
addEventHandler ( "onClientMarkerHit" , cel , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
if getPedOccupiedVehicle ( el ) then
outputChatBox ( "* Nie mo?esz tego od?o?y? b?d?c w poje?dzie !" )
return
end
destroyElement ( blip )
setElementFrozen ( el , true )
outputChatBox ( "* K?adziesz skrzynie, odczekaj 5 sekund." )
setTimer (function()
setElementFrozen ( el , false )
destroyElement ( skrzynia )
destroyElement ( cel )
setPedAnimation ( el , false )
setElementData ( el , "player:job" , false )
if getElementData ( el , "player:premium" ) then
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 20 PLN." )
setPedAnimation ( el , false )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 20 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
else
outputChatBox ( "* Od?o?y?e?(a?) skrzyni?. Za od?o?enie skrzynii, otrzymujesz 11 PLN." )
toggleControl ( el , "sprint" , true )
triggerServerEvent ( "givePlayerMoney" , el , 11 , 0 )
setElementData ( el , "player:srp" , getElementData ( el , "player:srp" )+ math . random ( 0 , 1 ))
end
end , 4000 , 1 )
end )
else
outputChatBox ( "* Posiadasz aktywn? prac?." )
end
end )
Podpis
Jeśli ci pomogłem zostaw zimne
Tagi: setpedanimation
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: