Jump to content

isa_Khamdan

Members
  • Posts

    484
  • Joined

  • Last visited

Everything posted by isa_Khamdan

  1. Hello , I Am going to move my server to a new host where can I find accounts files and these stuffs to move them to the new host?
  2. Else I have an error on the line 1362 , 1364 , 1365 can you fix them for me please?
  3. safecol = createColCuboid ( -4114.1, -2998.8, 379.5, 70, 70, 70 ) safeZone = createMarker ( 2244.20752, 498.09100, 11.70, "cylinder", 150, 0, 255, 0, 0 ) these should be in the top of the script right?
  4. then why it didn't work for me
  5. not working players still can open the freeroam inside the safe area
  6. Hmm , I think this will only make freeroam works inside the safe area?
  7. safecol = createColCuboid ( -4114.1, -2998.8, 379.5, 70, 70, 70 ) safeZone = createMarker ( 2244.20752, 498.09100, 11.70, "cylinder", 150, 0, 255, 0, 0 ) -- Line 1600 function toggleFRWindow() if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() else if safecol then if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() addEventHandler( "onColShapeHit", safecol, enterZone ) addEventHandler( "onPlayerJoin", safecol, enterZone ) function leaveZone(leavePlayer) if safecol then showCursor(true) showAllWindows() colorPicker.closeSelect() end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) like this?
  8. Ok I found where do I put the codes but can you give me an example for the code cuz I am still new in coding
  9. Is it possible to block the use of F1 button inside a safe area?
  10. How can I make this gate open for players who drive vehicles? checkGateMarker = createMarker ( 2066.49, 1578.40, 10.67, "corona", 4.5, 0, 0, 255, 0 ) function onPoliceShapeHit ( thePlayer, matchingDimension ) if ( getElementType ( thePlayer ) == "player" ) then end end addEventHandler ( "onColShapeHit", policeColShape, onPoliceShapeHit ) function createGate () gatePolice = createObject (980, 2067.10, 1580.30, 12.30, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) function gateCheckingTeam ( thePlayer, matchingDimension ) moveObject ( gatePolice, 988, 2067.10, 1580.30, 7 ) end addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) function onLeave ( thePlayer, matchingDimension ) setTimer ( movingBackPolice, 3000, 1, thePlayer ) end addEventHandler ( "onMarkerLeave", checkGateMarker, onLeave ) function movingBackPolice () moveObject ( gatePolice, 3000, 2067.10, 1580.30, 12.30 ) end
  11. it's on the center of the width only?
  12. No I want it in the center in all screen resolutions
  13. ok I added this and it worked how can I make it in the center of the screen? dxDrawText ( msg, 20, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" )
  14. Thanks a lot for everything but can you tell me how can I set the font size / Color?
  15. Ok now I made it and it's working fine but the unfreeze message never disappear? client side function drawMessage1 ( ) local screenWidth, screenHeight = guiGetScreenSize ( ) dxDrawText ( "YOU ARE NOW FROZEN", screenWidth / 2, screenHeight / 2 ) end addEvent ( "text1", true ) addEventHandler ( "text1", root, function ( state ) removeEventHandler ( "onClientRender", getRootElement (), drawMessage1 ) if ( state ) then addEventHandler ( "onClientRender", getRootElement (), drawMessage1 ) end end ) function drawMessage2 ( ) local screenWidth, screenHeight = guiGetScreenSize ( ) dxDrawText ( "YOU ARE NOW UNFROZEN", screenWidth / 2, screenHeight / 2 ) end addEvent ( "text2", true ) addEventHandler ( "text2", root, function ( state ) removeEventHandler ( "onClientRender", getRootElement (), drawMessage2 ) if ( state ) then addEventHandler ( "onClientRender", getRootElement (), drawMessage2 ) end end ) server side addEventHandler ( "onMarkerHit", createMarker ( 1791.537, 656.511, 17.626, 'cylinder', 2.0, 255, 0, 0, 150 ), function ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) ~= "player" ) then return end local vehicle = getPedOccupiedVehicle ( hitElement ) if ( vehicle ) then setElementFrozen ( vehicle, true ) triggerClientEvent ( hitElement, "text1", hitElement, true ) setTimer ( function ( thePlayer, vehicle ) triggerClientEvent ( thePlayer, "text1", thePlayer, false ) triggerClientEvent ( hitElement, "text2", hitElement, true ) setElementFrozen ( vehicle, false ) end ,5000, 1, hitElement, vehicle ) end end )
  16. Works now but it only show text when you get freeze? There is no Unfreeze text
  17. Now the Timer doesn't work + text now showing? Edit: that's the meta.xml I am using "CP" author="N" type="script" version="1.0" />
  18. Same problem happened to me , Just open the photos using Photoshop and save them again as .PNG and try them. I don't really know what is the problem because the pictures are working but it still say invalid file and when I did this and uploaded all the pictures again it worked fine. Try it
  19. I tried this but it's not working can you tell me what is the problem now? *Client Side local function drawMessage () local screenWidth, screenHeight = guiGetScreenSize (); dxDrawText ("YOU ARE NOW FROZEN", screenWidth - 50, screenHeight); end; addEvent ("onPlayerFrozen", true); addEvent ("onPlayerUnfrozen", true); addEventHandler ("onPlayerFrozen", getRootElement (), function () addEventHandler ("onClientRender", getRootElement (), drawMessage); end); addEventHandler ("onPlayerUnfrozen", getRootElement (), function () removeEventHandler ("onClientRender", getRootElement (), drawMessage); end); *Server Side addEventHandler ( "onMarkerHit", createMarker ( 1791.537, 656.511, 17.626, 'cylinder', 2.0, 255, 0, 0, 150 ) , function ( hitElement, matchingDimension ) if getElementType (hitElement) ~= "player" then return; end; if ( getElementType ( hitElement ) == "vehicle" ) then setElementFrozen ( hitElement, true ) triggerClientEvent (hitElement, "onPlayerFrozen", getRootElement ()); setTimer ( function (thePlayer) triggerClientEvent (thePlayer, "onPlayerUnfrozen", getRootElement ()); setElementFrozen (thePlayer, false); end, 5000, 1, hitElement); end end ); Edit : I used Debugscript 3 to check for errors but there are no errors at all and the marker still not showing so I can test it
  20. I tried but I still don't get it can someone just fix this little code for me? it won't take long :c
×
×
  • Create New...