Jump to content

Karuzo

Members
  • Posts

    1,213
  • Joined

  • Last visited

Everything posted by Karuzo

  1. There's nothing to debug. It just doesn't simply get the player.
  2. You don't understand me right. I just want to change the player if i scroll down or up. So if i scroll down it should do player + 1 and if i scroll up it should do player - 1 .
  3. Look again at your code. You wrote xc wrong.
  4. Just use the event onVehicleExplode and do carUsedCount = {}
  5. It's like in the first picture.
  6. I'm Sorry. I've should said that i'm trying to do this with an offset, which changes when you're scrolling. This is my code with the offset: function performRender() local tick = getTickCount() local endTime = tickk + 500 local laufzeit = tick - tickk local dauer = endTime - tickk local progress = laufzeit/dauer local recintw,recinth,_ = interpolateBetween(x,y,0,recw,rech,0,progress,eastype) local recintx,recinty,_ = interpolateBetween(0,0,0,recx,recy,0,progress,eastype) local playertab = getElementsByType("player") dxDrawRectangle(recintx,recinty,recintw,recinth,tocolor(101,101,101,100),false) dxDrawRectangle(recintx+10,recinty+10,180,180,tocolor(50,50,50,200),false) local player = playertab[offset+page*8] --local test = testtable[offset+page*8] if player then for i=1,totallines do --local v = testtable[i+page*8] local v = playertab[i+page*8] local nameplayer = getPlayerName(v) --local vdraw = tostring(string.gsub( getPlayerName(v), "#%x%x%x%x%x%x", "", 1 )) local level = ( getElementData(v,"Level") or 0 ) local money = ( getElementData(v,"Money") or 0 ) local countries = getElementData(v,"Country") or "N/A" local state = getElementData(v,"Status") or "N/A" local playerX, playerY, playerZ = getElementPosition ( v ) local zone = getZoneName ( playerX, playerY, playerZ ) dxDrawRectangle(recintx+10,((recinty-10))+offset*20,180,20,tocolor(15,192,252,80),false) dxDrawText(nameplayer,recintx+15,(recinty-9)+i*20,x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,true,false,0,0,0) dxDrawText(nameplayer,recintx+200,(recinty+10),x,y,tocolor(255,255,255,255),2,"default","left","top",false,false,true,true,false,0,0,0) dxDrawText("Level: "..level,recintx+200,(recinty+40),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("Money: "..money,recintx+200,(recinty+60),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("Location: "..zone,recintx+200,(recinty+80),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("State: "..state,recintx+200,(recinty+120),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("Country: "..countries,recintx+200,(recinty+100),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) end --outputChatBox(page) end end function scrolling(side) if side == "down" then offset = offset + step elseif side == "up" then if offset < 1 and page < 0 then page = 0 offset = 1 end offset = offset - step end if page < 0 then page = 0 offset = 1 elseif page == -1 then page = 0 end end function scrollUP() scrolling("up") if offset < 1 then page = page - 1 offset = 9 end end function scrollDown() scrolling("down") if offset > totallines then page = page + 1 offset = 1 end end bindKey("mouse_wheel_up","down",scrollUP) bindKey("mouse_wheel_down","down",scrollDown)
  7. Hey Guys, I have a small problem with my scoreboard. I'm trying to show all the stats only for the player which is selected. At the moment it looks like this : And my code: function performRender() local playertab = getElementsByType("player") dxDrawRectangle(recintx,recinty,recintw,recinth,tocolor(101,101,101,100),false) dxDrawRectangle(recintx+10,recinty+10,180,180,tocolor(50,50,50,200),false) local player = playertab[offset+page*8] if player then for i=1,totallines do local v = playertab[i+page*8] local nameplayer = getPlayerName(v) local level = ( getElementData(v,"Level") or 0 ) local money = ( getElementData(v,"Money") or 0 ) local countries = getElementData(v,"Country") or "N/A" local state = getElementData(v,"Status") or "N/A" local playerX, playerY, playerZ = getElementPosition ( v ) local zone = getZoneName ( playerX, playerY, playerZ ) dxDrawRectangle(recintx+10,((recinty-10))+offset*20,180,20,tocolor(15,192,252,80),false) dxDrawText(nameplayer,recintx+15,(recinty-9)+i*20,x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,true,false,0,0,0) dxDrawText(nameplayer,recintx+200,(recinty+10),x,y,tocolor(255,255,255,255),2,"default","left","top",false,false,true,true,false,0,0,0) dxDrawText("Level: "..level,recintx+200,(recinty+40),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("Money: "..money,recintx+200,(recinty+60),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("Location: "..zone,recintx+200,(recinty+80),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("State: "..state,recintx+200,(recinty+120),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) dxDrawText("Country: "..countries,recintx+200,(recinty+100),x,y,tocolor(255,255,255,255),1,"default-bold","left","top",false,false,true,false,false,0,0,0) end --outputChatBox(page) end My question is : How can i check which player was selected? Since this: local v = playertab[i+page*8] Doesn't work for me. Hope you can help me.
  8. Karuzo

    Bloq Mays

    What is Bloq Mayus?
  9. Karuzo

    The last reply

    @Below#: You shouldn't really post a picture like that on a forum like this one. Since not everyone is +18/+21.
  10. function coordination() xc, cc, bb, nn, aa, zz = getCameraMatrix() outputChatBox(""..xc.." ,"..cc.." ,"..bb.." ,"..nn.." ,"..aa.." ,"..zz.."",255, 0, 0) end addCommandHandler("cameraMatrix", coordination)
  11. Seriously?? Who pays 5 $ only for a gui window??
  12. Karuzo

    Component IDs

    Yeah but those are only the tuning components. I'm searching for the normal car components. like the name of the right/left front door.
  13. Karuzo

    Component IDs

    Hey Guys, So a friend of mine has a problem using getVehicleComponents. Is there a list regarding to all IDs of the vehicle components ? We didn't find anythin.
  14. If you still have problems regarding to the gui which pops up just make those variables local.
  15. For example: local x = 5 dbQuery(cnt," UPDATE yourtable SET x=?",x)
  16. Ofcourse. setCameraMatrix doesn't need a player argument clientside. so just delete the localPlayer.
  17. Try this : setAccountData(acc,"clan",false)
  18. Try to use the event onclientresourcestart and then show up your gui.
  19. What do you mean with derived? My code works to 100%.Honestly idk C, so i can't help you with the "scanf" func.
  20. Change msgType == 2 to msgType == 1
  21. Karuzo

    Question

    https://wiki.multitheftauto.com/wiki/DxDrawAnimWindow
  22. You can't report a resource just because you think its bad lol. Well, would not that make our community clean. I mean maybe it can be a copy of some other resource as There are many other resources with same functions. It will save users time on getting his/her desire resource . I really apologize If i am wrong. But really I think there should be rule of not uploading resource which is already exist in community. You won't buy a car just because another car looks the same. All the resources are unique and different from each other , except the ones which are stolen/copied. And every user has the right to upload his resource imo.
×
×
  • Create New...