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

Wysłany: 2018-12-08, 22:56


MESTIHD







Wiek: 22
Na forum: 3580 dni
Posty: 36
Nick w MP: MESTI

Piwa: 1

Respekt: 50

Witam, mam problem z rang? w?a?ciciel w mysql mam lv 4 a o to problemy:
1. Po wpisaniu /duty znikam mi nick na scoreboardzie jest widoczny tylko sekund?
2. Nie mam nad nametagiem rangi ( z innymi rangami np rcon nie mam takiego problemu
3.albo na chacie /e bez wpisania w visual rank w mysql wlasciciel s? tylko nawiasy (z innymi rangami nie ma takiego problemu nic takiego nie musze wpisywa?)
Oczywi?cie mam wszystkie uprawnienia tylko to wygl?da tak jakbym w og?le nie mia? ?adnej rangi prosz? o szybk? pomoc.
Czy gdzie? co? trzeba doda? czy co.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-08, 23:36


AsterBonzo

Otwórz ogień






Wiek: 20
Na forum: 2968 dni
Posty: 187
Nick w MP: Hirahi

Piwa: 60

Respekt: 35,8

Dodawa?e? t? rang? sam czy ona ju? by?a ?

Podpis

Pomagam jak potrafię :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-08, 23:41


MESTIHD







Wiek: 22
Na forum: 3580 dni
Posty: 36
Nick w MP: MESTI

Piwa: 1

Respekt: 50

Edytowa?em z CEO, ale to jest ok dlatego, ?e sprawdza?em u kolegi i koledze dzia?a ma nad nickiem range i na /e oraz ma kolor na scoreboardzie te? a u mnie dalej nie dzia?a.

Ostatnio zmieniony przez MESTIHD 2018-12-08, 23:44, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-08, 23:42


AsterBonzo

Otwórz ogień






Wiek: 20
Na forum: 2968 dni
Posty: 187
Nick w MP: Hirahi

Piwa: 60

Respekt: 35,8

Podaj kodzik do dutyadmin i do nametag?w

Podpis

Pomagam jak potrafię :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-08, 23:45


MESTIHD







Wiek: 22
Na forum: 3580 dni
Posty: 36
Nick w MP: MESTI

Piwa: 1

Respekt: 50

addEventHandler("onClientRender"root, function()
        local rootxrootyrootz getCameraMatrix()--getElementPosition(getLocalPlayer())
        for iplayer in ipairs(getElementsByType("player",root,true)) do
            if player ~= localPlayer and getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) and getElementAlpha(player)>0 then
                local x,y,getPedBonePosition(player,8)
                local sxsy getScreenFromWorldPosition(xyz+0.43)
                local sxc,syc =getScreenFromWorldPosition(xyz+0.68)
                if sx and sy and sxc and syc then
                local distance getDistanceBetweenPoints3D(rootxrootyrootzxyz)                                            
                if(distance <= 22then
                  if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    local name=getPlayerName(player).." ("..getElementData(player,"id")..")"
                    local level tonumber(getElementData(player"player:level"))
                    if not getElementData(player,"p:inv"then 
                    if level == 1 then
                    dxDrawText("Supporter"sxcsycsxcsyctocolor(01020255), 1.0vopisFont"center""center")
                    end
                    if level == 2 then
                    dxDrawText("Administrator"sxcsycsxcsyctocolor(25500), 1.0vopisFont"center""center")
                    end
                    if level == 3 then
                    dxDrawText("Administrator RCON"sxcsycsxcsyctocolor(10200), 1.0vopisFont"center""center")
                    end
                    if level == 4 then
                    dxDrawText("Wlasciciel"sxcsycsxcsyctocolor(51102255), 1.0vopisFont"center""center")
                    end

                    dxDrawText(name:gsub("#%x%x%x%x%x%x",""),sxsysxsy,tocolor(0056,255), 1.00vopisFont ,"center","center",false,false,false,true,true,0,0,-50 )
                    dxDrawText(name,sx+1sy+1sx+1sy+1,tocolor(255,255,255,190), 1.00vopisFont ,"center","center",false,false,false,true,true,0,0,-50 )
                    if getElementData(localPlayer,"player:faction") == "samc-sf" then
                    dxDrawRectangle(sx-25*2-1sy+5*2100-distance18+2-distance/2.0tocolor(27,27,27,155)) 
                    dxDrawRectangle(sx-25*2sy+5*2+1getElementHealth(player)-distance18-distance/1.0tocolor(255,5,5,155))
                    end


[ Dodano: 2018-12-08, 23:46 ]
unction censorSentence(text)
    local cnt 0
    for k,v in ipairs(cenzured_strings) do
        textlcnt string.gsub(textvcensorWord)
        if lcnt and lcnt 0 then cnt cnt lcnt end
    end
    return text,cnt
end

rangi = {
    [4] = "Wlasciciel",
    [3] = "Administrator RCON",
    [2] = "Administrator",
    [1] = "Supporter",
}

addCommandHandler("e", function(plr,cmd, ...)
    if getAdmin(plrthen
        if not ... then
                local x getElementData(plr,"player:ekipaoff")
                if not x then
                    triggerClientEvent(plr"iyw_notifications:send"plr"success""Wy??czy?e?/a? czat ekipy.")
                    setElementData(plr,"player:ekipaoff",true)
                elseif x then
                    triggerClientEvent(plr"iyw_notifications:send"plr"success""W??czy?e?/a? czat ekipy.")
                    setElementData(plr,"player:ekipaoff",false)
                end
            return
        else
            if getElementData(plr"player:ekipaoff"then return triggerClientEvent(plr"iyw_notifications:send"plr"info""Posiadasz wy??czony chat ekipy - Twoja wiadomo?? nie zosta?a wys?ana."end
            local msg table.concat({...}, " ")
            ranga nil
            
            local rank getVisualRank(plr)
            if rank then
                ranga rank
            else
                ranga rangi[tonumber(getLevel(plr))]
            end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-08, 23:51


AsterBonzo

Otwórz ogień






Wiek: 20
Na forum: 2968 dni
Posty: 187
Nick w MP: Hirahi

Piwa: 60

Respekt: 35,8

nametagi

local nametagFont dxCreateFont"droid-sans.ttf"20 )
if not nametagFont then nametagFont "default-bold" end
local vopisFont dxCreateFont"fonts/vopis.ttf"20 )
if not vopisFont then vopisFont "default-bold" end


local nametagScale 0.8
local nametagScale2 0.8
local nametagAlpha 180
local nametagColor =
{
    255,
    255,
    255
} 

-- Funkcja nametag?w graczy i pojazd?w
-- zazwyczaj sdla u?atwienia wygl?du.
addEventHandler("onClientRender"root, function()
        local rootxrootyrootz getCameraMatrix()--getElementPosition(getLocalPlayer())
        for iplayer in ipairs(getElementsByType("player",root,true)) do
            if player ~= localPlayer and getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) and getElementAlpha(player)>0 then
                local x,y,getPedBonePosition(player,8)
                local sxsy getScreenFromWorldPosition(xyz+0.43)
                local txty getScreenFromWorldPosition(xyz-0.43)
                local sxc,syc =getScreenFromWorldPosition(xyz+0.68)
                local progressmath.sin(getTickCount()/300)*3
                if sx and sy and sxc and syc then
                local distance getDistanceBetweenPoints3D(rootxrootyrootzxyz)
                local fX sx
                local fY sy
                local alpha 120                                             
                if(distance <= 22then
                  if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    local name=getPlayerName(player).." ("..getElementData(player,"id")..")"
                    local level tonumber(getElementData(player"player:level"))
                    if not getElementData(player,"p:inv"then 
                    if level == 1 then
                    dxDrawText("&#9658;Supporter&#9668;"sxcsycsxcsyctocolor(01020255), nametagScale2nametagFont"center""center")
                    end
                    if level == 2 then
                    dxDrawText(" &#9658;Administrator&#9668;"sxcsycsxcsyctocolor(25500255), nametagScale2nametagFont"center""center")
                    end
                    if level == 3 then
                    dxDrawText("&#9658;Administrator RCON&#9668;"sxcsycsxcsyctocolor(14900255), nametagScale2nametagFont"center""center")
                    end
                    if level == 4 then
                    dxDrawText("&#9658;W?a?ciciel&#9668;"sxcsycsxcsyctocolor(50255255255), nametagScale2nametagFont"center""center")
                    end
                    
                    dxDrawText (name:gsub("#%x%x%x%x%x%x",""),fXfYfXfY,tocolor(0,0,0),nametagScale,nametagFont,"center","center",false,false,false,true,true,0,0,-50)
                    dxDrawText (name:gsub("#%x%x%x%x%x%x",""),fXfYfXfY,tocolor(0,0,0),nametagScale,nametagFont,"center","center",false,false,false,true,true,0,0,-50)
                    dxDrawText (name,fX+1fY+1fX+1fY+1,white,nametagScale,nametagFont,"center","center",false,false,false,true,true,0,0,-50)
                    --dxDrawText (name,fX+1fY+1fX+1fY+1,white,nametagScale,nametagFont,"center","center",false,false,false,true,true )
                    --    dxDrawText(namefX+1fY+1fX+1fY+1tocolor(000alpha), nametagScalenametagFont"center""center",false,false,false,false,true)
                        --dxDrawText(namefXfYfXfYtocolor(255255255alpha), nametagScalenametagFont"center""center",false,false,false,false,true)
                    --dxDrawText(namesx-1sy-1sx-1sy-1tocolor000255), 1.5-distance/15"default-bold""center""center")
                    if getElementData(localPlayer,"player:faction") == "samc-sf" then
                    dxDrawRectangle(sx-25*2-1sy+5*2100-distance18+2-distance/2.0tocolor(27,27,27,155)) 
                    dxDrawRectangle(sx-25*2sy+5*2+1getElementHealth(player)-distance18-distance/1.0tocolor(255,5,5,155))
                    end
                    end
                  end
                end
            end
        end
    end
    for i,ped in ipairs(getElementsByType("ped")) do
        if ped~=localPlayer and getElementDimension(localPlayer)==getElementDimension(ped) and getElementInterior(localPlayer) == getElementInterior(ped) and getElementAlpha(ped) > 0 then
            local x,y,z=getElementPosition(ped)
            local sx,sy =getScreenFromWorldPosition(xyz+1)
            if sx and sy then
                local desc=getElementData(ped,"ped:desc")
                if desc then
                    local distance getDistanceBetweenPoints3D(rootx,rooty,rootz,x,y,z)
                    if distance <= 18 then
                        dxDrawText(descsx+1sy+1sx+1sy+1tocolor(000255), 1.4-distance/15font"center""center")
                        dxDrawText(descsxsysxsytocolor(255255255255), 1.4-distance/15font"center""center")
                    end
                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 distance=getDistanceBetweenPoints3D(rootx,rooty,rootz,x,y,z)
                if distance <= 25 then
                    if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    dxDrawText(desc:gsub("#%x%x%x%x%x%x",""), sxsysxsytocolor(255255255255), 0.63vopisFont"center""center")
                    end
                end
            end
        end
    end
end)

addEventHandler("onClientResourceStart"resourceRoot, function()
    for _,v in ipairs(getElementsByType("player")) do
        setPlayerNametagShowing(vfalse)
    end
end)

addEventHandler("onClientPlayerSpawn"root,  function()
    setPlayerNametagShowing(sourcefalse)
end)


Podpis

Pomagam jak potrafię :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-09, 00:14


MESTIHD







Wiek: 22
Na forum: 3580 dni
Posty: 36
Nick w MP: MESTI

Piwa: 1

Respekt: 50

Problem Rozwi?zany! Mozna zamkn??

Postaw piwo autorowi tego posta
 

 
Tagi: kłopot :: rangami
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Kłopot z Rangami Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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