Wysłany: 2017-12-13, 16:01
koxpl2x22
MAPPER-ALLEREK
Wiek: 23 Na forum: 4556 dni Posty: 375
Nick w MP: ALLEREK
Piwa : 1726
Witam, mam problem mianowicie po wej?ciu w marker 'stan' nic sie nie dzieje.
local praca = createMarker ( 2183 ,- 2253 , 13.5 , "cylinder" , 2 , 255 , 255 , 255 , 255 , getRootElement ())
local stanowiska = {
{ 2175.5634765625 , - 2267.458984375 , 12.3 - 3 , "cylinder" , 6 , 66 , 134 , 244 , 255 },
{ 2167.947265625 , - 2274.8017578125 , 12.3 - 3 , "cylinder" , 6 , 66 , 134 , 244 , 255 }
}
local mieszkania = {
{ 2232.404296875 , - 1785.978515625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 1 },
{ 2275.154296875 , - 1785.63671875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 2 },
{ 2307.8271484375 , - 1785.740234375 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 3 },
{ 2345.576171875 , - 1785.611328125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 4 },
{ 2379.6171875 , - 1785.8642578125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 5 },
{ 2394.9619140625 , - 1796.0048828125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 6 },
{ 2359.861328125 , - 1795.7890625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 7 },
{ 2322.791015625 , - 1796.2197265625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 8 },
{ 2290.1328125 , - 1795.951171875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 9 },
{ 2247.0712890625 , - 1795.8701171875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 10 },
}
addEventHandler ( "onPlayerMarkerHit" , praca ,function()
setElementData ( localPlayer , "pracaKur" , true )
end )
for i , v in pairs ( stanowiska ) do
local stan = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ], v [ 8 ], v [ 9 ], getRootElement ())
addEventHandler ( "onPlayerMarkerHit" , stan , function()
if not isElementWithinMarker ( localPlayer , praca ) then return end
if getElementData ( localPlayer , "pracaKur" , true ) then
local losuj = math . random ( 2 , #mieszkania)
local hajsik = math . random ( 112 , 300 )
local cel = createMarker ( mieszkania [ losuj ][ 1 ], mieszkania [ losuj ][ 2 ], mieszkania [ losuj ][ 3 ]- 1.0 , "checkpoint" , 1.0 , 255 , 0 , 0 )
local blip = createBlipAttachedTo ( cel , 41 )
addEventHandler ( "onClientMarkerHit" , cel , function( localPlayer , md )
if not md or getElementType ( localPlayer ) ~= "player" then return end
if localPlayer ~= localPlayer then return end
destroyElement ( blip )
setElementFrozen ( localPlayer , false )
destroyElement ( cel )
setElementData ( localPlayer , "pracaKur" , false )
-- triggerServerEvent ( "givePlayerMoney" , localPlayer , hajsik )
outputChatBox ( "Za dowiezienie paczki otrzymujesz" .. hajsik .. "PLN!" , 54 , 203 , 51 , true , plr )
end )
else
outputChatBox ( "* Posiadasz aktywna prace." )
end
end )
end
--[[ addCommandHandler ( "czysc" , czyszczenie )
function czyszczenie (
if getElementData ( localPlayer , "pracaKur" , true ) then
outputChatBox ( "k****" , getRootElement , 255 , 255 , 255 , false )
else
setElementData ( localPlayer , "pracaKur" , false )
end ))--]]
--[[for i , v in pairs ( mieszkania ) do
local mieszkanie = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ], v [ 8 ], v [ 9 ], getRootElement ())
end --]]
Wysłany: 2017-12-13, 16:14
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
if not isElementWithinMarker ( localPlayer , praca ) then return end
Tutaj masz odpowied?, ten kod oznacza: je?li gracz nie jest w markerze "praca" zwraca nil
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2017-12-13, 16:18
koxpl2x22
MAPPER-ALLEREK
Wiek: 23 Na forum: 4556 dni Posty: 375
Nick w MP: ALLEREK
Piwa : 1726
"BarteQ03" napisał/a : if not isElementWithinMarker ( localPlayer , praca ) then return end
Tutaj masz odpowied?, ten kod oznacza: je?li gracz nie jest w markerze "praca" zwraca nil
Racja, jestem debilem XD
[ Dodano : 2017-12-13, 16:22 ]
//Aczkolwiek nadal 0 reakcji
[ Dodano : 2017-12-13, 16:22 ]
local praca = createMarker ( 2183 ,- 2253 , 13.5 , "cylinder" , 2 , 255 , 255 , 255 , 255 , getRootElement ())
local stanowiska = {
{ 2175.5634765625 , - 2267.458984375 , 12.3 - 3 , "cylinder" , 6 , 66 , 134 , 244 , 255 },
{ 2167.947265625 , - 2274.8017578125 , 12.3 - 3 , "cylinder" , 6 , 66 , 134 , 244 , 255 }
}
local mieszkania = {
{ 2232.404296875 , - 1785.978515625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 1 },
{ 2275.154296875 , - 1785.63671875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 2 },
{ 2307.8271484375 , - 1785.740234375 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 3 },
{ 2345.576171875 , - 1785.611328125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 4 },
{ 2379.6171875 , - 1785.8642578125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 5 },
{ 2394.9619140625 , - 1796.0048828125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 6 },
{ 2359.861328125 , - 1795.7890625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 7 },
{ 2322.791015625 , - 1796.2197265625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 8 },
{ 2290.1328125 , - 1795.951171875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 9 },
{ 2247.0712890625 , - 1795.8701171875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 10 },
}
addEventHandler ( "onPlayerMarkerHit" , praca ,function()
setElementData ( localPlayer , "pracaKur" , true )
end )
for i , v in pairs ( stanowiska ) do
local stan = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ], v [ 8 ], v [ 9 ], getRootElement ())
addEventHandler ( "onPlayerMarkerHit" , stan , function()
if getElementData ( localPlayer , "pracaKur" , true ) then
local losuj = math . random ( 2 , #mieszkania)
local hajsik = math . random ( 112 , 300 )
local cel = createMarker ( mieszkania [ losuj ][ 1 ], mieszkania [ losuj ][ 2 ], mieszkania [ losuj ][ 3 ]- 1.0 , "checkpoint" , 1.0 , 255 , 0 , 0 )
local blip = createBlipAttachedTo ( cel , 41 )
addEventHandler ( "onClientMarkerHit" , cel , function( localPlayer , md )
if not md or getElementType ( localPlayer ) ~= "player" then return end
if localPlayer ~= localPlayer then return end
destroyElement ( blip )
setElementFrozen ( localPlayer , false )
destroyElement ( cel )
setElementData ( localPlayer , "pracaKur" , false )
-- triggerServerEvent ( "givePlayerMoney" , localPlayer , hajsik )
outputChatBox ( "Za odlozenie skrzynki otrzymujesz " .. hajsik .. "PLN!" , 54 , 203 , 51 , true , plr )
end )
else
outputChatBox ( "* Posiadasz aktywna prace." )
end
end )
end
--[[ addCommandHandler ( "czysc" , czyszczenie )
function czyszczenie (
if getElementData ( localPlayer , "pracaKur" , true ) then
outputChatBox ( "k****" , getRootElement , 255 , 255 , 255 , false )
else
setElementData ( localPlayer , "pracaKur" , false )
end ))--]]
--[[for i , v in pairs ( mieszkania ) do
local mieszkanie = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ], v [ 8 ], v [ 9 ], getRootElement ())
end --]]
DB3 czysciutkie
Wysłany: 2017-12-13, 16:40
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
Wysłany: 2017-12-13, 17:04
koxpl2x22
MAPPER-ALLEREK
Wiek: 23 Na forum: 4556 dni Posty: 375
Nick w MP: ALLEREK
Piwa : 1726
Nadal
Wysłany: 2017-12-13, 17:48
.RiV
Wiek: 25 Na forum: 3588 dni Posty: 554
Nick w MP: Split
Piwa : 2596
Po co ?
if getElementData ( localPlayer , "pracaKur" ) == true then
Najlepiej jak by by?o
if getElementData ( localPlayer , "pracaKur" ) then
Podpis
Autor OGRPG, na scenie MTA od 2012 roku.
Użytkownik: 08.08.2016
GTAO Member: 06.02.2017
Support-Team: 17.06.2017 & 01.06.2019 - 18.11.2019
Moderator: 14.01.2018 - 09.08.2018
Wysłany: 2017-12-13, 20:21
koxpl2x22
MAPPER-ALLEREK
Wiek: 23 Na forum: 4556 dni Posty: 375
Nick w MP: ALLEREK
Piwa : 1726
Nadal nic
Wysłany: 2017-12-13, 20:45
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
addEventHandler ( "onClientMarkerHit" , cel , function( el , md )
if not md or getElementType ( localPlayer ) ~= "player" then return end
if el ~= localPlayer then return end
pisane z,tel mog? by? b??dy
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2017-12-13, 20:54
koxpl2x22
MAPPER-ALLEREK
Wiek: 23 Na forum: 4556 dni Posty: 375
Nick w MP: ALLEREK
Piwa : 1726
Nadal nic, chodzi o to ?e po wej?ciu w marker tworzy si? inny, a to si? nie dzieje.
[ Dodano : 2017-12-14, 17:14 ]
obecny kod
local praca = createMarker ( 2183 ,- 2253 , 13.5 , "cylinder" , 2 , 255 , 255 , 255 , 255 , getRootElement ())
local stanowiska = {
{ 2175.5634765625 , - 2267.458984375 , 12.3 - 3 , "cylinder" , 6 , 66 , 134 , 244 , 255 },
{ 2167.947265625 , - 2274.8017578125 , 12.3 - 3 , "cylinder" , 6 , 66 , 134 , 244 , 255 }
}
local mieszkania = {
{ 2232.404296875 , - 1785.978515625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 1 },
{ 2275.154296875 , - 1785.63671875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 2 },
{ 2307.8271484375 , - 1785.740234375 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 3 },
{ 2345.576171875 , - 1785.611328125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 4 },
{ 2379.6171875 , - 1785.8642578125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 5 },
{ 2394.9619140625 , - 1796.0048828125 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 6 },
{ 2359.861328125 , - 1795.7890625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 7 },
{ 2322.791015625 , - 1796.2197265625 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 8 },
{ 2290.1328125 , - 1795.951171875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 9 },
{ 2247.0712890625 , - 1795.8701171875 , 12.3 , "corona" , 2 , 66 , 244 , 194 , 255 , 10 },
}
addEventHandler ( "onPlayerMarkerHit" , praca ,function()
setElementData ( localPlayer , "pracaKur" , true )
end )
for i , v in pairs ( stanowiska ) do
local stan = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ], v [ 8 ], v [ 9 ], getRootElement ())
addEventHandler ( "onPlayerMarkerHit" , stan , function()
if getElementData ( localPlayer , "pracaKur" ) then
local losuj = math . random ( 2 , #mieszkania)
local hajsik = math . random ( 112 , 300 )
local cel = createMarker ( mieszkania [ losuj ][ 1 ], mieszkania [ losuj ][ 2 ], mieszkania [ 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 ( localPlayer ) ~= "player" then return end
if el ~= localPlayer then return end
destroyElement ( blip )
setElementFrozen ( localPlayer , false )
destroyElement ( cel )
setElementData ( localPlayer , "pracaKur" , false )
-- triggerServerEvent ( "givePlayerMoney" , localPlayer , hajsik )
outputChatBox ( "Za odlozenie skrzynki otrzymujesz " .. hajsik .. "PLN!" , 54 , 203 , 51 , true , plr )
end )
else
outputChatBox ( "* Posiadasz aktywna prace." )
end
end )
end
--[[ addCommandHandler ( "czysc" , czyszczenie )
function czyszczenie (
if getElementData ( localPlayer , "pracaKur" , true ) then
outputChatBox ( "k****" , getRootElement , 255 , 255 , 255 , false )
else
setElementData ( localPlayer , "pracaKur" , false )
end ))--]]
--[[for i , v in pairs ( mieszkania ) do
local mieszkanie = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ], v [ 8 ], v [ 9 ], getRootElement ())
end --]]
Tagi: marker :: nie :: reaguje
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: