0 Üye ve 1 Ziyaretçi konuyu incelemekte.
imgW = 500imgH = 90function adminLogo()local players = getPlayersInTeam(getTeamFromName("Admin"))for i,player in ipairs(players) doif player ~= localPlayer thenlocal cX, cY, cZ = getCameraMatrix()local hX, hY, hZ = getPedBonePosition(player, 8)hZ = hZ + 0.5local pX,pY,pZ = getPedBonePosition(localPlayer, 8)pZ = pZ + 0.5if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) thenlocal sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ)local relative = (50 - sD) / 50if relative > 0 thenlocal iW = imgW * relativelocal iH = imgH * relativelocal iX = sX - (iW / 2)local iY = sY - (iH / 2)dxDrawImage(iX, iY, iW, iH, "admin.png")endendendendendaddEventHandler("onClientRender", root, adminLogo)
imgW = 500 imgH = 90 function adminLogo() for i, player in ipairs(getElementsByType("player")) dolocal accName = -- get his account nameif isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) then if player ~= localPlayer then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, 8) hZ = hZ + 0.5 local pX,pY,pZ = getPedBonePosition(localPlayer, 8) pZ = pZ + 0.5 if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) then local sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ) local relative = (50 - sD) / 50 if relative > 0 then local iW = imgW * relative local iH = imgH * relative local iX = sX - (iW / 2) local iY = sY - (iH / 2) dxDrawImage(iX, iY, iW, iH, "admin.png") end end endend end end addEventHandler("onClientRender", root, adminLogo)
imgW = 500imgH = 90function adminLogo()for i, player in ipairs(getElementsByType("player")) doif player ~= localPlayer thenlocal cX, cY, cZ = getCameraMatrix()local hX, hY, hZ = getPedBonePosition(player, 8)hZ = hZ + 0.5local pX,pY,pZ = getPedBonePosition(localPlayer, 8)pZ = pZ + 0.5if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) thenlocal sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ)local relative = (50 - sD) / 50if getElementData(player, "adminKadrosu") == true and relative > 0 thenlocal iW = imgW * relativelocal iH = imgH * relativelocal iX = sX - (iW / 2)local iY = sY - (iH / 2)dxDrawImage(iX, iY, iW, iH, "admin.png")endendendendendendaddEventHandler("onClientRender", root, adminLogo)
Hesap işlemlerini client'te nasıl yapıyorsun Linki görebilmek için Kayıt olun yada Giriş yapın.
local imgW = 500local imgH = 90function adminLogo() for i, player in ipairs(getElementsByType("player")) do if getElementData(player,"Admin") then if player ~= localPlayer then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, 8) local hZ = hZ + 0.5 local pX,pY,pZ = getPedBonePosition(localPlayer, 8) local pZ = pZ + 0.5 if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) then local sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ) local relative = (50 - sD) / 50 if relative > 0 then local iW = imgW * relative local iH = imgH * relative local iX = sX - (iW / 2) local iY = sY - (iH / 2) dxDrawImage(iX, iY, iW, iH, "admin.png") end end end end endendaddEventHandler("onClientRender", root, adminLogo)
addEventHandler("onResourceStart", resourceRoot, function() for i, player in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then setElementData(player,"Admin",true) end endend)addEventHandler("onPlayerLogin", root, function() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setElementData(source,"Admin",true) endend)