Wysłany: 2016-06-19, 23:26
OskarYT
Mapper MTA
Wiek: 26 Na forum: 4245 dni Posty: 267
Nick w MP: Kaczorek2306
Piwa : 1230
bindKey ( "e" , "down" , function()
if not isElementWithinMarker ( localPlayer , praca ) then return end
if not getElementData ( localPlayer , "gracz_praca" ) then
local losuj = math . random ( 2 , #miejscaelektryk)
setElementData ( localPlayer , "gracz_praca" , true )
outputChatBox ( "#919191 Od??? telewizor na przyczep?." , 255 , 255 , 255 , true )
toggleControl ( "sprint" , false )
setPedAnimation ( localPlayer , "CARRY" , "crry_prtial" , 1 , true )
local skrzynia = createObject ( 1518 , 1 , 1 , 1 )
attachElements ( skrzynia , localPlayer , 0 , 0.5 , 0.5 )
local cel = createMarker ( miejscaelektryk [ losuj ][ 1 ], miejscaelektryk [ losuj ][ 2 ], miejscaelektryk [ losuj ][ 3 ]- 1.0 , "checkpoint" , 1.0 , 255 , 0 , 0 )
local blip = createBlipAttachedTo ( cel , 41 )
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 ( "#919191 Nie mo?esz tego od?o?y? b?d?c w poje?dzie!" , 255 , 255 , 255 , true )
return
end
destroyElement ( blip )
setElementFrozen ( el , true )
outputChatBox ( "#919191 Pakujesz telewizor do ci??ar?wki. Poczekaj #0053FFkilka sekund" , 255 , 255 , 255 , true )
setTimer (function()
setElementFrozen ( el , false )
outputChatBox ( "#919191 Po?o?y?e? telewizor." , 255 , 255 , 255 , true )
destroyElement ( skrzynia )
destroyElement ( cel )
setPedAnimation ( localPlayer , false )
toggleControl ( "sprint" , true )
givePlayerMoney ( thePlayer , 35 )
setElementData ( el , "gracz_praca" , false )
triggerServerEvent ( "givePlayerMoney" , el , 15 , 0 )
end , 9000 , 1 )
end )
else
outputChatBox ( "#919191 Posiadasz aktywn? prac?." , 255 , 255 , 255 , true )
end
end )
Prosz? o pomoc dlaczego nie daje mi pieni?dzy na moje konto ?
Oddaje skrzynk? i pieni?dzy nie dostaje
Wysłany: 2016-06-20, 00:46
Prezes.
Wiek: 27 Na forum: 4370 dni Posty: 75
Nick w MP: Prezes.
Piwa : 17
Nigdy nie dawaj givePlayerMoney w c-side!!
Zr?b trigger na event po stronie serwera kt?ry b?dzie zabiera? odpowiedni? ilo?? pieni?dzy
Wysłany: 2016-06-20, 11:16
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
strona server
addEvent ( "givePlayerMoney" , true )
addEventHandler ( "givePlayerMoney" , root , function( money )
if not tonumber ( money ) then return end
givePlayerMoney ( source , money )
end )
strona client
bindKey ( "e" , "down" , function()
if not isElementWithinMarker ( localPlayer , praca ) then return end
if not getElementData ( localPlayer , "gracz_praca" ) then
local losuj = math . random ( 2 , #miejscaelektryk)
setElementData ( localPlayer , "gracz_praca" , true )
outputChatBox ( "#919191 Od??? telewizor na przyczep?." , 255 , 255 , 255 , true )
toggleControl ( "sprint" , false )
setPedAnimation ( localPlayer , "CARRY" , "crry_prtial" , 1 , true )
local skrzynia = createObject ( 1518 , 1 , 1 , 1 )
attachElements ( skrzynia , localPlayer , 0 , 0.5 , 0.5 )
local cel = createMarker ( miejscaelektryk [ losuj ][ 1 ], miejscaelektryk [ losuj ][ 2 ], miejscaelektryk [ losuj ][ 3 ]- 1.0 , "checkpoint" , 1.0 , 255 , 0 , 0 )
local blip = createBlipAttachedTo ( cel , 41 )
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 ( "#919191 Nie mo?esz tego od?o?y? b?d?c w poje?dzie!" , 255 , 255 , 255 , true )
return
end
destroyElement ( blip )
setElementFrozen ( el , true )
outputChatBox ( "#919191 Pakujesz telewizor do ci??ar?wki. Poczekaj #0053FFkilka sekund" , 255 , 255 , 255 , true )
setTimer (function()
setElementFrozen ( el , false )
outputChatBox ( "#919191 Po?o?y?e? telewizor." , 255 , 255 , 255 , true )
destroyElement ( skrzynia )
destroyElement ( cel )
setPedAnimation ( localPlayer , false )
toggleControl ( "sprint" , true )
givePlayerMoney ( thePlayer , 35 )
setElementData ( el , "gracz_praca" , false )
triggerServerEvent ( "givePlayerMoney" , el , 15 ) -- tu masz ilosc kasy
end , 9000 , 1 )
end )
else
outputChatBox ( "#919191 Posiadasz aktywn? prac?." , 255 , 255 , 255 , true )
end
end )
Podpis
Modeler Corporation Sp. Z.O.O
Wysłany: 2016-06-20, 12:59
OskarYT
Mapper MTA
Wiek: 26 Na forum: 4245 dni Posty: 267
Nick w MP: Kaczorek2306
Piwa : 1230
THEGizmo , Dzi?ki za pomoc
Temat Close
!
Tagi: nie :: daje :: pieniędzy
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: