Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTX

  1. dxCreateShader only preloads shader... It doesn't actually create it. You must apply that shader to world to make it work. Remove engineApplyShaderToWorldTexture function from onClientResourceStart event and it will not start.
  2. Nope if you don't apply it. (Therefore don't use engineApplyShaderToWorldTexture when resource starts)
  3. Wiki explains everything. bool triggerClientEvent ( [table/element sendTo=getRootElement()], string name, element sourceElement, [arguments...] )
  4. It should work or you gave me wrong script.
  5. function toggleWaterShaderByManager ( enabled ) if enabled then waterTimer = setTimer ( checkWaterColor, 1000, 0 ) engineApplyShaderToWorldTexture ( myShader, "waterclear256" ) else killTimer ( waterTimer ) engineRemoveShaderFromWorldTexture ( myShader, "waterclear256" ) end end
  6. datatype must be data type, i.e TEXT.
  7. dxDrawImage(x * 0.4148, y * 0.2627, x * 0.0227, y * 0.0137, flag, tocolor(213, 0, 0, 255), false)
  8. I'm not a magician, I need more details; debugscript, what exactly is not working...? Is this your full code?
  9. Well, if you want to disable it, simply execute function: toggleWaterShader() When resource starts.
  10. Yeah, it won't add 2 columns with same name obviously.
  11. This ain't a request forum. Try make script yourself.
  12. ALTER TABLE table_name ADD column_name datatype
  13. local player = getLocalPlayer() local sx, sy = guiGetScreenSize() local px, py = 1360,768 local x, y = (sx/px), (sy/py) local fpsTick = getTickCount() local fps = 1 local players = getElementsByType( "player" ) function drawScoreboardGUI( ) dxDrawRectangle(x*285, y*125, x*800, y*19, tocolor(50, 150, 210, 220), true) dxDrawRectangle(x*285, y*143, x*800, y*350, tocolor(0, 0, 0, 220), true) dxDrawRectangle(x*285, y*145, x*150, y*19, rectanglecchanger1, true) dxDrawRectangle(x*450, y*145, x*150, y*19, rectanglecchanger2, true) dxDrawRectangle(x*615, y*145, x*150, y*19, rectanglecchanger3, true) dxDrawRectangle(x*780, y*145, x*150, y*19, rectanglecchanger4, true) dxDrawRectangle(x*945, y*145, x*140, y*19, rectanglecchanger5, true) dxDrawText("Victorious Ace 1.0", x*520, y*(-55), x*852, y*326, tocolor(0, 0, 0, 255), x*2, "default-bold", "center", "center", false, false, true, false, false) dxDrawText("Deathmatch", x*(-125), y*(-15), x*852, y*326, tocolor(0, 0, 0, 255), x*1, "default-bold", "center", "center", false, false, true, false, false) dxDrawText("Destruction Derby", x*200, y*(-15), x*852, y*326, tocolor(0, 0, 0, 255), x*1, "default-bold", "center", "center", false, false, true, false, false) dxDrawText("Shooter", x*525, y*(-15), x*852, y*326, tocolor(0, 0, 0, 255), x*1, "default-bold", "center", "center", false, false, true, false, false) dxDrawText("Hunter", x*860, y*(-15), x*852, y*326, tocolor(0, 0, 0, 255), x*1, "default-bold", "center", "center", false, false, true, false, false) dxDrawText("Race", x*1175, y*(-15), x*852, y*326, tocolor(0, 0, 0, 255), x*1, "default-bold", "center", "center", false, false, true, false, false) for i, player in ipairs(getElementsByType("player")) do local country = exports.admin:getPlayerCountry(player) local flag = country and ":admin/client/images/flags/"..country..".png" name = getPlayerName(player) dxDrawRectangle(x*285, y*170, x*800, y*19, tocolor(50, 150, 210, 220), true) --Nombre dxDrawText("Name", x*175, y*35, x*852, y*326, tocolor(0, 0, 0, 255), x*1, "default-bold", "center", "center", false, false, true, false, false) dxDrawRectangle(x*410, y*195, x*635, y*19, tocolor(175, 175, 175, 220), true) dxDrawText(name, x*175, y*85, x*852, y*326, tocolor(0, 0, 0, 255), x*1, "default-bold", "center", "center", false, false, true, true, false) --Pais dxDrawImage(flag, x * 0.4148, y * 0.2627, x * 0.0227, y * 0.0137, tocolor(213, 0, 0, 255), false) end for k,player in ipairs(getElementsByType("player")) do cuenta = k end dxDrawText("Players:"..cuenta.."/50", x*1130, y*(-55), x*852, y*326, tocolor(0, 0, 0, 255), x*1.5, "default-bold", "center", "center", false, false, true, false, false) end
  14. onMarkerHit if source == amb then triggerClientEvent(...) end
  15. This script is most likely stolen if not getElementData(localPlayer,"16091976AntiStealScriptbyShimu01022009") then return end Where's this?
  16. GTX

    vehcile spawm

    Show me your meta.
  17. He gave you an example and you didn't even look at it? This is not a request forum. https://wiki.multitheftauto.com/wiki/CallRemote Scroll down to example #2, it's ALL explained there.
  18. Parameter "source" in onMarkerHit event returns marker, not player. The hitElement argument is correct, do not change it. This should return no warnings & I cleaned up code a bit for you. local markers = { createMarker(1177, -1323, 13, "cylinder", 1.5, 255, 0, 0, 225, getRootElement()), createMarker(-2651.3, 626.7, 13.5, "cylinder", 1.5, 255, 0, 0, 225, getRootElement()), createMarker(1608, 1821, 9.5, "cylinder", 1.5, 255, 0, 0, 225, getRootElement()) } myblip1 = createBlip(1177, -1323, 329.48090, 22) -- LOS SANTOS setBlipVisibleDistance(myblip1, 1500) myblip2 = createBlip(-2651.3, 626.7, 329.48090, 22) -- SF setBlipVisibleDistance(myblip2, 1500 ) myblip3 = createBlip(1608, 1821, 329.48090, 22) -- LV setBlipVisibleDistance(myblip3, 1500) function health(hitElement, matchingDimension) for i=1, #markers do if source == markers[i] then if getElementType(hitElement) == "player" then if isPedInVehicle(hitElement) then outputChatBox("You are in a vehicle", hitElement, 0 ,255, 0) else local ph = getElementHealth(hitElement) local ap = getPedArmor(hitElement) if ap < 100 then setPedArmor(hitElement, 100) takePlayerMoney(hitElement, 250) outputChatBox("You have set your armor to 100 for 250$.", hitElement, 0 ,255, 0) end if ph < 100 then outputChatBox("You have set your health to 100 for 250$.", hitElement, 0, 255, 0) setElementHealth(hitElement, 100) setPedArmor(hitElement, 100) takePlayerMoney(hitElement, 250) end end end break end end end addEventHandler("onMarkerHit", root, health)
  19. GTX

    vehcile spawm

    It does. I tested it. Put it server side.
  20. I don't understand you. The point is, you can't setElementData to timer. Put it in table. It's same as element data. -- Example of what you can do. local timers = {} timer = setTimer(function() end, 500, 1) timers[timer] = true -- Add another timer timers[setTimer(function() end, 500, 1)] = true for i, v in pairs(timers) do if isTimer(i) and v == true then killTimer(i) end end
  21. GTX

    vehcile spawm

    Put your ID of vehicle.
  22. Just because I'm a kind person. radius = 14 explosionType = 10 timerSeconds = 3000 showTheCredits = function(l_1_0) outputChatBox("Meteor-Rain script was created by Seers!", l_1_0, 200, 200, 30, true) end addCommandHandler("meteor", showTheCredits) rainOnAllPlayers = function() for l_2_3,l_2_4 in ipairs(getElementsByType("player")) do fallMeteo(l_2_4) end end CheckTheFallingRocks = function() for l_3_3,l_3_4 in ipairs(getElementsByType("vehicle")) do if getElementModel(l_3_4) == 564 and getElementData(l_3_4, "meteor") == 1 and getElementData(l_3_4, "exploded") == 0 then new1 = getElementData(l_3_4, "z-koord") + 3 if new1 <= getElementData(l_3_4, "z-koord") then createExplosion(x, y, z, explosionType, nil) setElementData(l_3_4, "exploded", 1) theFallingRock = getElementData(l_3_4, "attachedRock") setTimer(destroyElement, 5000, 1, theFallingRock) end end end end setTimer(CheckTheFallingRocks, 50, 0) thisResourceStarts = function() if tonumber(get("secondsWhenTheNextStoneFalls")) and tonumber(get("secondsWhenTheNextStoneFalls")) >= 1 then timerSeconds = tonumber(get("secondsWhenTheNextStoneFalls")) * 1000 else outputDebugString("Invalid seconds number in settings. Please check meta.xml") timerSeconds = 3000 end if tonumber(get("fallRadius")) and tonumber(get("fallRadius")) >= 0 then radius = tonumber(get("fallRadius")) else radius = 14 outputDebugString("Invalid fall radius in settings. Please check meta.xml") end setTimer(rainOnAllPlayers, timerSeconds, 0) end addEventHandler("onResourceStart", resourceRoot, thisResourceStarts) fallMeteo = function(l_5_0) if getElementInterior(l_5_0) == 0 and getElementDimension(l_5_0) == 0 and getElementHealth(l_5_0) >= 1 then x, y, z = getElementPosition(l_5_0) x1 = x - radius x2 = x + radius y1 = y - radius y2 = y + radius x = math.random(x1, x2) y = math.random(y1, y2) theMeteo = createVehicle(564, x, y, z + 60, 30, 30, 30) setElementData(theMeteo, "meteor", 1) setElementData(theMeteo, "z-koord", z) setElementAlpha(theMeteo, 0) setElementHealth(theMeteo, 240) setVehicleDamageProof(theMeteo, true) theRock = createObject(3930, 0, 0, 0) setElementData(theMeteo, "attachedRock", theRock) attachElements(theRock, theMeteo, 0, 0, 0) if isPedInVehicle(l_5_0) then vx, vy, vz = getElementVelocity(getPedOccupiedVehicle(l_5_0)) setElementVelocity(theMeteo, vx, vy, -5) end end end displayVehicleLoss = function(l_6_0) if getElementModel(source) == 564 and getElementData(source, "meteor") == 1 and getElementData(source, "exploded") == 0 then x, y, z = getElementPosition(source) createExplosion(x, y, z, explosionType, nil) setElementData(source, "exploded", 1) theFallingRock = getElementData(source, "attachedRock") setTimer(destroyElement, 5000, 1, theFallingRock) end end addEventHandler("onVehicleDamage", getRootElement(), displayVehicleLoss)
  23. viewtopic.php?f=91&t=90807 - Your topic. I gave you the answer, although I don't provide support to stolen scripts. I guess I won't from now on. viewtopic.php?f=91&t=47897 - Read this before posting. No one will help you, since you don't even provide the source code. Creating new topics won't help you. Go somewhere else, because this is not a request forum. Especially when it comes to stolen code.
  24. GTX

    Checking Player

    Then I don't know, because I don't understand you. Maybe someone else will help you.
×
×
  • Create New...