Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-03-05, 19:04


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:12


boszboszek

HEY






Wiek: 14
Na forum: 3505 dni
Posty: 146
Nick w MP: boszboszek

Piwa: 2172

Respekt: 261
Respekt: 261Respekt: 261Respekt: 261

U?yj tej funkcji:

createColSphere()


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:13


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Server:

local strefa createColCuboid xyzszeroko?cg??boko??, wysoko?? )
  
function wejdzStrefa thePlayermatchingDimension ) 
      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",thePlayer255,0,0) 
      end 
    end 
    addEventHandler "onColShapeHit"strefawejdzStrefa ) 
      
function opuscStrefa thePlayermatchingDimension ) 
        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"strefaopuscStrefa )


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:14


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

A mo?na tak ?eby poza tym cuboidem nie da?o si? wyci?gn?? broni?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:16


boszboszek

HEY






Wiek: 14
Na forum: 3505 dni
Posty: 146
Nick w MP: boszboszek

Piwa: 2172

Respekt: 261
Respekt: 261Respekt: 261Respekt: 261

"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?? ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:18


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

"ReMiK1337" napisał/a:

A mo?na tak ?eby poza tym cuboidem nie da?o si? wyci?gn?? broni?


local strefa createColCuboid xyzszeroko?cg??boko??, wysoko?? )
  
function wejdzStrefa thePlayermatchingDimension ) 
      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"strefawejdzStrefa ) 
      
function opuscStrefa thePlayermatchingDimension ) 
        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",thePlayer255,0,0) 
        end 
    end 
    addEventHandler "onColShapeLeave"strefaopuscStrefa )


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:19


manieks78

Lua ;)






Wiek: 25
Na forum: 3387 dni
Posty: 97
Nick w MP: Hexan

Piwa: 5

Respekt: 50

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 :D
   addEventHandler ("onColShapeLeave")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:26


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

Niestety w DB3 b??d:
ERROR: Loading script failed: bron/bron.lua:1: unexpected symbol near '?'

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:30


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

"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 xyzszeroko?cg??boko??, wysoko?? )


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:36


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

Tak

local strefa createColCuboid 1806.50, -1935.5111.55, -3250)
  
function wejdzStrefa thePlayermatchingDimension ) 
      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"strefawejdzStrefa ) 
      
function opuscStrefa thePlayermatchingDimension ) 
        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",thePlayer255,0,0) 
        end 
    end 
    addEventHandler "onColShapeLeave"strefaopuscStrefa 


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:40


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Po jakiej stronie wrzuci?e? skrypt?

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:44


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

po stronie servera

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:46


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

U mnie wszystko jest dobrze. Sprawd? czy poprawnie uzupe?ni?e? pierwsz? linijk? bo z niej b??d wynika.

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:46


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

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)?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 19:56


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

"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 fXfloat fYfloat fZfloat fWidthfloat fDepthfloat fHeight )


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Tagi: cuboid
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Cuboid Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku