SpikeRO3 Posted September 24, 2014 Posted September 24, 2014 Hello there! I'm working on a script in which all staff members have an image above The problem is that : fail to create "aclGetGroup". Please help me. imgW = 500 imgH = 90 function adminLogo() if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, -- s8) --> hZ = hZ + 0.5 local pX,pY,pZ = getPedBonePosition(localPlayer, -- s8) --> 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, "1.png") end end end end end addEventHandler("onClientRender", root, adminLogo) Born to be the best!
Anubhav Posted September 24, 2014 Posted September 24, 2014 v is not defined and you are using mixed functions. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
yoya99 Posted October 25, 2014 Posted October 25, 2014 ye i tried something like this too...anybody an idea? And the snail starts to sing
..:D&G:.. Posted October 25, 2014 Posted October 25, 2014 Try this (not tested) imgW = 500 imgH = 90 admins = "" players = getElementsByType ( "player" ) function adminLogo() for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then if (admins == "") then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, -- s8) --> hZ = hZ + 0.5 local pX,pY,pZ = getPedBonePosition(localPlayer, -- s8) --> 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, "1.png") end end end end end end end addEventHandler("onClientRender", root, adminLogo) MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
Enargy, Posted October 25, 2014 Posted October 25, 2014 try using triggerClientEvent you are using this code in client-side, which should not be and 'v' is not defined like player if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then end end - Inactivo.
Anubhav Posted October 25, 2014 Posted October 25, 2014 Actually his code won't work at all. See the functions lel See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
yoya99 Posted October 26, 2014 Posted October 26, 2014 "and you say i would give stupid comments...? andyway i made my Level system with Images work ! And the snail starts to sing
crismar Posted October 26, 2014 Posted October 26, 2014 So he basically copied something from the internet, put it here and asks us to make it work. #nicetrybro Contact me if you are looking for a Web Developer. 3rd of October 2014 - Founder of RomaniaZ
yoya99 Posted October 26, 2014 Posted October 26, 2014 no i made the level myself work...the problem was (easy) that killer were not defined....such pros as you shouold have known that And the snail starts to sing
Anubhav Posted October 26, 2014 Posted October 26, 2014 no i made the level myself work...the problem was (easy) that killer were not defined....such pros as you shouold have known that Better read my functions. You copied the script. You also told it it was a old script of Castillo. 'ed? Caught! See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
yoya99 Posted October 26, 2014 Posted October 26, 2014 i mean i fixed the Errors myself ...you wanna see it? https://www.facebook.com/epicfreeroam/p ... =1&theater And the snail starts to sing
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now