Tematy otagowane jako: clientside
1. clientside element "ped" at argument 4 @'TriggerSe
peda znajduje
function addLabelOnCli ( button , state , absoluteX , absoluteY , worldX , worldY , worldZ , clickedElement )
if button == "left" and state == "down" then
if isEventHandlerAdded ( "onClientRender" , root , przestanfizlfoa ) then
if isMouseInPosition ( ***** , ***** , 154 * w , 51 * h ) then
triggerServerEvent ( "Przestepca:kajdany" , localPlayer , localPlayer , ped )
( tutaj dalam printa na pobieranie modelu peda to pobra ? o wi ? c znajduje ped 'a)
end
end
end
end
addEventHandler ( "onClientClick", root, addLabelOnCli )
c-side
s- side
addEvent ( "Przestepca:kajdany" , true )
addEventHandler ( "Przestepca:kajdany" , getRootElement (), function( gracz , npc )
if exports .global: hasItem ( gracz , 45 , 1 ) then
outputChatBox ( "Zakuwasz przest?pce" , gracz , 255 , 255 , 255 , true )
else
outputChatBox ( "#ff0000Nie masz kajdanek" , gracz , 255 , 255 , 255 , true )
setPedAnimation ( npc , "ROB_BANK" , "CAT_Safe_Rob" )
end
end )
co? tu zrobi?am ?le, prosz? tylko powiedziec co db3 w tytu?u tematu
2. server triggered clientside event
Witam pom?g?by kto? z rozwi?zaniem tego problemu, chodzi o to by zawarto?? by element X wyeksportowa? na client side i wys?a? zawarto?? tego elementu.
Kod
c_side
addEvent( "kordy:pola" , true )
addEventHandler ( "kordy:pola" , root , function( x )
outputChatBox ( x )
end )
addCommandHandler ( "spr" , function( plr )
triggerEvent ( "kordy:pola" , root )
end )
s_side
x = "Connect"
triggerClientEvent ( root , "kordy:pola" , root , x )
B??d w DB3
Kod:
Server triggered clientside event kordy:pola, but event is not added clientside
B??d m?wi ?e event "kordy:pola" nie istnieje po stronie clienta? Jak skoro istnieje, nie rozumiem jak to naprawi?.
Za pomoc zimne
3. LUA MTA localPlayer clientside dxdraw wyświetla wszystkim
LUA MTA
Nie wiem czy ja nie wyspany, czy co ale wsz?dzie jest localPlayer, ca?y skrypt client-side a dxdraw ten od rozpocznij prace wy?wietla wszystkim o co kaman
cside
[code]
--[[
Praca Magazyniera V.2
Autorem jest adaskOO(Roe)
Zakaz zmieniania autora!
JeĹĽeli postanowisz edytowa?‡ ten skrypt, dopisz siebie. Prosze doce?„ moj?… prace i nie usuwaj autora!
Udost?™pniono na gtao.pl 11.11.2018.
Client Side
--]]
--Tworzy markery
marker = createMarker(369.22336, -119.07957, 1001.49219-0.9, "cylinder", 2, 155, 155, 0, 210)
setElementInterior(marker, 5)
setElementDimension(marker, 0)
markerZABIERANIA = createMarker(376.76630, -120.82995, 1001.49951-1, "cylinder", 3, 0, 0, 0, 210)
setElementInterior(markerZABIERANIA, 5)
setElementDimension(markerZABIERANIA, 0)
setElementInterior(markery, 0)
setElementDimension(markery, 0)
local markery={
--[[ Przyk?‚ad: ||| {x, y, z , "cylinder", wielkosc, kolor RED, Kolor GREEN, Kolor BLUE, Przezroczysto?›?‡}, ||| --]]
{2102.00464, -1802.54797, 13.55469-0.9 , "cylinder", 1, 0, 255, 0, 130},
{2102.16699, -1811.50879, 13.55469-0.9 , "cylinder", 1, 0, 255, 0, 130},
}
--[----------------------------------------------------]--
--Pozycja Kursora(function https://wiki.multitheftauto.com/wiki/IsMouseInPosition)
function isMouseInPosition ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
...