Wysłany: 2016-07-16, 19:47
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Witam ot?z zastanawiam si? jak dzia?a ta funkcja , skoro nawet w przyk?adzie z wiki wywo?uje b??dy.
-- andrzej = createPed (- 2405.17505 ,- 113.98340 , 40.55586 )
-- setPedAnimation ( andrzej , "JST_BUISNESS" , "girl_02" , - 1 , false , false )
--[[
addEventHandler ( "onClientRender" , getRootElement (),
function ()
dxDrawTextOnElement ( andrzej , "Andrzej" , 1 , 20 , 255 , 0 , 0 , 255 , 1 , "default" )
end )
--]]
randomPed = createPed ( 285 , 2476.91406 ,- 1665.31799 , 13.32435 )
addEventHandler ( "onClientRender" , getRootElement (),
function ()
dxDrawTextOnElement ( randomPed , "SWATTEAM Officer" , 1 , 20 , 0 , 0 , 255 , 255 , 1 , "pricedown" )
end )
DB: http://imgur.com/ZdiB42j
Wysłany: 2016-07-16, 19:53
Brzysiek
Skrypter pralek
Wiek: 27 Na forum: 5198 dni Posty: 488
Nick w MP: Brzysiek
Piwa : 1034
no bo nigdzie jej nie wklei?e?, masz ?r?d?o na wiki :v
Wysłany: 2016-07-16, 19:54
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
marcin778 , to jest Useful Function czyli funkcja stworzona przez u?ytkownika, m?wi?c inaczej pod funkcja.
daj tak:
function dxDrawTextOnElement ( TheElement , text , height , distance , R , G , B , alpha , size , font , checkBuildings , checkVehicles , checkPeds , checkDummies , seeThroughStuff , ignoreSomeObjectsForCamera , ignoredElement )
local x , y , z = getElementPosition ( TheElement )
local x2 , y2 , z2 = getElementPosition ( localPlayer )
local distance = distance or 20
local height = height or 1
local checkBuildings = checkBuildings or true
local checkVehicles = checkVehicles or false
local checkPeds = checkPeds or false
local checkObjects = checkObjects or true
local checkDummies = checkDummies or true
local seeThroughStuff = seeThroughStuff or false
local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false
local ignoredElement = ignoredElement or nil
if ( isLineOfSightClear ( x , y , z , x2 , y2 , z2 , checkBuildings , checkVehicles , checkPeds , checkObjects , checkDummies , seeThroughStuff , ignoreSomeObjectsForCamera , ignoredElement )) then
local sx , sy = getScreenFromWorldPosition ( x , y , z + height )
if( sx ) and ( sy ) then
local distanceBetweenPoints = getDistanceBetweenPoints3D ( x , y , z , x2 , y2 , z2 )
if( distanceBetweenPoints < distance ) then
dxDrawText ( text , sx + 2 , sy + 2 , sx , sy , tocolor ( R or 255 , G or 255 , B or 255 , alpha or 255 ), ( size or 1 )-( distanceBetweenPoints / distance ), font or "arial" , "center" , "center" )
end
end
end
end
-- andrzej = createPed (- 2405.17505 ,- 113.98340 , 40.55586 )
-- setPedAnimation ( andrzej , "JST_BUISNESS" , "girl_02" , - 1 , false , false )
--[[
addEventHandler ( "onClientRender" , getRootElement (),
function ()
dxDrawTextOnElement ( andrzej , "Andrzej" , 1 , 20 , 255 , 0 , 0 , 255 , 1 , "default" )
end )
--]]
randomPed = createPed ( 285 , 2476.91406 ,- 1665.31799 , 13.32435 )
addEventHandler ( "onClientRender" , getRootElement (),
function ()
dxDrawTextOnElement ( randomPed , "SWATTEAM Officer" , 1 , 20 , 0 , 0 , 255 , 255 , 1 , "pricedown" )
end )
[ Dodano : 2016-07-16, 19:56 ]
Brzysiek , mog?e? mu wyt?umaczy? u?ytkownikowi co to jest za funkcja i dlaczego nie dzia?a.
"Brzysiek" napisał/a :no bo nigdzie jej nie wklei?e?, masz ?r?d?o na wiki :v
To nie jest wyt?umaczenie
Wysłany: 2016-07-16, 19:59
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
no tak :_:
Ale jeszcze jeden problem,?eby nie ?mieci? forum. Jak da? animacje dla peda bo
andrzej = createPed ( 277 ,- 2405.17505 ,- 113.98340 , 40.55586 )
setPedAnimation ( andrzej , "JST_BUISNESS" , "girl_02" , - 1 , false , false )
addEventHandler ( "onClientRender" , getRootElement (),
function ()
dxDrawTextOnElement ( andrzej , "Andrzej" , 1 , 20 , 255 , 0 , 0 , 255 , 1 , "default" )
end )
nie dzia?a a db nic nie pokazuje
Wysłany: 2016-07-16, 20:04
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
marcin778 ,
andrzej = createPed ( 277 ,- 2405.17505 ,- 113.98340 , 40.55586 )
if andrzej then
setPedAnimation ( andrzej , "JST_BUISNESS" , "girl_02" , - 1 , false , false )
end
addEventHandler ( "onClientRender" , getRootElement (),
function ()
dxDrawTextOnElement ( andrzej , "Andrzej" , 1 , 20 , 255 , 0 , 0 , 255 , 1 , "default" )
end )
Zobacz z warunkiem
[ Dodano : 2016-07-16, 20:06 ]
luki123luki123 , usu? te? te 2 false z funkcji
Wysłany: 2016-07-16, 20:08
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Tagi: dxdrawtextonelement
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: