Jump to content

scolen

Members
  • Posts

    67
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by scolen

  1. scolen

    Help ! acl

    How to send an outputchatbox only to the people in the police acl ?
  2. scolen

    [HELP]DATABSE

    No purchased vehicles will be left. In the console, here is an error: "CarShop-System/Server.lua:120: dbExec failed; (1) SQL argument error ".. but the localhost is working fine without any errors, when I put it on the server it happens like this. What is the reason for that ? createBlip ( 2131.88086, -1149.92566, 24.21433, 55, 2, 0, 0, 0, 255, 0, 99999.0, getRootElement( ) ) local vehDB = dbConnect( 'sqlite', 'Loja de veiculos - Database.db' ) dbExec( vehDB, ' CREATE TABLE IF NOT EXISTS `VehiclesSystem_Players` (pSerial, vehID, vehName, vehPrice, Subscription) ' ) --dbExec( vehDB, ' DROP TABLE `VehiclesSystem_Players` ' ) vehPers = { }; vehview = { }; function refreshMyList( ) local check = dbQuery( vehDB, ' SELECT * FROM `VehiclesSystem_Players` ' ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then triggerClientEvent( root, 'VehiclesSystem;emptyMyList', root ) return end triggerClientEvent( root, 'VehiclesSystem;putMyVehicles', root, results ) end addEvent( 'refreshMyListS', true ) addEventHandler( 'refreshMyListS', root, refreshMyList ) function viewVehiclex( ID, x, y, z, state ) if ( state == 'close' ) then if ( isElement( vehview[source] ) ) then destroyElement( vehview[source] ) end elseif ( state == 'view' ) then if ( isElement( vehview[source] ) ) then if ( getElementModel( vehview[source] ) ) == ID then return end destroyElement( vehview[source] ) end vehview[source] = createVehicle( ID, x, y, z + 0.2, 0, 0, 10 ) setElementDimension( vehview[source], getElementData( root, 'vehiclesSystem;dimension' ) or 1 ) setElementDimension( source, getElementData( root, 'vehiclesSystem;dimension' ) or 1 ) setElementData( root, 'vehiclesSystem;dimension', getElementData( root, 'vehiclesSystem;dimension' ) + 1 or 1 ) end end addEvent( 'VehiclesSystem;createViewVehicle', true ) addEventHandler( 'VehiclesSystem;createViewVehicle', root, viewVehiclex ) addEvent( 'VehiclesSystem;destroyPersonalVehicle', true ) addEventHandler( 'VehiclesSystem;destroyPersonalVehicle', root, function( ) if ( isElement( vehPers[source] ) ) then destroyElement( vehPers[source] ) end end ) addEvent( 'VehiclesSystem;createRentVehicle', true ) addEventHandler( 'VehiclesSystem;createRentVehicle', root, function( ID, vehName ) if ( isElement( vehPers[source] ) ) then destroyElement( vehPers[source] ) end vehPers[source] = createVehicle( ID, 2126.08862, -1136.05115, 25.47241 + 1, -0, 0, 224.5189666748 ) fadeCamera( source, false ) setTimer( fadeCamera, 1500, 1, source, true ) takePlayerMoney( source, 1000 ) setElementDimension( vehPers[source], 0 ) setElementDimension( source, 0 ) setTimer( warpPedIntoVehicle, 1500, 1, source, vehPers[source] ) setTimer( destroyElement, 300000, 1, vehPers[source] ) setTimer( function( ) outputChatBox( '#1E90FF[Car Shop] #FFFFFFWarning: Your rental time is up and your vehicle has been removed #FF0000!', source, 255, 255, 255, true ) end, 300000, 1 ) triggerClientEvent( source, 'VehiclesSystem;gridListAddRent', source, ID, vehName ) end ) addEvent( 'VehiclesSystem;lock/unlockPersonalVehicle', true ) addEventHandler( 'VehiclesSystem;lock/unlockPersonalVehicle', root, function( ) if ( not isElement( vehPers[source] ) ) then outputChatBox( '#1E90FF[Car Shop] #FFFFFFError: you dont have this vehicle #FF0000!', source, 255, 255, 255, true ) return end if ( isVehicleLocked( vehPers[source] ) == true ) then setVehicleLocked( vehPers[source], false ) outputChatBox( '#2BFF00*#1E90FF[Car Shop] #FFFFFFSuccess, Your vehicle has been unlocked #2BFF00!', source, 255, 255, 255, true ) else setVehicleLocked( vehPers[source], true ) outputChatBox( '#2BFF00*#1E90FF[Car Shop] #FFFFFFSuccess, Your vehicle has been locked #2BFF00!', source, 255, 255, 255, true ) end end ) addEvent( 'VehiclesSystem;off/onPersonalVehicle', true ) addEventHandler( 'VehiclesSystem;off/onPersonalVehicle', root, function( ) if ( not isElement( vehPers[source] ) ) then outputChatBox( '#1E90FF[Car Shop] #FFFFFFError: you dont have this vehicle #FF0000!', source, 255, 255, 255, true ) return end if ( getVehicleEngineState( vehPers[source] ) == true ) then setVehicleEngineState( vehPers[source], false ) outputChatBox( '#2BFF00*#1E90FF[Car Shop] #FFFFFFEngine off #2BFF00!', source, 255, 255, 255, true ) else setVehicleEngineState( vehPers[source], true ) outputChatBox( '#2BFF00*#1E90FF[Car Shop] #FFFFFFEngine on #2BFF00!', source, 255, 255, 255, true ) end end ) addEvent( 'VehiclesSystem;off/onLightsPersonalVehicle', true ) addEventHandler( 'VehiclesSystem;off/onLightsPersonalVehicle', root, function( ) if ( not isElement( vehPers[source] ) ) then outputChatBox( '#1E90FF[Car Shop] #FFFFFFError: you dont have this vehicle #FF0000!', source, 255, 255, 255, true ) return end if ( getVehicleLightState( vehPers[source], 0 ) == 0 and getVehicleLightState( vehPers[source], 1 ) == 0 ) then setVehicleLightState( vehPers[source], 0, 1 ) setVehicleLightState( vehPers[source], 1, 1 ) setVehicleLightState( vehPers[source], 2, 1 ) setVehicleLightState( vehPers[source], 3, 1 ) outputChatBox( '#2BFF00*#1E90FF[Car Shop] #FFFFFFlights off #2BFF00!', source, 255, 255, 255, true ) else setVehicleLightState( vehPers[source], 0, 0 ) setVehicleLightState( vehPers[source], 1, 0 ) setVehicleLightState( vehPers[source], 2, 0 ) setVehicleLightState( vehPers[source], 3, 0 ) outputChatBox( '#2BFF00*#1E90FF[Car Shop] #FFFFFFLights on #2BFF00!', source, 255, 255, 255, true ) end end ) addEvent( 'VehiclesSystem;sellMyPersonalVehicle', true ) addEventHandler( 'VehiclesSystem;sellMyPersonalVehicle', root, function( ID, price ) local check = dbQuery( vehDB, ' SELECT * FROM `VehiclesSystem_Players` WHERE pSerial = ? AND vehID = ? ', getPlayerSerial( source ), ID ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then outputChatBox( '#1E90FF[Car Shop] #FFFFFFError: This vehicle is not permanent, you cannot sell it #FF0000!', source, 255, 255, 255, true ) return end if ( isElement( vehPers[source] ) ) then destroyElement( vehPers[source] ) end dbExec( vehDB, ' DELETE FROM `VehiclesSystem_Players` WHERE pSerial = ? AND vehID = ? ', getPlayerSerial( source ), ID ) refreshMyList( ) givePlayerMoney( source, price ) outputChatBox( '#2BFF00*#1E90FF[Car Shop] #FFFFFFSold! You have successfully sold your vehicle #2BFF00!', source, 255, 255, 255, true ) end ) addEvent( 'VehiclesSystem;createPersonalVehicle', true ) addEventHandler( 'VehiclesSystem;createPersonalVehicle', root, function( ID ) local x, y, z = getElementPosition( source ) if ( isElement( vehPers[source] ) ) then destroyElement( vehPers[source] ) end vehPers[source] = createVehicle( ID, x + 2, y + 2, z + 1 ) if ( getElementData( source, 'VehiclesSystem;WarpToVehicle' ) == 'Enabled' ) then warpPedIntoVehicle( source, vehPers[source] ) setElementData( vehPers[source], 'myPersVehicle', getPlayerName( source ) ) end end ) addEvent( 'VehiclesSystem;buyCurrentCar', true ) addEventHandler( 'VehiclesSystem;buyCurrentCar', root, function( ID, Name, Price ) local check = dbQuery( vehDB, ' SELECT * FROM `VehiclesSystem_Players` WHERE pSerial = ? AND vehddID = ? ', getPlayerSerial( source ), ID ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then dbExec( vehDB, ' INSERT INTO `VehiclesSystem_Players` VALUES(?,?,?,?,?) ', getPlayerSerial( source ), tonumber(ID), Name, Price, 'Permanente' ) vehPers[source] = createVehicle( ID, 2126.08862, -1136.05115, 25.47241 + 1, -0, 0, 224.5189666748 ) warpPedIntoVehicle( source, vehPers[source] ) takePlayerMoney( source, Price ) setTimer(setCameraTarget, 1500, 1, source ) setElementDimension( vehPers[source], 0 ) setElementDimension( source, 0 ) fadeCamera( source, false ) setTimer( fadeCamera, 1500, 1, source, true ) triggerClientEvent( source, 'VehiclesSystem;hideBuyWindow', source ) viewVehiclex( nil, nil, nil, nil, 'close' ) refreshMyList( ) else outputChatBox( '#1E90FF[Car Shop] #FFFFFFError: This vehicle already exists in your list #FF0000!', source, 255, 255, 255, true ) return end end )
  3. Is there a resource that spawns from the nearest hospital after a player dies ?... or how to make it. I have put many respawn resources but there is some error and it doesn't spawn from the nearest hospital.
  4. scolen

    [HELP] bindkey

    thanks brother worked.. thanks brother
  5. lol.. I have put it in the weapon id 23 so that it works only if you have it in hand. I didn't remember it at the time. my bad
  6. How to make a gui panel open when f6 is pressed after using the bindKey function ?
  7. This is a script I made. This has been working fine so far and then suddenly stopped working. What is the reason for it? addEvent("startMinerJob", true) function startJob(thePlayer) if not (getElementData(thePlayer, "Jobs") == "miner") then setElementData(thePlayer, "Jobs", "miner") setElementData(thePlayer, "copper", getElementData(thePlayer, "copper")) end mineMarker = createMarker(596.22632, 926.04364, -37.97111, "cylinder", 10.0) addEventHandler("onMarkerHit", mineMarker, function() playerWeapon = getPlayerWeapon(thePlayer) if playerWeapon == 23 then outputChatBox("test", thePlayer) setPedFrozen(thePlayer, true) setTimer(function() setPedAnimation(thePlayer, "SWORD", "sword_4", -1, false, false, false, false) end, 1000, 5) setTimer( function() outputChatBox("relesed", thePlayer) setPedFrozen(thePlayer, false) setElementData(thePlayer, "copper", getElementData(thePlayer, "copper")+3) end , 5000, 1) end end) end addEventHandler("startMinerJob", root, startJob) --[[ Leave Miner Job Section ]] addEvent("leaveMinerJob", true) function leaveJob(thePlayer) if (getElementData(thePlayer, "Jobs") == "miner") then setElementData(thePlayer, "Jobs", nil) outputChatBox("you leaved miner job!", thePlayer, 0, 255, 0) end end addEventHandler("leaveMinerJob", root, leaveJob) --[[ Job Testing Section ]] function test(thePlayer) de = getElementData(thePlayer, "copper") outputChatBox("you have "..de.." coppers") end addCommandHandler("gg", test)
  8. I created a Miner Job but there is a problem. When I hit the plant command several times, I could mine only the 5 stones in this script, but the other stones are not destroyed. What is the reason for this? Please help? addEvent("startMinerJob", true) function startJob(thePlayer) if not (getElementData(thePlayer, "Jobs") == "miner") then setElementData(thePlayer, "Jobs", "miner") end function plant(thePlayer) if (getElementData(thePlayer, "Jobs") == "miner") then x, y, z = getElementPosition(thePlayer) disx = 611.54028 disy = 878.61017 disz = -42.9609 if (getDistanceBetweenPoints3D(x, y, z, disx, disy, disz) < 90) then outputChatBox("Bomb Planted!", thePlayer, 255, 0, 0) setTimer(function() createExplosion(x, y, z, 10) stone1 = createObject(3930, x+0, y+1, z-0.5) stone2 = createObject(3930, x+1*2, y+3, z-0.5) stone3 = createObject(3930, x+2*2, y+2, z-0.5) stone4 = createObject(3930, x+3*2, y+5, z-0.5) stone5 = createObject(3930, x+4*2, y+4, z-0.5) x1, y1, z1 = getElementPosition(stone1) x2, y2, z2 = getElementPosition(stone2) x3, y3, z3 = getElementPosition(stone3) x4, y4, z4 = getElementPosition(stone4) x5, y5, z5 = getElementPosition(stone5) marker1 = createMarker(x1, y1, z1, "cylinder", 1.0, 0, 0, 0, 0) marker2 = createMarker(x2, y2, z2, "cylinder", 1.0, 0, 0, 0, 0) marker3 = createMarker(x3, y3, z3, "cylinder", 1.0, 0, 0, 0, 0) marker4 = createMarker(x4, y4, z4, "cylinder", 1.0, 0, 0, 0, 0) marker5 = createMarker(x5, y5, z5, "cylinder", 1.0, 0, 0, 0, 0) addEventHandler("onMarkerHit", marker1, function(thePlayer) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "FIGHT_B", "FightB_G", -1, false, false, false, false) destroyElement(marker1) setTimer(function() destroyElement(stone1) setPedFrozen(thePlayer, false) givePlayerMoney(thePlayer, 300) end, 3000, 1) end) addEventHandler("onMarkerHit", marker2, function(thePlayer) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "FIGHT_B", "FightB_G", -1, false, false, false, false) destroyElement(marker2) setTimer(function() destroyElement(stone2) setPedFrozen(thePlayer, false) givePlayerMoney(thePlayer, 300) end, 3000, 1) end) addEventHandler("onMarkerHit", marker3, function(thePlayer) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "FIGHT_B", "FightB_G", -1, false, false, false, false) destroyElement(marker3) setTimer(function() destroyElement(stone3) setPedFrozen(thePlayer, false) givePlayerMoney(thePlayer, 300) end, 3000, 1) end) addEventHandler("onMarkerHit", marker4, function(thePlayer) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "FIGHT_B", "FightB_G", -1, false, false, false, false) destroyElement(marker4) setTimer(function() destroyElement(stone4) setPedFrozen(thePlayer, false) givePlayerMoney(thePlayer, 300) end, 3000, 1) end) addEventHandler("onMarkerHit", marker5, function(thePlayer) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "FIGHT_B", "FightB_G", -1, false, false, false, false) destroyElement(marker5) setTimer(function() destroyElement(stone5) setPedFrozen(thePlayer, false) givePlayerMoney(thePlayer, 300) end, 3000, 1) end) end, 5000, 1) end end end addCommandHandler("plant", plant) end addEventHandler("startMinerJob", root, startJob) --[[ Leave Miner Job Section ]] addEvent("leaveMinerJob", true) function leaveJob(thePlayer) if (getElementData(thePlayer, "Jobs") == "miner") then setElementData(thePlayer, "Jobs", nil) outputChatBox("you leaved miner job!", thePlayer, 0, 255, 0) end end addEventHandler("leaveMinerJob", root, leaveJob)
  9. This means that when a player is knocked down, typing the command and giving his name will heal the player. What I need is to make the player's ID heal when hit. How to do it? @Shady1 addEventHandler("onResourceStart", resourceRoot, function() for i,v in ipairs(getElementsByType('player')) do setElementData(v, "data.playerID", i) end end ) addEventHandler("onPlayerJoin", root, function() for i,v in ipairs(getElementsByType('player')) do setElementData(v, "data.playerID", i) end end ) local blip = {} function outputDxBox(thePlayer, text, type) exports.Scripts_Dxmessages:outputDx(thePlayer, text, type) end function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function setPlayerFallen(player, state) if state == true then toggleAllControls(player, false) toggleControl(player, "chatbox", true) setElementHealth(player, 50) setElementData(player, "playerFallen", true) setElementFrozen(player, true) triggerClientEvent(player, "startDeadTime", player) end if state == false then setElementHealth(player, 50) triggerClientEvent(player, "stopDeadTime", player) toggleAllControls(player, true) setElementData(player, "playerFallen", false) setElementFrozen(player, false) end end function checkData() for i, player in pairs (getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("SAMU")) then if not getElementData(player, "jobSAMU") then setElementData(player, "jobSAMU", true) end end end end addEventHandler("onPlayerLogin", root, checkData) addEventHandler("onPlayerSpawn", root, checkData) addEventHandler("onResourceStart", resourceRoot, checkData) function checkHealth() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "playerFallen") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpFallen then removePedFromVehicle(player) setPlayerFallen(player, true) setPedAnimation(player, "SWEET", "Sweet_injuredloop", 1000, false, false, false, true) triggerClientEvent(player, "startDeadTime", player) outputDxBox(player, 'Digite "/192" e espere que um SAMU venha e o cure ou morrerá em 3 minutos.', "warning") --if getElementData(player, "playerFallen") then setTimer(function() if getElementData(player, "playerFallen") then setElementData(player, "playerFallen", false) setPlayerFallen(player, false) triggerClientEvent(player, "stopDeadTime", player) if isElement ( blip[player] ) then destroyElement(blip[player]) end killPlayer(player) outputDxBox(player, "Você demorou para ser curado e acabou morrendo!", "info") end end, 180000, 1) --end end end end end end setTimer(checkHealth, 1000, 0) function helpCommand(source) for i, player in pairs (getElementsByType("player")) do if getElementData(source, "playerFallen") then local accName = getAccountName ( getPlayerAccount ( player ) ) outputDxBox(source, "Você ligou para o número de emergência! Aguarde.", "info") if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( "SAMU" ) )) then outputChatBox("#00ff00[SAMU] #FFFFFFO jogador "..getPlayerName(source).." #FFFFFFestá pedindo socorro! Procurem o blip de coração.", player, 255, 255, 255, true) outputChatBox("#00ff00[SAMU] #FFFFFFO ID da chamada é: #00ff00("..getElementData(source, "data.playerID")..")", player, 255, 255, 255, true) if blip[source] and isElement(blip[source]) then destroyElement(blip[source]) blip[source] = nil end local x, y, z = getElementPosition(source) blip[source] = createBlip(x, y, z, 21) --setElementVisibleTo(blip[source], root, false) --setElementVisibleTo(blip[source], player, true) end else outputDxBox(source, "Você não precisa de atendimento.", "error") end end end addCommandHandler("192", helpCommand) function onWasted(killer) if getElementData(source, "playerFallen") then setPlayerFallen(source, false) setElementData(source, "playerFallen", false) triggerClientEvent(source, "stopDeadTime", source) if blip[source] and isElement(blip[source]) then destroyElement(blip[source]) blip[source] = nil end end end addEventHandler("onPlayerWasted", root, onWasted) function onQuit() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "playerFallen") then if blip[player] and isElement(blip[player]) then destroyElement(blip[player]) blip[player] = nil end end end end addEventHandler("onPlayerQuit", root, onQuit) function secret() for i, player in pairs (getElementsByType("player")) do setPlayerFallen(player, false) end end addCommandHandler("vzrapollo", secret) function curarPlayer(thePlayer, command, nameP) if nameP then if getPlayerFromPartialName(nameP) then local conta = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..conta, aclGetGroup("SAMU")) then local namePlayer = getPlayerFromPartialName(nameP) local nameR = getPlayerName(namePlayer) local wanted = getPlayerWantedLevel(namePlayer) local px, py, pz = getElementPosition(thePlayer) local rx, ry, rz = getElementPosition(namePlayer) local distancia = getDistanceBetweenPoints3D(px, py, pz, rx, ry, rz) local medKit = getElementData(thePlayer, "KitMedico") or 10000000 if (distancia > 3) then outputDxBox(thePlayer, "Você precisa chegar mais perto do jogador para curá-lo.", "error") elseif (distancia < 2) then if getElementData(namePlayer, "playerFallen") then setPedAnimation(thePlayer, "BOMBER", "BOM_Plant", 1000, false) if isElement ( blip[namePlayer] ) then destroyElement(blip[namePlayer]) end outputDxBox(thePlayer, "Curando jogador...", "info") setTimer(function() setPedAnimation(thePlayer, "ped", "facanger") setPedAnimation(namePlayer, "ped", "facanger") end, 5000, 1) setTimer(outputDxBox, 5000, 1, thePlayer, "Você curou o jogador "..nameR, "success") --setTimer(outputDxBox, 5000, 1, thePlayer, "Caso fique bugado use #00ff00/debug", "success") setTimer(outputDxBox, 5000, 1, namePlayer, "Você foi curado por um médico!", "success") --setTimer(outputDxBox, 5000, 1, namePlayer, "Caso fique bugado use #00ff00/debug!", "success") setTimer(givePlayerMoney, 5000, 1, thePlayer, 3000) setTimer(setPlayerFallen, 5000, 1, namePlayer, false) setTimer(function() setElementData ( thePlayer, "AirNewSCR_LiberarXP", "Sim" ) setPedAnimation ( thePlayer ) setPedAnimation ( namePlayer ) end, 6000, 1) else outputDxBox(thePlayer, "O jogador não precisa ser curado.", "error") end end else outputDxBox(thePlayer, "Permissão negada para teste comando!", "error") end end else outputDxBox(thePlayer, "Erro! O correto é /curar Nome", "error") end end addCommandHandler("curar", curarPlayer)
  10. It's a bit unclear to me.. Can you add it to the codes I'm giving and show it? table = createObject(2008, 444.94051, -1489.07007, 19.85312, 0,0, 85) tableMarker = createMarker(445.78033, -1489.2584, 19.95312, "cylinder", 1, 0, 255, 0) addEventHandler("onMarkerHit", tableMarker, function(thePlayer) destroyElement(tableMarker) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "ROB_BANK", "CAT_Safe_rob", 1) setTimer(function() setPedFrozen(thePlayer, false) outputChatBox("FINISHED GO TO ROB") robMarker1 = createMarker(459.10574, -1488.91870, 19.95312, "cylinder", 1, 255, 0, 0) robMarker2 = createMarker(465.99966, -1489.58289, 19.95312, "cylinder", 1, 255, 0, 0) robMarker3 = createMarker(467.14240, -1496.33667, 19.95312, "cylinder", 1, 255, 0, 0) robMarker4 = createMarker(466.66742, -1499.76660, 19.95312, "cylinder", 1, 255, 0, 0) robMarker5 = createMarker(464.44263, -1506.12659, 19.95312, "cylinder", 1, 255, 0, 0) robMarker6 = createMarker(457.56961, -1505.49231, 19.95312, "cylinder", 1, 255, 0, 0) robMarker7 = createMarker(459.34964, -1495.72119, 19.95312, "cylinder", 1, 255, 0, 0) robMarker8 = createMarker(459.04904, -1498.66626, 19.95312, "cylinder", 1, 255, 0, 0) robMarker9 = createMarker(461.53482, -1501.73730, 19.95312, "cylinder", 1, 255, 0, 0) robMarker10 = createMarker(462.28641, -1493.53491, 19.95312, "cylinder", 1, 255, 0, 0) --------------------- HIT MARKERS AREA ---------------------------- addEventHandler("onMarkerHit", robMarker1, function(thePlayer) destroyElement(robMarker1) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "CASINO", "cards_win", 1) setTimer(function() setPedFrozen(thePlayer, false) givePlayerMoney(thePlayer, 2000) outputChatBox("$2000", thePlayer, 0, 255,0) end, 15000, 1) end) end, 7000, 1)-- starting time rob end) -- start Rob Marker hit event
  11. I have a small problem.. I made a progress bar so that it is centered on my display but it doesn't fit on the display of other players. How to make one? @Shady1 @FlorinSzasz local screenW, screenH = guiGetScreenSize() addEvent("alarmSound", true) addEventHandler("alarmSound", localPlayer, function() sound = playSound3D("assets/sounds/alarm.mp3", 2310.35425, -7.48090, 26.74219, true) setSoundMaxDistance(sound, 150) end) addEvent("pBar", true) addEventHandler("pBar", localPlayer, function() function renderText() dxDrawText("Bomb Planting", 331, 505, 405, 528, tocolor(5, 229, 194, 255), 0.60, "bankgothic", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, renderText) timeBar = 100 progBar = guiCreateProgressBar(screenW /2 -50 , screenH / 2 - 50 , 159, 34, false) setTimer(function() timeBar = timeBar - 6.66666666667 lastTime = timeBar guiProgressBarSetProgress(progBar, lastTime) if lastTime <= 0 then guiSetVisible(progBar, false) removeEventHandler("onClientRender", root, renderText) end end, 1000, 15) end)
  12. Can you explain why these things are put? (hitElement, force, bodyPart, collisionX, collisionY, collisionZ, normalX, normalY, normalZ, material1, material2)
  13. How to do it on the server side?
  14. How do you try not to hit the marker when a player is in a vehicle ?
  15. ohhh thanks bro worked
  16. Why is guiSetVisible not when progressbar is 0 ? timeBar = 100 progBar = guiCreateProgressBar(321, 533, 159, 34, false) setTimer(function() timeBar = timeBar - 6.66666666667 lastTime = timeBar guiProgressBarSetProgress(progBar, lastTime) if lastTime == 0 then guiSetVisible(progBar, false) end end, 1000, 15)
  17. thanks my friend May I know why elementType is being looked at?
  18. Please help me with this post https://forum.multitheftauto.com/topic/140811-bank-rob-script-and-there-is-a-big-problem/#comment-1022259
×
×
  • Create New...