Jump to content

xXMADEXx

Members
  • Posts

    2,718
  • Joined

  • Last visited

Everything posted by xXMADEXx

  1. xXMADEXx

    SOLVED

    Try this ((not tested)): g_loc_pla = getLocalPlayer () g_loc_root = getRootElement () addEvent ( "destroyTrepassor", true ) addEventHandler ( "destroyTrepassor", g_loc_root, function () posX = 15.7054 posY = 1719.3632 posZ = 50.123 posX2 = 237.7176 posY2 = 1696.5727 posZ2 = 50.1087 posX3 = 354.6243 posY3 = 2028.3897 posZ3 = 50.1217 posX4 = 188.241 posY4 = 2081.3469 posZ4 = 50.1422 local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) rotZ = getPedRotation ( g_loc_pla ) if isInResArea == "true" then timer1 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX, posY, posZ, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer2 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX2, posY2, posZ2, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer3 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX3, posY3, posZ3, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer4 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX4, posY4, posZ4, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) end end ) addEvent ( "destroyTimers", true ) addEventHandler ( "destroyTimers", g_loc_root, function () local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) if isInResArea == "false" then if ( isTimer ( timer1 ) ) then killTimer ( timer1 ) end if ( isTimer ( timer2 ) ) then killTimer ( timer2 ) end if ( isTimer ( timer3 ) ) then killTimer ( timer3 ) end if ( isTimer ( timer4 ) ) then killTimer ( timer4 ) end end end )
  2. Not sure, but you can try changing the event in the resource, so the function is called when a ped dies and not a player.
  3. If you're willing to put the time and effort, it's definitely an idea worth bringing to reality.
  4. We're here to help you learn how to script, not give you free stuff.
  5. That... That's just not a hosting computer.. You only have 1.25 GB ram and you're running an OS off a USB stick? lol...
  6. http://lmgtfy.com/?q=thomson+tg782+router+forwarding
  7. xXMADEXx

    SOLVED

    Ready debugscript 3 and tell us the error.
  8. Check the meta.xml for the DayZ resource.
  9. Yea, you should do what Krzo said, because XML is a very bad method for saving large amounts data. Anyway, if the xml file is on the client side, then the player could easily change the data. So, even if you do decide to use XML, your server is going to get really, really laggy, but be sure to make sure the xml file is on the server side.
  10. xXMADEXx

    swf files

    No, you have to use/make a shader.
  11. Unless you server has a stable player base (probably of at least 10-15) nobody is going to give you a host.
  12. When the file dowloads, is it creating on the clients computer?
  13. It looks cool, but the background cuts off, so it doesn't cover the entire screen
  14. xXMADEXx

    Nametags

    You can try to use string.sub.
  15. DX draw functions return true and false, not GUI elements. You need to use onClientClick and and check to see if the cursor is over the text.
  16. What does debug script say?
  17. The best way to fix it is to get faster internet.
  18. Anyone who has at least basic knowledge of Lua won't make free resources.
  19. Does debugscript say anything?
  20. There was absolutely no need to bump this topic. --client TruckerMarker = createMarker ( 1765.3552246094, -2041.9224853516, 12.530760765076, "cylinder", 1.5, 100, 255, 10, 100 ) Camionero = createBlip ( 1765.3552246094, -2041.9224853516, 12.530760765076, 60, 2, 255, 0, 0, 255) GUIEditor = { button = {} } function TrabajoDeTrucker(Trucker) if ( getElementType ( Trucker ) == "player" ) and (Trucker == localPlayer) then local playerTeam = getPlayerTeam ( localPlayer ) if ( playerTeam ) then local oldTeamName = getTeamName ( playerTeam ) if ( oldTeamName ~= "Trucker" ) then TrabajoDeTrucker = guiCreateWindow(487, 114, 414, 600, "Trucker Job", false) guiWindowSetSizable(TrabajoDeTrucker, false) memo = guiCreateMemo(9, 23, 395, 183, "Welcome to Trucker Job, Select a destination and delivery the cargo Once you delivery it Win Money.", false, TrabajoDeTrucker) guiMemoSetReadOnly(memo, true) botonB = guiCreateButton(13, 220, 184, 40, "San Fierro 25000 $", false, TrabajoDeTrucker) guiSetFont(botonA, "default-bold-small") botonA = guiCreateButton(13, 270, 184, 40, "Las Venturas 20000 $", false, TrabajoDeTrucker) botonC = guiCreateButton(13, 320, 184, 40, "WhetStone 35000 $", false, TrabajoDeTrucker) botonD = guiCreateButton(13, 370, 184, 40, "Bayside 35000 $", false, TrabajoDeTrucker) cerrar = guiCreateButton(113, 527, 161, 63, "Close", false, TrabajoDeTrucker) guiSetFont(cerrar, "sa-header") showCursor (true) addEventHandler ("onClientGUIClick", botonA, botonAA, false) addEventHandler ("onClientGUIClick", botonB, botonBB, false) addEventHandler ("onClientGUIClick", botonC, botonCC, false) addEventHandler ("onClientGUIClick", botonD, botonDD, false) addEventHandler ("onClientGUIClick", cerrar, cerrarr, false) end end end end addEventHandler ("onClientMarkerHit", TruckerMarker, TrabajoDeTrucker) function botonAA(Trucker) triggerServerEvent ( "botonAA", localPlayer) guiSetVisible ( TrabajoDeTrucker, false) showCursor (false) createBlip ( 2147.8176269531, 1017.3335571289, 10.8203125, 51) Marker1 = createMarker ( 2147.8176269531, 1017.3335571289, 9.8203125, "cylinder", 4.0, 0, 0, 255, 100 ) addEventHandler ("onClientMarkerHit", Marker1, MarkerA) end function botonBB(Trucker) triggerServerEvent ( "botonBB", localPlayer) guiSetVisible ( TrabajoDeTrucker, false) showCursor (false) createBlip ( -1737.6824951172, 126.06383514404, 3.5546875, 51) end function botonCC(Trucker) triggerServerEvent ( "botonCC", localPlayer) guiSetVisible ( TrabajoDeTrucker, false) showCursor (false) end function botonDD(Trucker) triggerServerEvent ( "botonDD", localPlayer) guiSetVisible ( TrabajoDeTrucker, false) showCursor (false) end function cerrarr(Trucker) guiSetVisible ( TrabajoDeTrucker, false) showCursor (false) end function MarkerA(p) if ( p ~= localPlayer ) then return end triggerServerEvent ( "MarkerA", localPlayer) end -- server local tTeam = createTeam ( "Trucker", 237, 255, 41 ) function botonAA() setPlayerTeam ( source, tTeam ) setPlayerNametagColor ( source, 237, 255, 41 ) setElementModel ( source, 27 ) end addEvent( "botonAA", true ) addEventHandler( "botonAA", root, botonAA ) function botonBB() setPlayerTeam ( source, tTeam ) setPlayerNametagColor ( source, 237, 255, 41 ) setElementModel ( source, 27 ) end addEvent( "botonBB", true ) addEventHandler( "botonBB", root, botonBB ) function botonCC() setPlayerTeam ( source, tTeam ) setPlayerNametagColor ( source, 237, 255, 41 ) setElementModel ( source, 27 ) end addEvent( "botonCC", true ) addEventHandler( "botonCC", root, botonCC ) function botonDD() setPlayerTeam ( source, tTeam ) setPlayerNametagColor ( source, 237, 255, 41 ) setElementModel ( source, 27 ) end addEvent( "botonDD", true ) addEventHandler( "botonDD", root, botonDD ) function MarkerA() givePlayerMoney (source, 10000) end addEvent( "MarkerA", true ) addEventHandler( "MarkerA", root, MarkerA )
  21. Try this: local turfPos = { { 2133.1950683594, 633.66455078125, 0, 197.5, 92, 90 }, { 2486.5935058594, 678.20172119141, 0, 245, 133, 30 }, { 1856.2864990234, 627.07629394531, 0, 138.25, 152.75, 90 }, { 1576.8956298828, 662.84362792969, 0, 181, 120.5, 90 }, { 1577.6783447266, 943.66607666016, 0, 190, 190, 90 }, { 1383.4364013672, 909.61499023438, 0, 142, 230, 90 }, { 956.94744873047, 1011.635925293, 0, 220, 140, 90 }, { 1017.7476196289, 1203.4068603516, 0, 180, 165, 90 }, { 1017.623046875, 1383.4741210938, 0, 190, 290, 90 }, { 917.99707031253, 1623.6003417969, 0, 80, 220, 90 }, { 1017.7178955078, 1862.6740722656, 0, 140, 180, 90 }, { 912.50573730469, 1958.6761474609, 0, 90, 230, 90 }, { 1017.3455200195, 2063.38671875, 0, 150, 300, 90 }, { 1300.7644042969, 2095.5100097656, 0, 200, 140, 90 }, { 1398.1997070313, 2323.5505371094, 0, 160, 65, 90 }, { 1578.1955566406, 2284.0825195313, 0, 180, 110, 90 }, { 1237.6285400391, 2581.4663085938, 0, 450, 130, 90 }, { 1780.478515625, 2567.2121582031, 0, 130, 130, 90 }, { 1698.2750244141, 2724.494140625, 0, 200, 150, 90 }, { 2237.9494628906, 2723.7814941406, 0, 180, 110, 90 }, { 2498.6853027344, 2704.6188964844, 0, 300, 140, 90 }, { 2798.1267089844, 2303.9643554688, 0, 120, 300, 90 }, { 2557.5688476563, 2243.4963378906, 0, 100, 230, 90 }, { 2532.5830078125, 2063.4118652344, 0, 100, 150, 90 }, { 2558.1779785156, 1624.0816650391, 0, 100, 300, 90 }, { 2437.685546875, 1483.7209472656, 0, 160, 120, 90 }, { 2077.7106933594, 1203.5559082031, 0, 340, 170, 90 }, { 2082.3193359375, 979.23583984375, 0, 270, 210, 90 } } local areaPos = { { 2130, 630, 200, 100 }, { 2488.8793945313, 680.78289794922, 250, 130 }, { 1858, 623, 140, 165 }, { 1577, 663, 180, 130 }, { 1577, 943, 185, 190 }, { 1383, 909, 120, 230 }, { 956, 1011, 220, 140 }, { 1017, 1203, 180, 165 }, { 1017, 1383, 190, 290 }, { 917, 1623, 80, 220 }, { 1017, 1862, 140, 180 }, { 912, 1958, 90, 240 }, { 1017, 2063, 150, 300 }, { 1300, 2092, 200, 140 }, { 1398, 2323, 160, 65 }, { 1578, 2284, 180, 110 }, { 1237, 2581, 450, 130 }, { 1780, 2567, 130, 130 }, { 1698, 2724, 200, 150 }, { 2237, 2723, 180, 110 }, { 2498, 2704, 300, 140 }, { 2798, 2303, 120, 300 }, { 2557, 2243, 100, 230 }, { 2532, 2063, 100, 150 }, { 2558, 1624, 100, 300 }, { 2437, 1483, 160, 120 }, { 2077, 1203, 340, 170}, { 2082, 979, 270, 210 } } local turfElement = {} local turfTimer = {} checkComplete = false language = "English" -- Pon "Spanish" para español -- Put "English" for english text addEventHandler("onResourceStart", resourceRoot, function() executeSQLQuery("CREATE TABLE IF NOT EXISTS Turf_System ( Turfs TEXT, GangOwner TEXT, r INT, g INT, b INT)") local check = executeSQLQuery("SELECT * FROM Turf_System" ) if #check == 0 then for i=1,#turfPos do executeSQLQuery("INSERT INTO Turf_System(Turfs,GangOwner,r,g,b) VALUES(?,?,?,?,?)", "Turf["..tostring(i).."]", "Nadie", 0, 255, 0) end end for i,v in ipairs(turfPos) do local sqlData = executeSQLQuery("SELECT * FROM Turf_System WHERE Turfs=?", "Turf["..tostring(i).."]") local turfCol = createColCuboid(unpack(v)) setElementData(turfCol, "getTurfGang", sqlData[1].GangOwner) local arg1,arg2,arg3,arg4 = unpack(areaPos[i]) local turfArea = createRadarArea(arg1, arg2, arg3, arg4, sqlData[1].r, sqlData[1].g, sqlData[1].b, 175) turfElement[turfCol] = {turfCol, turfArea, i} end if language == "Spanish" then outputDebugString("Sistema de turf by Sasuke* ha iniciado correctamente!") else outputDebugString("Turf System by Sasuke* was started correctly!") end end ) function radar ( player ) if ( not turfElement[source] ) then return outputDebugString ( "Expected 'turfElement[source]', returned "..tostring(turfElement[source])) end local turf,area,id = unpack(turfElement[source]) if turf and area and source == turf then local playerGang = getElementData ( player, "gang" ) local turfGang = executeSQLQuery("SELECT GangOwner FROM Turf_System WHERE Turfs=?", "Turf["..tostring(id).."]" ) if ( turfGang[1].GangOwner == playerGang ) then if language == "Spanish" then outputChatBox("Este territorio ya pertenece a "..turfGang[1].GangOwner or "Nadie", player, 0, 255, 0, false) else outputChatBox("This territory already belongs to "..turfGang[1].GangOwner or "None", player, 0, 255, 0, false) end else if not getPlayerTeam(player) then return end local team = getPlayerTeam ( player ) if ( getTeamName( team ) == "Criminal" ) then local playerGang = exports [ "groupsys" ]:getPlayerGroup ( player ) if ( isTimer ( turfTimer[source] ) ) then return end if ( playerGang ) then local r, g, b = unpack ( exports [ "groupsys" ]:getGroupChatColor ( playerGang ) ) setRadarAreaFlashing ( area, true ) if turfGang[1].GangOwner ~= "Nadie" then if language == "Spanish" then outputChatBox("Entraste En La Zona De Turf de "..turfGang[1].GangOwner..". Espera 2 Minutos Para Poder Conquistar El Turf Y Ganar 4k", player, 0, 255, 0, false) else outputChatBox("You enter into de "..turfGang[1].GangOwner.."'s turf zone. Wait 2 minutes to capture the turf and win 4k", player, 0, 255, 0, false) end else if language == "Spanish" then outputChatBox("Este Turf Aun No Pertenese A Nadie. Espera 2 Minutos Para Poder Conquistar El Turf Y Ganar 4k", player, 0, 255, 0, false) else outputChatBox("This turf do not belong to anyone. Wait 2 minutes to capture the turf and win 4k", player, 0, 255, 0, false) end end turfTimer[source] = setTimer ( function ( ) local beachTurfCplayers = getElementColShape ( turf ) local players = getElementsWithinColShape ( turf, "player" ) setRadarAreaColor ( area, tonumber(r), tonumber(g), tonumber(b), 175 ) for _, player in ipairs ( players ) do if getElementData(player, "gang") == playerGang then if language == "Spanish" then outputChatBox("Felicidades Conquistaste El Turf +4K!", player, 0, 255, 0, false) else outputChatBox("Congratulations. You capture the turf. +4K!", player, 0, 255, 0, false) end triggerClientEvent("onTakeTurf", player) givePlayerMoney ( player, 4000 ) executeSQLQuery("UPDATE Turf_System SET GangOwner=?,r=?,g=?,b=? WHERE Turfs=?", playerGang, tonumber(r), tonumber(g), tonumber(b), "Turf["..tostring(id).."]" ) -- setElementData ( turf, "getTurfGang", playerGang ) end end setRadarAreaFlashing ( area, false ) end ,120000, 1) -- 120000 end end end end end addEventHandler ( "onColShapeHit", root, radar )
  22. xXMADEXx

    Minor Bug

    Are there any debug errors?
  23. Try this Dashboard = { rankings = { labels = { "Kills", "Deaths", "Headshots", "PlayTime", "EXP", "Level", "Rank", }, } } function onResourseStart() set("Labels", toJSON ( Dashboard.rankings.labels ) ) setTimer(CheckLabels, 1000,0) end onResourseStart() function CheckLabels() LabelTable = fromJSON ( get ( "Labels" ) ) outputChatBox ( "LabelTable Type -> "..type ( LabelTable ) ) outputChatBox ( "LabelTable Value -> "..tostring ( LabelTable ) ) Dashboard.rankings.labels = {} --for i=1, #LabelTable do -> You can't use the "#" operator, since the index's aren't numeric values for i, v in pairs ( LabelTable ) do Dashboard.rankings.labels[i] = v end for c,v in ipairs(getElementsByType("player")) do triggerClientEvent(c,"UpdateLocalLabels",resourceRoot, Dashboard.rankings.labels) end end and reply what it's outputting.
×
×
  • Create New...