Wysłany: 2021-02-11, 10:07
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
chce zrobi? aby po najechaniu myszk? na peda by?o OnClientRender
ma kto? pomys? jak to wykona?, nie rozumiem na wiki ]
s - side
local bot ;
function createbot ( )
bot = createPed ( 102 , 1589.31616 , - 1551.45642 , 13.58679 )
setElementData ( bot , "npc" , true )
setPedAnimation ( bot , "ped" , "seat_down" , - 1 , false , false , false , false )
end
addEventHandler ( "onResourceStart" , resourceRoot , function ()
createbot ( )
end )
addEventHandler ( "onResourceStop" , resourceRoot , function ()
destroyElement ( bot )
end )
c-side
addEventHandler ( "onClientResourceStart" , resourceRoot , function ( )
local peds = getElementsByType ( "ped" )
for i , v in ipairs ( peds ) do
if getElementData ( v , "npc" ) == true then
pedtb = v
setPedControlState ( v , "sprint" , true )
setPedControlState ( v , "walk" , true )
end
end
end )
bindKey ( "M" , "down" , function()
showCursor ( not isCursorShowing ())
end )
local dxfont0_RobotoBoldItalic = dxCreateFont ( ":DRP-Interfejs/pedy/Roboto-BoldItalic.ttf" , 13 )
local dxfont1_AndikaNewBasicRegular = dxCreateFont ( ":DRP-Interfejs/pedy/AndikaNewBasic-Regular.ttf" , 10 )
addEventHandler ( "onClientCursorMove" , getRootElement ( ),
function ( _ , _ , _ , _ , x , y , z )
if isElement ( bot ) then
x , y , z = getElementPosition ( bot ) -- pobiera pozycje bota
addEventHandler ( "onClientRender" , root ,
function()
dxDrawImage ( 561 , 344 , 154 , 147 , ":DRP-Interfejs/pedy/circle.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawText ( "Interakcja" , 604 , 381 , 992 , 756 , tocolor ( 22 , 124 , 203 , 255 ), 1.00 , dxfont0_RobotoBoldItalic , "left" , "top" , false , false , false , false , false )
dxDrawText ( "Kliknij aby porozmawia?" , 575 , 409 , 865 , 672 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont1_AndikaNewBasicRegular , "left" , "top" , false , false , false , false , false )
end
)
end
end
)
jak klikam M i macham myszk? po ped to nie renderuje si? pomocy
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2021-05-14, 15:56
DriveHigh
Wiek: 14 Na forum: 2597 dni Posty: 9
Nick w MP: BotGrzesieKK
function ( _, _,_, _,x,y,z )
if isElement(bot) then
x,y,z = getElementPosition( bot ) -- pobiera pozycje bota
Nadpisujesz x,y,z pozycj? bota
Wysłany: 2021-08-06, 16:41
_jvneczek
Wiek: 22 Na forum: 4326 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Tagi: onclientcursormove
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: