Wysłany: 2016-08-22, 21:03
FaydenFX.
Wiek: 27 Na forum: 4056 dni Posty: 246
Nick w MP: faydn
Piwa : 11
witam, jak mog? zrobi? tak, ?eby wida? sw?j nametag nad g?ow?? tzn. zawsze nie wida? swojego, to jak mam zrobi? tak, ?eby by?o wida? te? sw?j? nie moge tego zrobi?.
kod:
function nametags ()
local rootx , rooty , rootz = getCameraMatrix ()
for i , v in ipairs ( getElementsByType ( "player" ), root , true ) do
if v ~= localPlayer and getElementAlpha ( v ) > 50 then
local x , y , z = getPedBonePosition ( v , 8 )
local sx , sy = getScreenFromWorldPosition ( x , y , z + 0.1 )
if sx and sy then
local nick = "" .. getPlayerName ( v ).. ""
local distance = getDistanceBetweenPoints3D ( rootx , rooty , rootz , x , y , z )
if distance <= 17 then
dxDrawText ( nick , sx , sy , sx , sy , tocolor ( 255 , 255 , 255 , 255 ), 1.7 , "default" , "center" , "center" )
end
end
end
end
end
addEventHandler ( "onClientRender" , root , nametags )
Wysłany: 2016-08-22, 21:20
_Wicek_
Majstersztyk
Wiek: 25 Na forum: 4260 dni Posty: 747
Nick w MP: Wicek
Piwa : 1841
Powinno dzia?a?.
function nametags ()
local rootx , rooty , rootz = getCameraMatrix ()
for i , v in ipairs ( getElementsByType ( "player" ), root , true ) do
if getElementAlpha ( v ) > 50 then
local x , y , z = getPedBonePosition ( v , 8 )
local sx , sy = getScreenFromWorldPosition ( x , y , z + 0.1 )
if sx and sy then
local nick = "" .. getPlayerName ( v ).. ""
local distance = getDistanceBetweenPoints3D ( rootx , rooty , rootz , x , y , z )
if distance <= 17 then
dxDrawText ( nick , sx , sy , sx , sy , tocolor ( 255 , 255 , 255 , 255 ), 1.7 , "default" , "center" , "center" )
end
end
end
end
end
addEventHandler ( "onClientRender" , root , nametags )
Podpis
Support-Team: 25.01.2016
Moderator: 10.07.2016
GG: 51274621
Skype : kuba_wicinski
Wysłany: 2016-08-22, 21:38
FaydenFX.
Wiek: 27 Na forum: 4056 dni Posty: 246
Nick w MP: faydn
Piwa : 11
dzi?kuj? bardzo, na przysz?o?? ju? b?d? wiedzia? leci piwko, bez respektu bo nie mog? 2 raz da?
Tagi: nametagi.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: