Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. I suggest you to create the marker in server side, because in client side you can hit the marker from high way even if you're not in it, not like server marker, it works only if you hit the marker
  2. -Here you go, i updated the script and i cleaned it so it's now with all features that you need ! -Client side: local sx, sy = guiGetScreenSize() --getting the screen size and defining it local number = 15 local client = getLocalPlayer() function dxDraw () dxDrawText("You'll be warped after "..tostring(number).. " seconds!", (sx-390)/ 2, (sy-36)/ 2, ((sx-390)/ 2) + 390, ((sy-36)/ 2) + 36, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top" ) if ( getTickCount ( ) - count >= 1000 ) then number = number - 1 count = getTickCount ( ) setElementFrozen ( client,true ) if ( number < 0 ) then number = nil count = nil setElementFrozen ( client,false ) fadeCamera(false) setTimer(fadeCamera, 3000, 1, true) setTimer(setElementPosition, 1000, 1, client, 1170.24, -1207.2, 19.66) removeEventHandler ("onClientRender", root, dxDraw ) end end end addEvent ("sendData", true) addEventHandler ("sendData", root, function () count = getTickCount () addEventHandler ( "onClientRender", root, dxDraw ) end) -Server side: addCommandHandler("base", function (thePlayer) if ( getElementType ( thePlayer ) == "player" ) then local account = getPlayerAccount(thePlayer) if not account or isGuestAccount(account) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) ) then triggerClientEvent(thePlayer,"sendData",thePlayer) else outputChatBox("Base system: You must be admin to use this command",thePlayer,255,0,0) end end end) ~Regards, KariM
  3. This idea is also good, to add them directly to the mtaserver.conf but if im not wrong i don't think its possible
  4. So, you want to get all online players in a gridlist and make them in order based on their score or what? Excalty! I have no idea about your score system
  5. Your script look fine, add timer for each bot got killed check if it exist and destroy it
  6. We can help him, but not with a leaked or no owner permission script. I know it's not him who made this HUD ,another guy but this guy stole the designs from SAUR RPG client downloaded resources. If i helped him in this case, i will be looking like i'm supporting the leaked scripts and i don't like that
  7. There's any error in the debugscript ?
  8. So, you want to get all online players in a gridlist and make them in order based on their score or what?
  9. Yes i understood you but which way you want to make the GUI VISIBLE, for example when the player hit a marker the gui be visible or else when he click on the ped
  10. It stay a resource without owner permission!
  11. Which way you use or you want to use? to get the GUI showing, marker hit or pedclick..?
  12. I will do the other things when i have time local sx, sy = guiGetScreenSize() --getting the screen size and defining it local number = 15 function dxDraw () dxDrawText("You'll be warped after "..tostring(number).. " seconds!", (sx-390)/ 2, (sy-36)/ 2, ((sx-390)/ 2) + 390, ((sy-36)/ 2) + 36, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top" ) if ( getTickCount ( ) - count >= 1000 ) then number = number - 1 count = getTickCount ( ) if ( number < 0 ) then number = nil count = nil fadeCamera(false) setTimer(fadeCamera, 3000, 1, true) setElementPosition(localPlayer, 1170.24, -1207.2, 19.66) removeEventHandler ( "onClientRender", root, dxDraw ) end end end addCommandHandler("base", function () count = getTickCount () addEventHandler ( "onClientRender", root, dxDraw ) end)
  13. Ah i think i got you, put the code here if you won't ,send it via pm i can complet it and clear it from bugs
  14. I made a full code for you, your code was totally messy and bugged --Client side: local number = 15 -- You can edit the timer to your choice. local sx, sy = guiGetScreenSize() --getting the screen size and defining it function dxDraw () dxDrawText("You'll be warped after "..tostring(number).. " seconds!", (sx-390)/ 2, (sy-36)/ 2, ((sx-390)/ 2) + 390, ((sy-36)/ 2) + 36, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top" ) if ( getTickCount ( ) - count >= 1000 ) then --we will conver the 1000 mili seconds to 1, so 3000 mili seconds will be as number 3. number = number - 1 count = getTickCount ( ) showCursor (true ) --showing the cursor to avoid abusers setElementFrozen ( localPlayer,true ) -- frozening the player to avoid abusers if ( number < 0 ) then --checking if the time remaining became 0 then we will remove the event handler of dxDrawImage. number = nil count = nil fadeCamera(false) setTimer(fadeCamera, 3000, 1, true) --fading the screen setElementPosition(localPlayer, 1170.24, -1207.2, 19.66) --You can edit these cordinations to your choice,it was just for test the code. removeEventHandler ( "onClientRender", root, dxDraw ) -- we remove the event handler of dxDraw function. showCursor (false ) setElementFrozen ( localPlayer,false ) end end end addCommandHandler("base", --Creating our command we name it "base". function () count = getTickCount () addEventHandler ( "onClientRender", root, dxDraw ) end)
  15. Alright, put the full code i will do it for you to learn from it
  16. So you want to make GUI with button, if you pressed it ,it will tell you how much total ammo the ped have , the ped that has been created in the preview script or player?
  17. triggerServerEvent --it will send the data from client to server side
  18. Lmao, dxDraws works only in client side , use trigger to send it from client to server
  19. dxDrawText("For "..number.."", 146, 476, 304, 536, tocolor(255,255,255,255), 1, "default-bold", "center",false, false, false, false, false)
  20. dxDrawText("For "..number.."", 146, 476, 304, 536, tocolor(255,255,255,255), 1, "default-bold", "center")
  21. Calm down? You didn't explain your problem as well, after all im just trying to help you so act nice
×
×
  • Create New...