Jump to content

Hero192

Members
  • Posts

    512
  • Joined

  • Last visited

Everything posted by Hero192

  1. i made an custom crosshair helps but i want to let the dxDrawImage doesn't show in some weapons and when the player enter the vehicle isPedInVehicle(localPlayer) & getPedWeapon(localPlayer) ~=34 then i failed in adding these functions on this code if oldValue == true and newValue == false then unbindKey("aim_weapon", "both", AimKeyPressed) elseif oldValue == false and newValue == true then bindKey("aim_weapon", "both", AimKeyPressed) end
  2. As the title say,How to set the Bike a max skills to all players
  3. Hero192

    Any idea?

    Thank you alot GTX ! EDIT: How to set his playtime to "0" directly what you helped me in Pm doesn't set to 0 just give +
  4. Hero192

    Any idea?

    Any one have a way for that?
  5. Hero192

    Any idea?

    Hey guys,there's a way to make an cmd that give players Hours if they lost it by bug or something? Like " /give "playername'' ''ammount of hours'' Thanks in advance i hope some one give me a hand on it addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Play Time" , "00:00 " ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Play Time" , "N/A" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Play Time" , "00:00" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerLogout" , root , function ( pAccount ) local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Play Time" , "N/A" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function actualizarJugadorOn ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end
  6. Hello guys, anyone can tell me which events / functions and which Walking style i NEED to use for make this script see it out in this video https://www.youtube.com/watch?v=DxmMo35vWDw
  7. Dude i dont mean that,i mean when the player click the PED the rectangle show as a gui and if you clicked on the close button as Rectangle too the gui be visible,false
  8. Hello again, anyone can help me out on letting this script works only with Hours / Minutes not Days/Months.. i wish you give me an hand on it (i tried alone but i failed thats why im asking for supports),thanks !
  9. Hello everyone,as the title say, i want to asks about the DX Rectangle, i wanna do an GUI with Rectangles if you know how give me an example to start
  10. Anyone can give me an example to start
  11. Hey all i want to know how to add the vehicle an custom speed like for example making Infernus's SPEED with 320KM/H I wish someone help me out and thanks in advance !!
  12. Hero192

    GUI problem

    Hey, i have problem in setting the gui to fit all deffirent screens My question is how to make this type of numbers in Gui editor guiCreateButton(0.6, 0.8, 0.15, 0.15, "Close", true, window) and How to make the Windows in Middle of the screen? i have same problem for Dx draw texts and images..
  13. function FunctionName() if (isPlayerMapVisible()) then -- dxDrawText here end end addEventHandler("onClientRender", root, FunctionName) But.. when i Zoom the map it doesn't stay in the same possition any help?
  14. I have question to Madex, is it possible to exports the group system to another gate system that only the player who is in the group (name) who can open it
  15. As the title say, how to write an Direct X Text in the image F11 any idea? thanks in advance.
  16. Doesn't works it give warning in debug like in my code Bad argument @ 'getPlayerTeam'[expected player at argument 1,got ped)
  17. Hello guys, my problem is i want to let only the Criminal team who click the ped and get the gui but in this code criminal team and non criminal team are not able to take the job i tried also with if getTeamName(getPlayerTeam(element)) == "Criminal" then returns but it doesn't works too ,any one have an idea please? function onPedClick(button, state, absX, absY, wx, wy, wz, element) if element and getElementType(element) == "ped" and state=="down" and button=="left" then local x, y, z = getElementPosition(element) if getTeamName(getPlayerTeam(element)) ~= "Criminal" then outputChatBox("You must be criminal .",255,0,0) return end if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3 then guiSetVisible(Window,true) end end end end addEventHandler("onClientClick", getRootElement(), onPedClick,true ) WARNING: Bad argument @ 'getPlayerTeam'[expected player at argument 1,got ped)
×
×
  • Create New...