![](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Karuzo
Members-
Posts
1,213 -
Joined
-
Last visited
Everything posted by Karuzo
-
There is no other way. And you can change the color of the text ofcourse, otherwise there won't be a color argument lol. And what do you mean with boolean saying true and false? As i suggested tables would be the best for this.
-
You shouldn't create a gui label every frame that causes laggs. If you're trying to create a editbox you should get the pressed key(onClientKey) and insert it into a table and then just draw it with dxDrawText and using table.concat
-
So what are you expecting from us now?
-
Get/Set Element position for gui elements?
-
I can't see any type of saving the skin which the player has choosen.
-
That's because you aren't saving the skin which he chose?
-
And what is your forum software? Come on be specific.
-
There is none, ofcourse only if you want to do that with teams only. If you want to use with acl you could set an element data to check if he's an admin .
-
Oh, my mistake , typed too fast.
-
--Name local namenohex = string.gsub ( getPlayerName ( source ), '#%x%x%x%x%x%x', '' ) statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..namenohex ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name")
-
No. dbExec(connect,"UPDATE Player SET mail=?,bDay=?,bMonth=?,bYear=?,level=?,VIP=?,welcomeText=?,achivementPoints=?,token=?,tokenBought=? WHERE account =?",mail,bDay,bMonth,bYear,level,VIP,welcomeText,achivementPoints,token,tokenbought,quittingPlayerAccount)
-
Start the resource runcode and then type /run setWorldSpecialPropertyEnabled (''aircars'',true).
-
Ofcourse you can use elementdatas client and server side. But i would only set it on server side, so client can only get the element data and not set it ( preventing cheats). and to your dbExec : You should write it like that to prevent mysql injections: local setacc = getElementData(source,"temp.account") dbExec(connect,"UPDATE Player SET account=?",setacc)
-
Creating vehicles client-side is useless. Since if you create the vehicles client-side you can't enter the car. So better trigger to the server and create it there.
-
I understand the scrolling, and did that, as you could see in the code i've posted. The only problem is idk how to change pages and to divide the players in different pages. Like if there are more players then the totallines it should go on the next page and if i'm on offset 8 it should do page + 1 and if i'm on offset 0 it should do page - 1 , the one with offset 0 works already.
-
What do you mean by mille?
-
Coudl you be more specific?
-
Hey Guys, I'm in need of help, i'm trying to make a scoreboard which allows you to select every player if you're scrolling. The only problem is that i just can't limit the player lines to 8 , like if there are more than 8 players online it should go on the next page, and if you're on offset 8 then it should go on the next page and if you're on offset 0 it should do page = page - 1. The thing with the offset 0 works, but if i'm on offset 8 it just does page = page + 1 till 100000etc.. I know it's cuz i'm asking for the offset and if it's 8 it should do page + 1 but i just don't know how to make that it just should do page = page + 1 and not page = page + 1 till dunno 100k or smth like that. It looks like this atm : And this is my code: local root = getRootElement() local x,y = guiGetScreenSize() local lp = getLocalPlayer() local resroot = getResourceRootElement(getThisResource()) local recw,rech = 500,200 local recx,recy = x/2-recw/2,y/2-rech/2 local offset = 1 local step = 1 local names = {} local totallines = 9 local testtable = {} local page = 0 --local tab = dxElement:create("gridlist",nil,recx+10,recy+10,180,180,{255,255,255,255},1,"default-bold",nil,nil,nil,{0, 0,0,5},{15,192,252,80},{255,255,255,255},nil) --tab:setVisibility(false) for k=0,40,1 do table.insert(testtable,"Player "..k) end function performRender() local playertab = getElementsByType("player") dxDrawRectangle(recx,recy,recw,rech,tocolor(101,101,101,100),false) dxDrawRectangle(recx+10,recy+10,180,180,tocolor(0,0,0,200),false) local player = playertab[offset*page] local test = testtable[offset] for i,v in ipairs(testtable) do --local test = getElementData(player,"Level") --outputChatBox(test) --names[i] = string.gsub( getPlayerName( v ), "#%x%x%x%x%x%x", "", 1 ) dxDrawRectangle(recx+10,((recy-10))+offset*20,180,20,tocolor(15,192,252,80),false) dxDrawText(testtable[i],recx+15,(recy-10)+i*20) end outputChatBox(test) if page < 1 then page = 1 end outputChatBox(page) end function scrolling(side) if side == "up" then offset = offset - step elseif side == "down" then offset = offset + step end if offset >= totallines then page = page + 1 offset = 0 elseif offset <= 1 then page = page - 1 offset = 1 end end function scrollUP() scrolling("up") end function scrollDown() scrolling("down") end bindKey("mouse_wheel_up","down",scrollUP) bindKey("mouse_wheel_down","down",scrollDown) bindKey("tab","both", function(_,state) if state == "down" then addEventHandler("onClientRender",root,performRender) showingtab = true elseif state == "up" then removeEventHandler("onClientRender",root,performRender) offset = 1 page = 1 showingtab = false end end )
-
uh we didn't activated this option. i just want the last reply dunno why