Jump to content

DarkAruna97

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by DarkAruna97

  1. Hola queria saber como puedo hacer para solucionar un bug en este scripts porque al colocar la cantidad de slots a comprar funciona bien cuesta $5000 money pero al colocar -1 slots negativos el servidor te regala o entrega $5000 money por slots alguna solucion para solucionar ese bug para que no entregue cash al colocar slots negativos y salga "No puedes comprar slots menor a (1)" function buyslots( number ) local account = source:getAccount ( ) if not account:isGuest ( ) then local moneytotal = tonumber( number ) * 5000 if getPlayerMoney( source ) >= moneytotal then local mygang = getPlayerGroup(source) if mygang then addGroupSlots( mygang, number ) outputChatBox("Has comprado: "..number.." slots para tu grupo",source,0,200,0,true) source:takeMoney ( moneytotal ) addActionReg( source, "Buy "..number.." slots to group: "..mygang) end else outputChatBox("No tienes dinero suficiente para comprar esa cantidad de slots",source,200,0,0,true) end end end addEvent("buyslotsforgroup",true) addEventHandler("buyslotsforgroup",ELEMENTOGLOBAL,buyslots)
  2. Hola si quisiera saber cuantos nucleos, memoria ram y disco rigido necesito para correr un servidor de mta dayz. Con una cantidad de 50 slots para que no halla lag? Alguien me ayuda que vps corresponde
  3. Hola busco algún host que tenga metodo de pago de Cuenta Digital o Dinero Mail para Argentina, Que no sea BBhosting porque tube un hosting en esa empresa y anda lag.
  4. Debe ser ese el problema, agrega un "or" a la variable needengine para solucionarlo. En donde le coloco el "or" local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then local maxfuel = getElementData(veh, "maxfuel") local fuel = getElementData(getElementData(veh, "parent"), "fuel") local needengine = getElementData(veh, "needengines") local needtires = getElementData(veh, "needtires") local needparts = getElementData(veh, "needparts") local engine = getElementData(getElementData(veh, "parent"), "Engine_inVehicle") or 0 local tires = getElementData(getElementData(veh, "parent"), "Tire_inVehicle") or 0 local parts = getElementData(getElementData(veh, "parent"), "Parts_inVehicle") or 0 local offset = dxGetFontHeight(1.02, "default-bold") local w = dxGetTextWidth(engine .. "/" .. needengine .. " Engine", 1.02, "default-bold") if engine == needengine then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(engine .. "/" .. needengine .. " Engine", screenWidth * 0.5 - w / 2, screenHeight * 0, screenWidth * 0.5 - w / 2, screenHeight * 0, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(tires .. "/" .. needtires .. " Tires", 1.02, "default-bold") if tires == needtires then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tires .. "/" .. needtires .. " Tires", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(parts .. "/" .. needparts .. " Tank Parts", 1.02, "default-bold") if parts == needparts then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end
  5. Hola a todos, Quisiera saber donde esta la falla en la linea 1248 como me señala el Debugscript 3
  6. No se empeze a hacer cosas
  7. Como podria arreglar este script por favor ayudemen ya casi esta listo gracias a Tomas function onPlayerWasted(_,killer,weapon) namekiller = getPlayerName(killer) namemuerto = getPlayerName(source) weaponn = tostring(weapon) triggerClientEvent("onRollMessageStart", getRootElement(), (namekiller.." mato a: "..namemuerto.." con " tostring.., 255, 0, 0) end addEventHandler("onPlayerWasted",getRootElement(),onPlayerWasted)
  8. Debería funcionar, pero... ¿ no quedaría un poco estúpido que diga [VIP-Pedro] Usted ha usado el Kit de Vip ? Si lo pusieras en global debería decir [VIP-Pedro] Ha usado el kit de Vip, es una opinión nada más. Si dsp me di cuenta de enviarlo jaja, porque tengo 2 carpetas iguales que una la subi y la otra la estoy editando para ver en mi sv local.
  9. una pregunta asi sirve? outputChatBox("#FFff00[VIP-#ff0000"..name.."#FFff00] #FFFFFFUsted ha usado el Kit de Vip", getRootElement(), 255, 255, 255 , true)
  10. Listo ya lo solucione, otra cosa una pregunta Como tendria que hacer para que este mensaje que sale al sacarse cosas al panel lo puedan leer todo, Es decir que salga en chat publico o Global Chat, para que todos se den cuenta que tal usuario se esta giveando tal cosa del panel porque ya logre que salga el nombre con el ..name.. function BuyWeaponOnServer(weapon_name,data,value) name = getPlayerName ( source ) if(weapon_name == "Equiparme") then setElementData(source, "MAX_Slots" , 125) setElementData(source, "CZ 550", 1) setElementData(source, "CZ 550 Mag", 25) setElementData(source, "M4", 1) setElementData(source, "M4 Mag", 260) setElementData(source, "Milk", 2) setElementData(source, "Pizza", 2) setElementData(source, "Medic Kit", 2) setElementData(source, "Morphine", 2) setElementData(source, "Blood Bag", 1) setElementData(source, "Infrared Goggles", 1) setElementData(source, "Civilian[F] Clothing", 1) setElementData(source, "Map", 1) setElementData(source, "GPS", 1) setElementData(source, "Toolbox", 1) setElementData(source, "PDW", 1) setElementData(source, "PDW Mag", 100) setElementData(source, "Night Vision Goggles", 1) setElementData(source, "Radio Device", 1) setElementData(source, "Watch", 1) outputChatBox("#FFff00[VIP-#ff0000"..name.."] #FFFFFFHa usado el equipo automatico", source, 255, 255, 255 , true) end
  11. si, si estoy en el ACL, pero al precionar F10 no salta el cuadro osea el menu del vip
  12. Hola a todos quisiera saber en donde esta la falla porque al precionar F10 no salta el Cuadro del Bin Key si alguien me ayuda le paso el resource completo con el Client y el Server. function showPanel2(thePlayer) accountname = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "VIP" ) ) then triggerClientEvent (thePlayer, "ShowGUI", getRootElement()) else outputChatBox("#ff6464Solo usuarios V.I.P pueden abrir el Panel Vip.",thePlayer,255,125,0,true) end end function onResStart () for index, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "F10", "down", showPanel2 ) end end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), onResStart) function onPlayerJoin () bindKey ( source, "F10", "down", showPanel2 ) end addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerJoin) function cleanAll (player) for index, player in ipairs ( getElementsByType ( "player" ) ) do unbindKey ( player, "F10", "down", showPanel2 ) end end addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), cleanAll)
  13. No te sabria decir si es rollmessage o me estoy confundiendo yo mismo. Pero lo que yo me refiero con rollmesage es cuando un usuario se loguea o muere, sale un mensaje abajo de todo diciendo " Name is logged" y "Name has killed" el script que trato de resolver seria siendo el de "Name has killed by ..Name.. Weapon"
  14. Usa este donde dice "Hielo" cambiale al nombre del clan Respetando Mayuscula y Minuscula. Dsp cambia las Cordenada location1 y 2 y el warp cuando no son del clan y ya. Para que el resouce kicke a un usuario Agrega al ACL ADMIN a esta resource. RestricLocation = {} TeleportLocation = {} EnabledAlarm = true TimesToKick = {} TimeSireneEnabled = true ColCuboid = false --------------------------------------- CONFIGS -------------------------------------------- RestricLocation["location1"] = {-3215.5988769531,-6.7002897262573,12.6000003814} --Local 1 RestricLocation["location2"] = {-3368.6635742188,260.32647705078,81.217094421387} --LOCAL 2 TeleportLocation = {-3171.1320800781,125.37756347656,12.539682388306} --LOCAL TO TELEPORT PLAYER GroupName = "Hielo" -- name of the acl/gang group !!! GroupNameBy = 1 -- 1 for gang name, 2 for ACL group ! cmdTurnON = "turnONcmd" -- Command to enable alarm / cmdTurnOFF = "turnOFFcmd" -- Command to disable alarm / MsgtoKICK = "No puedes entrar a la base:" MsgCantCreateCollision = "Can't be created the Collision, check your location1 and location2" EnableVehicleGodMode = true -- true enabled, false disabled. KickORBAN = 1 -- 1 for kick player, 2 for BAN BanTime = 900000 -- time in seconds of ban, 900000 sec = 15 min MsgBAN = "Intruso" -- Reason of BAN ! --------------------------------------- CONFIGS -------------------------------------------- function sendMsg(iplayer,msg) outputChatBox ( msg, iplayer, 255, 255, 255, true ) end function EnterPlace ( theElement ) if (getElementType ( theElement ) == "player") and (PlayerHaveLevel (theElement) == false) and (EnabledAlarm == true ) then if(TimesToKick[theElement] > 0) then sendMsg(theElement,MsgtoKICK ..TimesToKick[theElement]) TimesToKick[theElement] = TimesToKick[theElement] -1 setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) if TimeSireneEnabled == true then triggerClientEvent ( "ActiveAlarm", getRootElement() ) end sendMsgOwners(theElement) else if (KickORBAN == 1) then kickPlayer(theElement) else banPlayer ( theElement , false, false, true, "Alarme system Base", MsgBAN, BanTime ) end end elseif getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,true) end end function ExitPlace ( theElement ) if getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,false) end end function ASBenable1 ( source ) if(PlayerHaveLevel (source) == true) then EnabledAlarm = true end end function ASBdisable1 ( source ) if(PlayerHaveLevel (source) == true) then EnabledAlarm = false end end function ResetStats ( ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if TimesToKick[aPlayer] == nil then TimesToKick[aPlayer] = 5 end if(TimesToKick[aPlayer] < 5) then TimesToKick[aPlayer] = TimesToKick[aPlayer] + 1 end end end function playerConnect ( playerNick ) local iPlayer = getPlayerFromName ( playerNick ) TimesToKick[iPlayer] = 5 end function PlayerHaveLevel( PlayerID ) if GroupNameBy == 1 then if ( getElementData ( PlayerID , "gang" ) == GroupName ) then return true else return false end else local accName = getAccountName ( getPlayerAccount ( PlayerID ) ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName ) ) ) then return true else return false end end end function ResourceStart( ) LoadLocations() CreateCollision() local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do TimesToKick[aPlayer] = 5 end end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ),ResourceStart) function LoadLocations() local RX, RY, RZ, WRX, WRX, WRX if(RestricLocation["location1"][1] > RestricLocation["location2"][1]) then RestricLocation["maxx"] = RestricLocation["location1"][1] RestricLocation["minx"] = RestricLocation["location2"][1] else RestricLocation["maxx"] = RestricLocation["location2"][1] RestricLocation["minx"] = RestricLocation["location1"][1] end if(RestricLocation["location1"][2] > RestricLocation["location2"][2]) then RestricLocation["maxy"] = RestricLocation["location1"][2] RestricLocation["miny"] = RestricLocation["location2"][2] else RestricLocation["maxy"] = RestricLocation["location2"][2] RestricLocation["miny"] = RestricLocation["location1"][2] end if(RestricLocation["location1"][3] > RestricLocation["location2"][3]) then RestricLocation["maxz"] = RestricLocation["location1"][3] RestricLocation["minz"] = RestricLocation["location2"][3] else RestricLocation["maxz"] = RestricLocation["location2"][3] RestricLocation["minz"] = RestricLocation["location1"][3] end end function CreateCollision() RX = RestricLocation["minx"] WRX = RestricLocation["maxx"] - RestricLocation["minx"] RY = RestricLocation["miny"] WRY = RestricLocation["maxy"] - RestricLocation["miny"] RZ = RestricLocation["minz"] WRZ = RestricLocation["maxz"] - RestricLocation["minz"] ColCuboid = createColCuboid ( RX, RY, RZ, WRX, WRY, WRZ ) if ColCuboid then addEventHandler ( "onColShapeHit", ColCuboid, EnterPlace ) addEventHandler ( "onColShapeLeave", ColCuboid, ExitPlace ) else outputDebugString(MsgCantCreateCollision) end end function ResourceStop( ) destroyElement ( ColCuboid ) end addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ),ResourceStop) function SireneEnabled() TimeSireneEnabled = true end function sendMsgOwners( PlayerID ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if(PlayerHaveLevel (aPlayer) == true) then sendMsg(aPlayer," #FF0000[ALARMA] El Jugador " ..getPlayerName ( PlayerID ) .." Estan intentando entrar a su base!") end end end function SetVehicleGodMode( VehicleID, godEoD ) if EnableVehicleGodMode == true then setElementData(VehicleID, "godmode", godEoD) setVehicleDamageProof (VehicleID, godEoD ) end end setTimer ( SireneEnabled , 20000, 0, "" ) setTimer ( ResetStats , 15000, 0, "" ) addCommandHandler(cmdTurnON, ASBenable1 ) addCommandHandler(cmdTurnOFF, ASBdisable1 ) addEventHandler ("onPlayerConnect", getRootElement(), playerConnect)
  15. Hola, quisiera saber porque no anda el script o como tendria que arreglarlo. local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed by "..getPlayerName(source)..". ("..weaponName..")" ) end Quisiera que ese mensaje sea en "RollMessage"
×
×
  • Create New...