Jump to content

jomarisk8er

Members
  • Posts

    25
  • Joined

  • Last visited

Details

  • Gang
    PinoyPride

jomarisk8er's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. oh thats why im asking.. i cant pass this lol
  2. im using RP server, normal, im not doing any modes. i want to trigger it if the timer(not countdown) start, like, bankrobbery, theres a timer to rob right,
  3. they need to go in the marker so they can participate the racing, all on the markers will freeze and start countdown when the timer starts = /racetime like that
  4. ---client----- root = getRootElement() function Countdown (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/10.png",false) setTimer ( Countdown9, 1000, 1 ) outputChatBox ( "countdown started", root, 255, 255, 255, true ) end function Countdown9 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/9.png",false) setTimer ( Countdown8, 1000, 1 ) end function Countdown8 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/8.png",false) setTimer ( Countdown7, 1000, 1 ) end function Countdown7 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/7.png",false) setTimer ( Countdown6, 1000, 1 ) end function Countdown6 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/6.png",false) setTimer ( Countdown5, 1000, 1 ) end function Countdown5 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/5.png",false) setTimer ( Countdown4, 1000, 1 ) end function Countdown4 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/4.png",false) setTimer ( Countdown3, 1000, 1 ) end function Countdown3 (root ) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/3.png",false) setTimer ( Countdown2, 1000, 1 ) end function Countdown2 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/2.png",false) setTimer ( Countdown1, 1000, 1 ) end function Countdown1 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/1.png",false) setTimer ( Countdown0, 1000, 1 ) end function Countdown0 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,320,81,"images/go.png",false) setTimer ( CountdownEnd, 3000, 1 ) end function CountdownEnd (root) guiSetVisible ( imagecount, false ) end addEvent("startcountdown",true) addEventHandler("startcountdown",getRootElement(), Countdown) ----server---- racemarker = createMarker(-2663.51,610,13.3,"cylinder",20,0,255,0,100) function start(hitElement) if not isPedInVehicle(hitElement) then return end if (source == racemarker) then local vehicle = getPedOccupiedVehicle(hitElement) setElementFrozen(vehicle,true) triggerClientEvent(hitElement,"startcountdown",hitElement) setTimer(setElementFrozen,10000,1,vehicle,false) end end addCommandHandler("cd",start) i want to freeze all in the marker when timer starts or do a command
  5. what should i change, i want to add command or timer for the race.. how? like if you type /racetime it will output how many time is remaining? lol sorry for too much question ..
  6. racemarker = createMarker(-2663.51,610,13.3,"cylinder",20,0,255,0,100) function start(hitElement) if not isPedInVehicle(hitElement) then return end if (source == racemarker) then local vehicle = getPedOccupiedVehicle(hitElement) setElementFrozen(vehicle,true) triggerClientEvent(hitElement,"startcountdown",hitElement) setTimer(setElementFrozen,10000,1,vehicle,false) end end addCommandHandler("cd",start) like this? its not working.
  7. oh its working, but how can i have a command for to start?, cause i want to set Timer, or Command to start the race.. how?
  8. racemarker = createMarker(192,182,13,"cylinder",20,0,255,0,100) function start(hitElement) if (source == racemarker) then for i,vehicle in ipairs(getElementByType("vehicle")) do setElementFrozen(vehicle,true) triggerClientEvent("startcountdown",hitElement) setTimer(setElementFrozen,10000,1,vehicle,false) end end addEventHandler("onMarkerHit",racemarker,start) is that right?
  9. ---server--- function start(thePlayer) for i, vehicle in ipairs(getElementsByType("vehicle")) do setElementFrozen(vehicle, true) setElementFrozen(thePlayer,true) triggerClientEvent("startcountdown",getRootElement()) setTimer(setElementFrozen,10000,1,vehicle,false) setTimer(setElementFrozen,10000,1,thePlayer,false) end end addCommandHandler("countdown",start) ---client--- root = getRootElement() function Countdown (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/10.png",false) setTimer ( Countdown9, 1000, 1 ) outputChatBox ( "countdown started", root, 255, 255, 255, true ) end function Countdown9 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/9.png",false) setTimer ( Countdown8, 1000, 1 ) end function Countdown8 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/8.png",false) setTimer ( Countdown7, 1000, 1 ) end function Countdown7 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/7.png",false) setTimer ( Countdown6, 1000, 1 ) end function Countdown6 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/6.png",false) setTimer ( Countdown5, 1000, 1 ) end function Countdown5 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/5.png",false) setTimer ( Countdown4, 1000, 1 ) end function Countdown4 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/4.png",false) setTimer ( Countdown3, 1000, 1 ) end function Countdown3 (root ) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/3.png",false) setTimer ( Countdown2, 1000, 1 ) end function Countdown2 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/2.png",false) setTimer ( Countdown1, 1000, 1 ) end function Countdown1 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/1.png",false) setTimer ( Countdown0, 1000, 1 ) end function Countdown0 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,320,81,"images/go.png",false) setTimer ( CountdownEnd, 3000, 1 ) end function CountdownEnd (root) guiSetVisible ( imagecount, false ) end addEvent("startcountdown",true) addEventHandler("startcountdown",getRootElement(), Countdown) how to freeze vehicle that only hit the marker? cause its freezing all the players in the server.. cause i want to make a race script, race participants should hit the marker to participate the race.. pls give me some tips..
  10. oh sorry, im removing it cause for its much messy. sorry
  11. -----client--- local robberHouses = { {240.7,-1377,52.2}; {192.2,-1307.8,69.3}; {210.6,-1237.8,77.3}; {237.6, -1200.7,75.1}; {316.6,-1138,80.5}; {434,-1136.8,72.7}; {485.3,-1155.2,70.6}; {485.1,-1116.8,81.3}; {561,-1111.4,61.8}; {566.5,-1099,68}; {610.6,-1083.2,57.8}; {647.1,-1057.7,51.5}; {671.1,-1019,54.7}; {743.4,-1006.9,51.7}; {785.4,-826.9,69.2}; {809.7,-758.7,75.5}; {849.6,-743.9,93.9}; {866.7,-710.3,104.6}; {895.2,-793.9,100.4}; {895.1,-645.3,115.9}; {952,-720.2,121.2}; {992.8,-697.6,120.6}; {977.6,-768.1,111.2}; {1047.6,-656.1,119.1}; {1094.9,-662.6,112.6}; {1016.9,-760.7,111.5}; {830.2,-923.5,54.2}; {1894.3,-1065.17,23.9}; {1893.1,-1070.6,23.9}; {1915.6,-1065,23.1}; {1935,-1071.7,23.4}; {1957.6,-1069.7,23.8}; {1959.2,-1102,25.75}; {1936.5,-1103.57,25.45}; {1925.4,-1101.5,25.07}; {1908.22,-1102.37,24.6}; {1997.76,-1103.29,25.78}; {2020.64,-1109.4,25.2}; {2033.74,-1112.4,24.7}; {2090.28,-1113.54,25.7}; {2105.83,-1142.86,24.58}; {2103,-1168.75,24.6}; {2104.2,-1188.47,25}; {2122.2,-1185.8,23}; {2031.6,-1043.16,24.2}; {2044.44,-1050.6,24.6}; {2059.4,-1056.44,25.65}; {2012.82,-967.22,41.46}; {2050.25,-954.7,47}; {2066.4,-992,47.7}; {2068,-959.8,51.87}; {2090.9,-973,50.9}; {2092.9,-1011.32,50}; {2123.4,-968,56.76}; {2130.4,-976.2,58.3}; {2177.1,-983,63.4}; {2205,989.38,62.9}; {2261,-1020.53,58.3}; {2155.8,-1071.8,38.7}; {2334.4,-1203,27}; {2334.7,-1233.7,27}; {2334.7,-1264.9,27}; {2404.16,-1281.7,24}; {2515.8,-1224.9,38}; {2558.2,-1210.4,53.5}; {2585.3,-1200.2,58.2}; {2682.6,-1200,65.7}; {2756.45,-1881.9,68.3}; {2780.25,-1340.7,29.6}; {2451.8,-1642.7,12.7}; {2512.7,-1651.13,12.9}; {2514.25,-1700.7,12.4}; {2455,-1709.2,12.6}; {2323.46,-1796.1,12.5}; {2342.1,-1895.25,12.6}; } function unpackRobberHouses () return unpack ( robberHouses [ math.random ( #robberHouses ) ] ) end local robberWindow = guiCreateWindow ( 0.314, 0.2513, 0.3809, 0.3893, "Robber Job GUI", true ) local robberLabel = guiCreateLabel ( 0.0193, 0.0736, 0.9903, 0.1104, "Robber Job", true, robberWindow ) guiLabelSetColor ( robberLabel, 255, 0, 0 ) guiLabelSetHorizontalAlign ( robberLabel, "center", false ) guiSetFont ( robberLabel, "default-bold-small" ) local robberInfoLabel = guiCreateLabel ( 0.0309, 0.2441, 0.944, 0.3077, "If you accept this job, you are able to rob houses. \nDrive to the blip created on your minimap (an house icon) Once you enter the marker\nyou will get paid.\nAnd another house will be able to be robbed.", true, robberWindow ) local robberAcceptButton = guiCreateButton ( 0.3533 ,0.7993, 0.1409, 0.1204, "Accept", true, robberWindow ) local robberCloseButton = guiCreateButton ( 0.5309, 0.7993, 0.1409, 0.1204, "Close", true, robberWindow ) guiSetVisible ( robberWindow, false ) function buttonClick ( button ) if ( button ~= "left" ) then return end if ( source == robberCloseButton ) then guiSetVisible ( robberWindow, false ) showCursor ( false ) elseif ( source == robberAcceptButton ) then destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) triggerServerEvent ( "robberJobAccepted", localPlayer ) guiSetVisible ( robberWindow, false ) showCursor ( false ) triggerEvent ( "createHouseEvent", localPlayer ) outputChatBox ( "You are now employed as a Robber!" ) end end addEventHandler ( "onClientGUIClick", resourceRoot, buttonClick ) addEvent ( "createHouseEvent", true ) function createHouses () x, y, z = unpackRobberHouses () robhouseMarker = createMarker ( x, y, z, "cylinder", 1.5, 255, 0, 0, 85, localPlayer ) robhouseBlip = createBlipAttachedTo ( robhouseMarker, 32, localPlayer ) end addEventHandler ( "createHouseEvent", root, createHouses ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( source == robhouseMarker and not isPedInVehicle ( localPlayer ) and hitElement == localPlayer ) then triggerServerEvent ( "givePlayerPay", localPlayer ) destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) triggerEvent ( "createHouseEvent", localPlayer ) playSound ( "files/cash.mp3", false ) end end ) addEventHandler ( "onClientPedDamage", resourceRoot, function () cancelEvent () end ) function showRobberWindow() if (guiGetVisible(robberWindow)) then guiSetVisible (robberWindow, false) showCursor (false) else guiSetVisible (robberWindow, true) showCursor (true) end end addEvent ("showRobberWindow",true) addEventHandler ("showRobberWindow", root, showRobberWindow) addEventHandler("onClientGUIClick", Button, showRobberWindow) ---server--- robbermarker = createMarker(929.1,-919.87,41.6,"cylinder",1.5,255,0,0) robberjobblip = createBlipAttachedTo(robbermarker,41) setBlipVisibleDistance(robberjobblip, 300) function createRobberTeam () robberTeam = createTeam ( "Robber", 250, 0, 0 ) end addEventHandler ( "onResourceStart", resourceRoot, createRobberTeam ) addEvent ( "robberJobAccepted", true ) function givePlayerJob () setPlayerTeam ( source, robberTeam ) local paccount = getPlayerAccount ( source ) local skinid = getAccountData ( paccount , "boughtskin" ) if skinid then setElementModel ( source , tonumber ( skinid ) ) setPlayerNametagColor(source, 255,0,0) end end addEventHandler ( "robberJobAccepted", root, givePlayerJob ) function showGUI(hitElement) if (source == robbermarker) and (isPedInVehicle(hitElement) == false) then triggerClientEvent(hitElement,"showRobberWindow",hitElement) end end addEventHandler("onMarkerHit",resourceRoot,showGUI) addEvent ( "givePlayerPay", true ) function givePlayerRobPay () local wl = getPlayerWantedLevel(source) money = math.random ( 350, 1020 ) givePlayerMoney ( source, money ) setPlayerWantedLevel(source, wl+1) outputChatBox ( "You succesfully robbed the house and made $" ..money, source,0,255,0,false ) fadeCamera ( source, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, source, true, 1 ) end addEventHandler ( "givePlayerPay", root, givePlayerRobPay ) -how to get if theres a near cop, so whn i rob, i got 1 star when they point at me or looking at me.. pls help
  12. thanks castillo it works. Edit: castillo, can i have request? can you put gang color so i can apply it in turfing system? .. pls
  13. i attached the radio to the vehicle, but the sound is staying at one place. and the sound is in client side
×
×
  • Create New...