Wysłany: 2018-03-05, 19:04
Yami
Mapper / Uczeń LUA
Wiek: 25 Na forum: 3059 dni Posty: 379
Piwa : 97
Siemka
Znowu mam ma?y problem xD
Czy da rade zrobi? cuboida, w kt?rym mo?na u?ywa? tylko danej broni?
Chodzi o to ?eby w tym cuboidzie mo?na by?o u?ywa? AK-47, glocka oraz deagla, da si? tak?
Je?li tak to prosi?bym o pomoc w tym
Z G?ry Dzi?kuje i nagradzam piwkami za pomoc
Wysłany: 2018-03-05, 19:12
boszboszek
HEY
Wiek: 14 Na forum: 3505 dni Posty: 146
Nick w MP: boszboszek
Piwa : 2172
U?yj tej funkcji:
Wysłany: 2018-03-05, 19:13
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Server:
local strefa = createColCuboid ( x , y , z , szeroko ? c , g ?? boko ??, wysoko ?? )
function wejdzStrefa ( thePlayer , matchingDimension )
if matchingDimension and isElement ( thePlayer ) and getElementType ( thePlayer ) == "player" then
getPedWeapon ( localPlayer ) == 22 then
getPedWeapon ( localPlayer ) == 24 then
getPedWeapon ( localPlayer ) == 30 then
toggleControl ( thePlayer , "fire" , false )
toggleControl ( thePlayer , "next_weapon" , false )
toggleControl ( thePlayer , "previous_weapon" , false )
outputChatBox ( "Mo?esz tylko u?ywa? w tej strefie: AK-47, Glock, Deagle" , thePlayer , 255 , 0 , 0 )
end
end
addEventHandler ( "onColShapeHit" , strefa , wejdzStrefa )
function opuscStrefa ( thePlayer , matchingDimension )
if matchingDimension and isElement ( thePlayer ) and getElementType ( thePlayer ) == "player" then
toggleControl ( thePlayer , "fire" , true )
toggleControl ( thePlayer , "next_weapon" , true )
toggleControl ( thePlayer , "previous_weapon" , true )
outputChatBox ( "Opu?ci?e? stref?, mo?esz u?ywa? wszystkich broni" , thePlayer , 255 , 0 , 0 )
end
end
addEventHandler ( "onColShapeLeave" , strefa , opuscStrefa )
Wysłany: 2018-03-05, 19:14
Yami
Mapper / Uczeń LUA
Wiek: 25 Na forum: 3059 dni Posty: 379
Piwa : 97
A mo?na tak ?eby poza tym cuboidem nie da?o si? wyci?gn?? broni?
Wysłany: 2018-03-05, 19:16
boszboszek
HEY
Wiek: 14 Na forum: 3505 dni Posty: 146
Nick w MP: boszboszek
Piwa : 2172
"ReMiK1337" napisał/a :A mo?na tak ?eby poza tym cuboidem nie da?o si? wyci?gn?? broni?
Wystarczy troch? pomy?le? i sam mo?esz do tego doj??
Wysłany: 2018-03-05, 19:18
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"ReMiK1337" napisał/a :A mo?na tak ?eby poza tym cuboidem nie da?o si? wyci?gn?? broni?
local strefa = createColCuboid ( x , y , z , szeroko ? c , g ?? boko ??, wysoko ?? )
function wejdzStrefa ( thePlayer , matchingDimension )
if matchingDimension and isElement ( thePlayer ) and getElementType ( thePlayer ) == "player" then
getPedWeapon ( localPlayer ) == 22 then
getPedWeapon ( localPlayer ) == 24 then
getPedWeapon ( localPlayer ) == 30 then
toggleControl ( thePlayer , "fire" , true )
toggleControl ( thePlayer , "next_weapon" , true )
toggleControl ( thePlayer , "previous_weapon" , true )
outputChatBox ( "Mo?esz tylko u?ywa? w tej strefie: AK-47, Glock, Deagle" , thePlayer , 255 , 0 , 0 )
end
end
addEventHandler ( "onColShapeHit" , strefa , wejdzStrefa )
function opuscStrefa ( thePlayer , matchingDimension )
if matchingDimension and isElement ( thePlayer ) and getElementType ( thePlayer ) == "player" then
toggleControl ( thePlayer , "fire" , false )
toggleControl ( thePlayer , "next_weapon" , false )
toggleControl ( thePlayer , "previous_weapon" , false )
outputChatBox ( "Opu?ci?e? stref? w kt?rej nie mo?na u?ywa? broni" , thePlayer , 255 , 0 , 0 )
end
end
addEventHandler ( "onColShapeLeave" , strefa , opuscStrefa )
Wysłany: 2018-03-05, 19:19
manieks78
Lua ;)
Wiek: 25 Na forum: 3387 dni Posty: 97
Nick w MP: Hexan
Piwa : 5
Ciastu? ci pokaza?, onColShapeLeave odwo?uj? si? w?a?nie do wyj?cia gracza z cuboidu, w twoim przypadku dasz funkcj? niepozwalaj?c? wyj?? broni po opuszczeniu
addEventHandler ( "onColShapeLeave" )
Wysłany: 2018-03-05, 19:26
Yami
Mapper / Uczeń LUA
Wiek: 25 Na forum: 3059 dni Posty: 379
Piwa : 97
Niestety w DB3 b??d:
ERROR: Loading script failed: bron/bron.lua:1: unexpected symbol near '?'
Wysłany: 2018-03-05, 19:30
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"ReMiK1337" napisał/a :Niestety w DB3 b??d:
ERROR: Loading script failed: bron/bron.lua:1: unexpected symbol near '?'
Uzupe?ni?e? pierwsz? linijk? gdzie znajduje si?,
local strefa = createColCuboid ( x , y , z , szeroko ? c , g ?? boko ??, wysoko ?? )
Wysłany: 2018-03-05, 19:36
Yami
Mapper / Uczeń LUA
Wiek: 25 Na forum: 3059 dni Posty: 379
Piwa : 97
Tak
local strefa = createColCuboid ( 1806.50 , - 1935.51 , 11.55 , - 32 , 50 , 5 )
function wejdzStrefa ( thePlayer , matchingDimension )
if matchingDimension and isElement ( thePlayer ) and getElementType ( thePlayer ) == "player" then
getPedWeapon ( localPlayer ) == 25 then
getPedWeapon ( localPlayer ) == 28 then
getPedWeapon ( localPlayer ) == 30 then
toggleControl ( thePlayer , "fire" , true )
toggleControl ( thePlayer , "next_weapon" , true )
toggleControl ( thePlayer , "previous_weapon" , true )
outputChatBox ( "Mo?esz tylko u?ywa? w tej strefie: AK-47, Glock, Deagle" , thePlayer , 255 , 0 , 0 )
end
end
addEventHandler ( "onColShapeHit" , strefa , wejdzStrefa )
function opuscStrefa ( thePlayer , matchingDimension )
if matchingDimension and isElement ( thePlayer ) and getElementType ( thePlayer ) == "player" then
toggleControl ( thePlayer , "fire" , false )
toggleControl ( thePlayer , "next_weapon" , false )
toggleControl ( thePlayer , "previous_weapon" , false )
outputChatBox ( "Opu?ci?e? stref? w kt?rej nie mo?na u?ywa? broni" , thePlayer , 255 , 0 , 0 )
end
end
addEventHandler ( "onColShapeLeave" , strefa , opuscStrefa )
Wysłany: 2018-03-05, 19:40
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Po jakiej stronie wrzuci?e? skrypt?
Wysłany: 2018-03-05, 19:44
Yami
Mapper / Uczeń LUA
Wiek: 25 Na forum: 3059 dni Posty: 379
Piwa : 97
Wysłany: 2018-03-05, 19:46
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
U mnie wszystko jest dobrze. Sprawd? czy poprawnie uzupe?ni?e? pierwsz? linijk? bo z niej b??d wynika.
Wysłany: 2018-03-05, 19:46
Yami
Mapper / Uczeń LUA
Wiek: 25 Na forum: 3059 dni Posty: 379
Piwa : 97
a jak dam na strone clienta to w DB3:
ERROR: Loading script failed: bron/bron.lua:5: unexpected symbol near '=='
[ Dodano : 2018-03-05, 19:51 ]
Nie no nie wiem
W pierwszej linijce wszystko dobrze zrobi?em
Tam jest (x, y, z, d?ugo?? x, d?ugo?? y, wysoko?? z)?
Wysłany: 2018-03-05, 19:56
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"ReMiK1337" napisał/a :a jak dam na strone clienta to w DB3:
ERROR: Loading script failed: bron/bron.lua:5: unexpected symbol near '=='
[ Dodano : 2018-03-05, 19:51 ]
Nie no nie wiem
W pierwszej linijce wszystko dobrze zrobi?em
Tam jest (x, y, z, d?ugo?? x, d?ugo?? y, wysoko?? z)?
To jest po stronie servera.
Regu?ka z wiki,
colshape createColCuboid ( float fX , float fY , float fZ , float fWidth , float fDepth , float fHeight )
Tagi: cuboid
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: