Wysłany: 2015-09-23, 16:39
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
A wi?c stworzy?em 2 labele i okre?li?em do nich funkcje dodawania do teamu ale jak klikniesz 1 label to klikaj? sie 2 ;/ jak to naprawi??
Wysłany: 2015-09-23, 16:46
Tomeg123
Wiek: 32 Na forum: 4067 dni Posty: 26
Piwa : 83
Daj kod, nikt nie jest jasnowidzem. Jakie? DB?
Wysłany: 2015-09-23, 16:57
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
Fragment kodu
addEventHandler ( "onClientGUIClick" , polskal , function()
triggerServerEvent ( "spawn" , localPlayer )
givePedWeapon ( localPlayer , 31 , 5000 , true )
givePedWeapon ( localPlayer , 23 , 5000 , true )
end )
addEventHandler ( "onClientGUIClick" , rosjal , function()
triggerServerEvent ( "spawneq" , localPlayer )
givePedWeapon ( localPlayer , 30 , 5000 , true )
givePedWeapon ( localPlayer , 24 , 5000 , true )
end )
server
function ofajspawn ()
spawnPlayer ( client , - 176.99507141113 , 1111.7878417969 , 19.7421875 )
triggerClientEvent ( client , "ofajSpawn" , client )
setPlayerTeam ( source , polska )
end
addEvent ( "spawn" , true )
addEventHandler ( "spawn" , root , ofajspawn )
function spawneeq ()
spawnPlayer ( client , - 1455.03 , 2611.30 , 55.84 )
triggerClientEvent ( client , "ofajSpawn" , client )
setPlayerTeam ( source , rosja )
end
addEvent ( "spawneq" , true )
addEventHandler ( "spawneq" , root , spawneeq )
Klikam w rosje tepa do polski i daje do teamu polska dobrze zeskalowa?em labele
Wysłany: 2015-09-23, 18:10
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
Skad Ci sie wzielo w ogole 'client' na c-side? Czy to nie jest c-side ? pozmieniaj to
[ Dodano : 2015-09-23, 18:12 ]
I zamiast 2 razy robi? event onClientGuiClick u?yj :
addEventHandler ( "onClientGUIClick" , root , function( btn )
if btn == "left" then
if source == polskal then
elseif source == rosjal then
end
end
end )
Podpis
Jedyny kontakt ze mną to PW forum
Kod:
local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Wysłany: 2015-09-23, 18:43
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
To pierwsze to c-side to drugie to s-side zrobi?em jak kaza?e? to if i elseif nie dzia?? ;/ nic i wgl mam b??d w bf_core nie chce mi zaladowac mety
< meta >
< script src = "id.lua" />
< script src = "zapis.lua" />
< script src = "chat.lua" />
< script src = "respawn.lua" type = "server" />
< file src = "rosja.png" />
< file src = "polska.png" />
< file src "switch.wav" />
</ meta >
ERROR: Couldn't parse meta file for resource 'bf_core'
Loading of resource 'bf_core' failed
nadal te labele nie dzialaja poprawnie
Wysłany: 2015-09-23, 22:00
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
Pododawaj w kazdym <script src> jego typ.
Podpis
Jedyny kontakt ze mną to PW forum
Kod:
local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Wysłany: 2015-09-23, 22:01
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Nie ?aduje mu dlatego:
Kod:
Wysłany: 2015-09-23, 22:14
PolskiSebek12
Programista
Wiek: 28 Na forum: 4347 dni Posty: 343
Nick w MP: CrosRoad95
Piwa : 3883
"zrobilem przyciski i nie dzia?aj?, co robi?" tak? ilo?ci? informacji RZYM ci zbuduje
tzn. "nie zrobi?em przycisku i nie dzia?a, co robi?"
stara?em si? znale?? b??d przy tworzeniu przycisku ale niestety uniemo?liwi? mi fakt ?e w tym temacie nie ma ani 1 ci?gu znak?w 'guicreate'
Wysłany: 2015-09-24, 07:32
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
Nawet cytowa? nie umiesz hehe dzi?ki destroy pifko leci co do label m?wi?em stworzy?em 2labele okre?li? em do nich funkcje ale wykonuj? si? 2 naraz jak to naprawi??
[ Dodano : 2015-09-24, 15:12 ]
ca?y kod z gui itd
sound = playSound ( "logowanie.mp3" )
x , y = guiGetScreenSize ()
gui = guiCreateWindow ( 231 , 118 , 937 , 526 , "" , false )
guiWindowSetSizable ( gui , false )
guiSetAlpha ( gui , 0.00 )
guiWindowSetMovable ( gui , false )
guiSetVisible ( gui , false )
rosjal = guiCreateLabel ( 824 / 1366 * x , 238 / 768 * y , 320 / 1366 * x , 191 / 768 * y , "" , false , gui )
polskal = guiCreateLabel ( 224 / 1366 * x , 237 / 768 * y , 323 / 1366 * x , 193 / 768 * y , "" , false , gui )
function dxDraw ()
polska = dxDrawImage ( 224 / 1366 * x , 237 / 768 * y , 323 / 1366 * x , 193 / 768 * y , ":bf_core/polska.png" )
rosja = dxDrawImage ( 823 / 1366 * x , 237 / 768 * y , 321 / 1366 * x , 192 / 768 * y , ":bf_core/rosja.png" )
dxDrawText ( "POLSKA" , 283 / 1366 * x , 435 / 768 * y , 515 / 1366 * x , 491 / 768 * y , tocolor ( 255 , 255 , 255 , 255 ), 4.00 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( "ROSJA" , 919 / 1366 * x , 436 / 768 * y , 1078 / 1366 * x , 484 / 768 * y , tocolor ( 255 , 255 , 255 , 255 ), 4.00 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( "WYBIERZ PO KTOREJ BEDZIESZ STRONIE" , 338 / 1366 * x , 204 / 768 * y , 1026 / 1366 * x , 233 / 768 * y , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , "bankgothic" , "left" , "top" , false , false , false , false , false )
end
addEvent ( "ofajSpawn" , true )
addEvent ( "c***" , true )
addEventHandler ( "c***" , root , function()
guiSetVisible ( gui , true )
addEventHandler ( "onClientRender" , root , dxDraw )
end )
addEventHandler ( "ofajSpawn" , root , function()
removeEventHandler ( "onClientRender" , getRootElement (), moveCamera )
guiSetVisible ( gui , false )
stopSound ( sound )
showCursor ( false )
setCameraTarget ( localPlayer )
removeEventHandler ( "onClientRender" , root , dxDraw )
showChat ( true )
showPlayerHudComponent ( "all" , true )
end )
addEventHandler ( "onClientGUIClick" , polskal , function()
triggerServerEvent ( "spawn" , localPlayer )
givePedWeapon ( localPlayer , 31 , 5000 , true )
givePedWeapon ( localPlayer , 23 , 5000 , true )
end , true )
addEventHandler ( "onClientGUIClick" , rosjal , function()
triggerServerEvent ( "spawneq" , localPlayer )
givePedWeapon ( localPlayer , 30 , 5000 , true )
givePedWeapon ( localPlayer , 24 , 5000 , true )
end , true )
[ Dodano : 2015-09-26, 15:51 ]
do zamkniecia
Tagi: labele
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: