Jump to content

Destroyer.-

Members
  • Posts

    103
  • Joined

  • Last visited

Everything posted by Destroyer.-

  1. Hola, tengo una duda con el time jail, bueno yo lo andaba haciendo con Timer, pero no se me ocurre como guardarlo, osea como guardo un timer si lo tengo que destruir al desconectarme del servidor, un ejemplo o almenos las funciones me bastan, gracias
  2. Hola, tengo un problema con la instalacion de Debian 7,lo contrate por hostinger y me deja cambiar el sistema operativo, pero cuando quiero cargar los resources no puedo me aparece, en la parte de poner tar -xf baseconfig-1.5.1.tar.gz mv baseconfig/* multitheftauto_linux-1.5.1/mods/deathmatch no me aparece nada al poner y cuando quiero testearlo me aparece esto [19:16:04] ERROR: Couldn't find resource admin. Check it exists. [19:16:04] ERROR: Couldn't find resource defaultstats. Check it exists. [19:16:04] ERROR: Couldn't find resource helpmanager. Check it exists. [19:16:04] ERROR: Couldn't find resource joinquit. Check it exists. [19:16:04] ERROR: Couldn't find resource mapcycler. Check it exists. [19:16:04] ERROR: Couldn't find resource mapmanager. Check it exists. [19:16:04] ERROR: Couldn't find resource parachute. Check it exists. [19:16:04] ERROR: Couldn't find resource performancebrowser. Check it exists. [19:16:04] ERROR: Couldn't find resource reload. Check it exists. [19:16:04] ERROR: Couldn't find resource resourcebrowser. Check it exists. [19:16:04] ERROR: Couldn't find resource resourcemanager. Check it exists. [19:16:04] ERROR: Couldn't find resource scoreboard. Check it exists. [19:16:04] ERROR: Couldn't find resource spawnmanager. Check it exists. [19:16:04] ERROR: Couldn't find resource voice. Check it exists. [19:16:04] ERROR: Couldn't find resource votemanager. Check it exists. [19:16:04] ERROR: Couldn't find resource webadmin. Check it exists. [19:16:04] ERROR: Couldn't find resource play. Check it exists. [19:16:04] Server started and is ready to accept connections! [19:16:04] To stop the server, type 'shutdown' or press Ctrl-C [19:16:04] Type 'help' for a list of commands. No entiendo mucho como lo debo instalar espero me puedan ayudar gracias
  3. Si pero lacosa es como los paso ya que en server no puedo usar guiSetText function gui() guiSetText ( GUIEditor.label[5], "Horas: ".. ) end
  4. Hola tengo una duda con esta funcion getPlayerAccount que no puedo usarla en client y estoy haciendo una gui donde muestro los Kills And deaths, uso setAccountData para guardarlos, y lo que queria saber es como podria mostrar en la gui los kills y deaths si no puedo tomar la cuenta del jugador? Gracias
  5. No me funciono no aparece ningun avion, igual lo que yo busco es que aparescan los aviones pero que no deje spawnearlos
  6. Hola, tengo una duda estoy haciendo un piloto que vaya desbloqueando por cada nivel un nuevo avion, la cosa es que nose como hacerlo que desde una tabla me tome los niveles (tercer argumento de la tabla ) creo que con un for pero no estoy seguro client ----Client Side------ Window2 = guiCreateWindow ( 0.2, 0.2, 0.25, 0.5, "Spawn Medico", true ) buttonmev = guiCreateButton ( 0.5, 0.8, 0.45, 0.15, "Close", true, Window2 ) button2 = guiCreateButton ( 0.01, 0.8, 0.45, 0.15, "Spawn", true, Window2 ) label2 = guiCreateLabel ( 0.1, 0.1, 0.9, 0.1, "Elige el Vehiculo", true, Window2 ) showCursor(false) guiSetVisible( Window2, false ) guiWindowSetSizable( Window2, false ) vehicles2 = { {"Dodo LVL 0", 593, 0}, {"Stuntplane LVL 40", 513, 40}, {"Beagle LVL 100", 511, 100}, {"Nevada LVL 150", 553, 150}, {"Andromeda LVL 200", 592, 200}, {"Shamal LVL 300", 519, 300}, } grid = guiCreateGridList(0.01, 0.2, 0.99, 0.5, true, Window2) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles2) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function useMec() nivel = tonumber((getElementData(source,"nivelp") or 1)) local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("vehiclepiloto", localPlayer, model) guiSetVisible(Window2,false) showCursor(false) end end end addEventHandler("onClientGUIClick", button2, useMec, false) Server function spawnVehPiloto(id) local x, y, z = getElementPosition(source) if isElement(vehicles2[source]) then destroyElement(vehicles2[source]) end vehicles2[source] = createVehicle(id, x + 2, y, z) warpPedIntoVehicle(source, vehicles2[source]) end addEvent("vehiclepiloto",true) addEventHandler("vehiclepiloto", root, spawnVehPiloto) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles2[source]) then destroyElement(vehicles2[source]) vehicles2[source] = nil end end) Gracias
  7. Hola, queria pedir ayuda sobre un guardado de skin es que cuando lo guardo si se guarda, pero si cojo otro skin (sin guardar) y me desconecto se me bugea y desaparece, no tira nada en debugscript solo tira cuando intento "cargar" el skin function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "money") if (accountData) then local lastmodel = getAccountData (theCurrentAccount, "lastSkin") end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local model = tonumber(getElementData(source, "model") or 0) setAccountData(account,"lastSkin",model) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) --y aca hice ésto justamente para testear function testing() local acc = getPlayerAccount(source) local data = getAccountData(acc,"lastSkin") setElementModel(source,data) end addCommandHandler("skin",testing) function testing1(player) setElementData(player, "model", getElementModel(player)) outputChatBox("Skin Guardado Exitosamente.", player, 255, 20, 20, true) end addCommandHandler("skins",testing1) Como dije, me tira error al desconectarme con otro skin que no sea el guardado y entrar y poner /skin, espero me puedan ayudar :c Bad Argument @ ´setElementModel´ [Expected number at argument 2, got boolean]
  8. De que me sirve si pero lo que intento hacer es por cada segundo , osea que la barra suba hasta el 100%, no seteandole de a poco e.e
  9. Hola quisiera saber como hacer una progressbar , en este script , estoy intentando pero nose como hacerlo por cada frame Client: function primergolpe(hitElement) vehiculo = getPedOccupiedVehicle (hitElement) if not vehiculo then return end if hitElement == localPlayer and getElementModel(vehiculo) == 418 then for i,v in ipairs (getElementsByType("marker")) do if getElementData(v,"markerJob") == true then destroyElement(v) end end outputChatBox("Muy bien ahora vuelve para dejar las armas a tu colega",255,20,20) progressBar = guiCreateProgressBar( 0.8, 0.8, 0.1, 0.1, true, nil ) segundo = createMarker (1453.9360351563,-1458.3642578125,12.362445831299,"cylinder", 1.0,0,255,0,150) setElementData(segundo,"markerJob",true) addEventHandler( "onClientMarkerHit", segundo, segundogolpe ) end end function segundogolpe(hitElement, matchingDimension) if hitElement == localPlayer and getElementModel(vehiculo) == 418 then for i,v in ipairs (getElementsByType("marker")) do if getElementData(v,"markerJob") == true then destroyElement(v) end end outputChatBox("Muy buen trabajo!, ahora habla de nuevo con el Dealer para hacerlo devuelta",255,20,20) triggerServerEvent("dinero",localPlayer) end end function cancelPedDamage() cancelEvent() -- Cancels the onClientPedDamage event end addEventHandler("onClientPedDamage", thePed, cancelPedDamage) Gracias
  10. mm masomenos , osea no puedo poner un interior igual al otro? es que son muchos ammunations 2 ls, 3 lv y 2 sfs como podria hacer ?
  11. El problema es que cuando es que cuando voy al ammu de LV y salgo aparesco en el exit de LS que seria exitdoor y tendria que salir en "salir", y quiero q salga en lv , no se si ahora me explique bien
  12. la cosa es que yo quiero q anden los 2 markers , ya quees para un ammunation y quiero q aparesca en LS,Lv,Etc
  13. HOla, tengo un problema con un ammunation cuand oentro a unos interiores, pasa esto Cuando entro entro en el marker el salir y el exitdoor se bugean y siempre 1 no funciona , espero q me puedan ayudar local salir = createMarker(286, -42, 1002.5, "arrow", 1.5, 255, 255, 0, 255 ) setElementInterior( salir, 1, 285, -41, 1001) function saliendo( player ) if (source == salir) then if getElementType(player) == "player" then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer ( setElementPosition, 1000, 1, player, 1317.2287597656,-1150.9138183594,23.65625 ) setTimer ( setElementInterior, 1000, 1, player, 0 , 1317.2287597656,-1150.9138183594,23.65625) toggleControl ( player, "fire", true ) end end end addEventHandler ("onMarkerHit", getRootElement() ,saliendo ) local entrar = createMarker( 2159.2709960938,943.25811767578,11.65, "arrow", 1.5, 255, 255, 0, 255 ) function lol( player ) if (source == entrar) then if getElementType(player) == "player" then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer(setElementPosition, 1000, 1, player, 285, -40, 1001) setTimer ( setElementInterior, 1000, 1, player, 1, 285, -40, 1001 ) toggleControl ( player, "fire", false ) end end end addEventHandler ("onMarkerHit", getRootElement(), lol ) local Exitdoor = createMarker( 286, -42, 1002.5, "arrow", 1.5, 255, 255, 0, 255 ) setElementInterior( Exitdoor, 1, 285, -41, 1001 ) function Exitd( player ) if (source == Exitdoor) then if getElementType(player) == "player" then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer ( setElementPosition, 1000, 1, player, 1367, -1279, 13 ) setTimer ( setElementInterior, 1000, 1, player, 0, 1367, -1279, 13 ) toggleControl ( player, "fire", true ) end end end addEventHandler ("onMarkerHit", getRootElement() ,Exitd ) local Doorentry = createMarker(1369, -1279, 14.5, "arrow", 1.5, 255, 255, 0, 255 ) function Doore( player ) if (source == Doorentry) then if getElementType(player) == "player" then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer(setElementPosition, 1000, 1, player, 285, -40, 1001) setTimer ( setElementInterior, 1000, 1, player, 1, 285, -40, 1001 ) toggleControl ( player, "fire", false ) end end end addEventHandler ("onMarkerHit", getRootElement(), Doore ) gracias
  14. Es necesario pasarte el client? ya que son solo guis
  15. Hola, tengo 2 dudas es que estaba modificando un pizzajob y estoy intentando hacer que cada 100 niveles aumente $500 pero no se me ocurre nada y tambien queria saber como poner la ocupacion con el nivel cuando tomo el job , aqui dejo el code function teamSet ( ) local team = getTeamFromName ( "Civiles" ) local level = getPlayerWantedLevel ( source ) -- get the wanted level of the player if team and level == 0 then setPlayerTeam ( source, team ) setPlayerNametagColor ( source, 255, 255, 0 ) setElementModel(source, 155) setElementData( source, "Ocupacion", "Pizza Boy ", true ) outputChatBox("[EMPLEO]Ahora sos PizzaBoy", source,255,255,0) else cancelEvent() outputChatBox("[EMPLEO]Tenes Estrellas", source,255,255,0) end end addEvent ( "sTeame", true) addEventHandler ( "sTeame", root, teamSet ) function dinero( ) getPoints = tonumber((getElementData(source,"PZ") or 0)) plata = 2500 givePlayerMoney ( source, plata + (getPoints * 2 * 1.2) ) triggerClientEvent(source,"message:centerText",source,"Mision Completada \n+$"..plata + (getPoints * 2 * 1.2) , 25, 255, 255, 0) setElementData(source, "PZ", getPoints + 100 ) outputChatBox("Sos nivel"..getPoints, source,255,255,0) setElementData( source, "Ocupacion", "Pizza Boy Nivel "..getPoints, true ) end addEvent ( "dinerito", true) addEventHandler ( "dinerito", root, dinero ) Gracias
  16. Cuando 1 se baja pierden todos las misiones ,por ejemplo hay 3 jugadores , cuando estan dentro del bus , bien , pero cuando 1 sale se le destruye los blips y los markers de todos
  17. Hola a todos encontre un script de bus en la comunidad , y lo use todo pero cuando uno agarra el colectivo , y viene otro y agarra y se baja se cancela la mision aca : Servidor: local rootElement = getRootElement() local busses = {[431] = true, [437] = true} local busTable = { [1]={1823.5513916016,-1803.4302978516,13.392281532288}, [2]={1825.22791, -1635.03711, 13.38281}, [3]={1855.01685, -1430.47449, 13.39063}, [4]={1732.81580, -1296.87122, 13.44294}, [5]={1473.19226, -1295.77124, 13.48315}, [6]={1443.60376, -1498.26660, 13.37650}, [7]={1426.37280, -1716.12439, 13.38281}, [8]={1315.06909, -1656.43799, 13.38281}, [9]={1359.06250, -1432.39734, 13.38281}, [10]={1169.82983, -1392.34473, 13.41728}, [11]={930.76508, -1392.92627, 13.26561}, [12]={815.24756, -1317.91345, 13.44460}, [13]={585.04199, -1320.53748, 13.40609}, [14]={526.99365, -1624.20361, 16.63225} } function getNewBusLocation(thePlayer, ID) local x, y, z = busTable[ID][1], busTable[ID][2], busTable[ID][3] triggerClientEvent(thePlayer,"bus_set_location",thePlayer,x,y,z) end function onVehicleEnter(thePlayer) if not busses[getElementModel(source)] then return end if not getPlayerTeam(thePlayer) then return end if getTeamName(getPlayerTeam(thePlayer)) == "Civiles" then local x, y, z = getNewBusLocation(thePlayer, 1) setElementData(thePlayer,"busData",1) end end addEventHandler("onVehicleEnter",rootElement,onVehicleEnter) addEvent("bus_finish",true) addEventHandler("bus_finish",rootElement, function () if isPedInVehicle(source) then local vehicle = getPedOccupiedVehicle ( source ) if busses[getElementModel(vehicle)] then setElementFrozen ( vehicle, true ) fadeCamera(source, false, 1.-- s8) --> setTimer(fadeCamera, 3000, 1, source, true) setTimer(setElementFrozen, 3000, 1, vehicle, false) dinero = math.random(100,500) givePlayerMoney(source, dinero) outputChatBox("[iNFO]Ganaste $"..dinero, source, 0, 255, 0, true) if #busTable == tonumber(getElementData(source,"busData")) then setElementData(source,"busData",1) else setElementData(source,"busData",tonumber(getElementData(source,"busData"))+1) end test = getElementData(source,"busData") if test == 5 then outputChatBox("[iNFO]BOnus $5.000", source, 0, 255, 0, true) givePlayerMoney(source, 5000) end getNewBusLocation(source, tonumber(getElementData(source,"busData"))) end end end ) Client local client = getLocalPlayer( ) local rootElement = getRootElement() local marker = nil local blip = nil addEvent("bus_set_location",true) addEventHandler("bus_set_location",rootElement, function (x, y, z) marker = createMarker(tostring(x), tostring(y), tostring(z)-1, "checkpoint", 4.0, 0, 0, 255, 255) blip = createBlipAttachedTo( marker, 0, 3, 0, 0, 255, 255 ) addEventHandler("onClientMarkerHit",marker,onBusStopHit) end) function onBusStopHit(hitPlayer) if client == hitPlayer then triggerServerEvent("bus_finish",client) if isElement(blip) then destroyElement(blip) end if isElement(marker) then removeEventHandler("onClientMarkerHit",marker,onBusStopHit) destroyElement(marker) end end end function auto(thePlayer) if (getElementModel(source) == 431 ) and ( getElementModel (thePlayer) == 156 ) then destroyElement(marker) destroyElement(blip) end end addEventHandler("onClientVehicleExit",rootElement, auto) Gracias
  18. Utilizar la función: setTimer -- En esté caso setTimer(laFuncion, 2000, 0) -- El 0 en el 3 argumento es para que se repita la función, así el ped se teletransporta a ti cada 2 segundos Tira warning en el argumento 1, "got boolean" y no funca :C function ped ( thePlayer ) if pedxd then return end pedxd = createPed ( 120, 5540.6654, 1020.55122, 1240.545 ) local px,py,pz= getElementPosition(thePlayer) test = setElementPosition(pedxd,px+2,py,pz) setTimer(test, 2000, 0) end addCommandHandler("ped",ped)
  19. Y como lo podria hacer? Es que no se me ocurre que lo siga repitiendo
  20. Hola tengo una duda con ped, lo que pasa es que cree un ped y quiero que el ped me siga , pero no se me ocurre que cada 2 segundos aparesca en mi posicion, como lo haria? function ped ( thePlayer ) if not pedxd then pedxd = createPed ( 120, 5540.6654, 1020.55122, 1240.545 ) local px,py,pz= getElementPosition(thePlayer) setElementPosition(pedxd,px+2,py,pz) end end addCommandHandler("ped",ped) Gracias
  21. Hola , primero que todo no se si esto va aca pero cual es mejor forma de guardar , un Login Panel que qiero empezar a crear ,y estoy empezando a leer sql y me gusta , o tambien en xml, si tienen algun codigo para guiarme por favor seria mejor Tengo otra duda , se pierde datos guardando todas las cosas(posicion,dinero,armas) con SetElementData , Gracias
  22. Funciona gracias men , y solid tambien
×
×
  • Create New...