Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-08-06, 13:20


Ziomek2005







Wiek: 30
Na forum: 3608 dni
Posty: 18
Nick w MP: Rebook

Piwa: 4

Respekt: 50

Witam! Mam problem odno?nie rang! Mam Paczk? Pysa w kt?rej jest pystories-admin i tam by?y rangi takie jak: Moderator, Administrator, ROOT, Pracownik Techniczny.
Chcia?em je zmieni? i zmieni?em lecz gdy zalogowa?em si? na /duty dalej mia?em pracownika tech.

Potem znalaz?em skrypt pystories-nametag
W kt?rym te? przerobi?em rangi i dalej mia?em Pracownika tech.

Czy kto? mo?e mi wyt?umaczy? o co chodzi?
Z g?ry dzi?kuj?!
Pozdrawiam!

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
borewek213
Wysłany: 2017-08-06, 13:29


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4181 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

Ziomek2005, Daj kod :/ nametag?w i admina

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-06, 13:32


Ziomek2005







Wiek: 30
Na forum: 3608 dni
Posty: 18
Nick w MP: Rebook

Piwa: 4

Respekt: 50

ale ca?y?

[ Dodano: 2017-08-06, 13:33 ]
NAMETAG





local sw,sh=guiGetScreenSize()


--local nametagFont = "default"
local nametagFont = dxCreateFont( "f/droid-sans.ttf", 10)
if not nametagFont then nametagFont = "default-bold" end
local fontHeight=dxGetFontHeight(1, nametagFont)
local nametagScale = 1.10
local nametagAlpha = 180
local nametagColor =
{
r = 255,
g = 255,
b = 255
}

local hp_width=math.floor(sw/20)
if hp_width<50 then hp_width=50 end
local hp_height=math.floor(hp_width/10)

local gsize=sw>800 and 32 or 16


local ourlevel=0
local ourfid=""



setTimer(function()
ourlevel=getElementData(localPlayer, "level") or 0
ourfid=getElementData(localPlayer, "player:faction") or ""
end, 15000, 0)

function korona()
local rootx, rooty, rootz = getCameraMatrix()
for i, player in ipairs(getElementsByType("player",root,true)) do
if getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) then
if getElementAlpha(player) < 1 then
if not getElementData(localPlayer,"player:admin") == true then return end
end
local x,y,z = getPedBonePosition(player,6)
if x and y and z then
local distance = getDistanceBetweenPoints3D(rootx, rooty, rootz, x, y, z)
if(distance <= 22) then
if isLineOfSightClear( rootx,rooty,rootz, x,y,z, true, false, false, true, false, false, true,localPlayer ) then
if getElementData(player,"Ryjek") then
if(distance <= 12) then
dxDrawMaterialLine3D(x,y,z+1.25,x,y,z+0.35,img,1.1,white)
end
end
end
end
end
end
end
end

addEventHandler("onClientRender", root, function()
local rootx, rooty, rootz = getCameraMatrix()--getElementPosition(getLocalPlayer())
for i, vehicle in ipairs(getElementsByType("vehicle", root, true)) do
local opis=getElementData(vehicle,"opis")
local poziom=tonumber(getElementData(vehicle,"poziom"))
if poziom then
opis= (opis and opis or "") .. " zape?nienie: " ..math.floor(math.max(math.min(poziom,100),0)+0.5).."%"
end
if (opis) then
local x,y,z=getElementPosition(vehicle)
local distance = getDistanceBetweenPoints3D(rootx, rooty, rootz, x, y, z)
local kierowca=getVehicleController(vehicle)
if (distance<=15 or (kierowca and kierowca==localPlayer)) then
local sx,sy = getScreenFromWorldPosition(x,y,z, 200)
if (sx and sy) then
dxDrawText(opis, sx-(sw/5),sy,sx+(sw/5),sy, tocolor(255,255,255,155), 1.0, "default-small", "center","center",false,true)
end
end
end
end

local ctrl=getKeyState("lalt") or getKeyState("ralt") or getKeyState("lctrl") or getKeyState("rctrl")

for i, player in ipairs(getElementsByType("player",root,true)) do
if player ~= localPlayer and (getElementAlpha(player)>50 or ourlevel>1 or getElementDimension(player)==901) then
local x,y,z = getPedBonePosition(player,8)

local sx, sy = getScreenFromWorldPosition(x, y, z+0.5)
if sx then
local distance = getDistanceBetweenPoints3D(rootx, rooty, rootz, x, y, z)
if getElementAlpha(player) < 1 and not getElementData(localPlayer,"player:admin") then
return end

local name = "["..getElementData(player, "id").."] "..getPlayerName(player)..""
local distance = getDistanceBetweenPoints3D(rootx, rooty, rootz, x, y, z)

local fX = math.floor(sx)
local fY = math.floor(sy)

local alpha = 120

if(distance <= 35) then
local org=getElementData(player,"player:organization")
if (ctrl) then
local fname=getElementData(player, "player:faction")
if (fname) then
dxDrawText(fname, fX, fY+16, fX, fY+16, tocolor(255,255,255,200), nametagScale*0.9, nametagFont, "center", "center")
end
if org and org.nazwa then
dxDrawText(org.nazwa, fX, fY+15, fX, fY+15, tocolor( 0, 0, 0, 150), nametagScale*1, nametagFont, "center", "center")
end
end

local level = tonumber(getElementData(player, "player:level"))
local p_level = tonumber(getElementData(player, "premium:level"))
if level == 1 then
dxDrawText("#FFFFFF[#01bf34"..getElementData(player, "id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","").."", fX, fY, fX, fY, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
dxDrawText("#FFFFFF[#01bf34Moderator#FFFFFF]", fX, fY-16, fX, fY-16, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
elseif level == 2 then
dxDrawText("#FFFFFF[#ff0000"..getElementData(player, "id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","").."", fX, fY, fX, fY, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
dxDrawText("#FFFFFF[#ff0000Administrator#FFFFFF]", fX, fY-16, fX, fY-16, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
elseif level == 3 then
dxDrawText("#FFFFFF[#a31303"..getElementData(player, "id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","").."", fX, fY, fX, fY, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
dxDrawText("#FFFFFF[#a31303TestowyRCON#FFFFFF]", fX, fY-16, fX, fY-16, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
elseif level == 4 then
dxDrawText("#FFFFFF[#a31303"..getElementData(player, "id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","").."", fX, fY, fX, fY, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
dxDrawText("#FFFFFF[#a31303RCON#FFFFFF]", fX, fY-16, fX, fY-16, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
elseif p_level == 1 then
dxDrawText("#FFFFFF[#C0FF00"..getElementData(player, "id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","").."", fX, fY, fX, fY, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
dxDrawText("#FFFFFF[#C0FF00Premium#FFFFFF]", fX, fY-16, fX, fY-16, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
else
dxDrawText("#FFFFFF[#FFFFFF"..getElementData(player, "id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","").."", fX, fY, fX, fY, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true) -- ,false,true
dxDrawText("#FFFFFF[#FFFFFF#FFFFFFGracz#FFFFFF]", fX, fY-16, fX, fY-16, tocolor(255, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
end
if getElementData(player,"mute:player") then
--dxDrawText("[Wyciszony]", sxc1+1, syc1+1, sxc1+1, syc1+1, tocolor(0, 0, 0, alpha), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
dxDrawText("#FFFFFF[#FFFF00Wyciszony#FFFFFF]", fX, fY-32, fX, fY-32, tocolor(0, 255, 255, 255), nametagScale, nametagFont, "center", "center",false,false,false,true,true)
end



if ourfid=="SAMC" then -- pokazujemy hp innych graczy
dxDrawRectangle(fX-hp_width/2-1, fY+fontHeight, hp_width+2, hp_height+2, tocolor(27,27,27,155))
local hp=getElementHealth(player)
if hp>100 then hp=100 end
local hhp_width=(hp*hp_width/100)
dxDrawRectangle(fX-hp_width/2, fY+fontHeight+1, hhp_width, hp_height, tocolor(255,5,5,155))
end

local opis=getElementData(player, "opis")
if opis then
local alpha=255-getDistanceBetweenPoints2D(sw/2,sh/2,sx,sy)

if alpha>5 then
local sx, sy = getScreenFromWorldPosition(x, y, z-0.5)
if sx and sy then
dxDrawText(opis, sx-(sw/10),sy,sx+(sw/10),sy, tocolor(255,255,255,alpha), 1.0, "default-small", "center","center",false,true)
end
end
end
end
end
end
end

for i, ped in ipairs(getElementsByType("ped",root,true)) do
local name=getElementData(ped,"name")
if name then
local x,y,z = getElementPosition(ped)
local sx, sy = getScreenFromWorldPosition(x, y, z + 1)

if sx then
local distance = getDistanceBetweenPoints3D(rootx, rooty, rootz, x, y, z)

local fX = sx
local fY = sy

local alpha = 120

if(distance <= 8 and isLineOfSightClear(rootx,rooty,rootz,x,y,z,false,false,false)) then
dxDrawText(name, fX, fY, fX, fY, tocolor(0, 0, 0, alpha), nametagScale, nametagFont, "center", "center")
end
end
end
end

for i,vehicle in ipairs(getElementsByType("vehicle")) do
local x,y,z=getElementPosition(vehicle)
local sx,sy=getScreenFromWorldPosition(x,y,z)
if sx and sy then
local desc=getElementData(vehicle,"vehicle:desc")
if desc then
local veh = getPedOccupiedVehicle(localPlayer)
local distance=getDistanceBetweenPoints3D(rootx,rooty,rootz,x,y,z)
if distance <= 25 then
if isLineOfSightClear( rootx,rooty,rootz, x,y,z, true, true, false, true, false, true, true,vehicle ) then
dxDrawText(desc:gsub("#%x%x%x%x%x%x",""), sx-(sw/10),sy,sx+(sw/10),sy, tocolor(255,255,255,alpha), 1.0, "default", "center","center",false,true)
end
end
end
end
end
end)

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function()
for k, v in ipairs(getElementsByType("player")) do
setPlayerNametagShowing ( v, false )
end
end
)

addEventHandler("onClientPlayerJoin", root,
--addEventHandler("onClientPlayerSpawn", getRootElement(),
function()
setPlayerNametagShowing ( source, false )
end
)

fileDelete("nametags_c.lua")

[ Dodano: 2017-08-06, 13:34 ]
RANGI



addCommandHandler('ac', function(plr,cmd, ...)
local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
if not getElementData(plr,"player:admin") then return end
if getElementData(plr,"player:admin") then
local ranga = test
local msg=table.concat({...}, " ")
if (getAdmin(plr,4)) then
ranga = "#a31303RCON"
end
if (getAdmin(plr,3)) then
ranga = "#a31303TestowyRCON"
end
if (getAdmin(plr,2)) then
ranga = "#ff0000Administrator"
end
if (getAdmin(plr,1)) then
ranga = "#01bf34Moderator"
end
for _, p in pairs(getElementsByType('player')) do
if getAdmin(p) then
if not getAdmin(p) then return end
outputChatBox("#FF0C00AdminChat> #FFFFFF[#FFFFFF"..getElementData(plr,"id").."#FFFFFF] #FFFFFF"..name.." #919191[#FFFFFF"..ranga.."#919191] #FF0C00:#FFFFFF "..msg:gsub("#%x%x%x%x%x%x","").."",p,60,172,120,true)
end
end
local desc = "[AC] ["..getElementData(plr,"id").."]"..name.." ["..ranga.."]: "..msg:gsub("#%x%x%x%x%x%x","")..""
--triggerEvent("admin:addText", resourceRoot, desc:gsub("#%x%x%x%x%x%x",""))
outputServerLog(desc:gsub("#%x%x%x%x%x%x",""))
end
end)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-06, 13:39


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4181 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

Zrestartowa?e? skrypt na nametagi ?

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-06, 13:53


Ziomek2005







Wiek: 30
Na forum: 3608 dni
Posty: 18
Nick w MP: Rebook

Piwa: 4

Respekt: 50

tak

[ Dodano: 2017-08-06, 13:53 ]
Pumelowsky, i nic dalej tak samo

[ Dodano: 2017-08-06, 14:00 ]
w sumie troche ?le ci powiedzia?em bo tylko kolor nicku jest taki fioletowy a powinien byc taki ciemny czerwony a nie ma

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-06, 14:17


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

Ziomek2005, Wchodzisz w pystories-admin-->s_utility-->jak nic nie edytowa?e? to linijka 75 a jak co? edytowa?e? to-->CTR+F-->admins i sobie tam edytuj nazwy grup -->to zmienia nazwy wy?wietlane pod admins/ekipa/admini

a je?li chodzi o nametagi to zmie? sobie w nich nazwe i kolorystyk?

dxDrawText("#FFFFFF[#8F00FF"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#8F00FFPracownik Techniczny#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)


Nie jestem pewien czy w?a?nie o to ci chodzi?o.

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Tagi: rangi :: rpg
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » RANGI RPG Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku