Darwin

Members
  • Content Count

    8
  • Joined

Community Reputation

0 Neutral

About Darwin

  • Rank
    Newbie
  1. Darwin

    tag

    hola tengo un error y es que cuando pongo a un user en el ACL siempre aparecen con el mismo tag y no se le cambia el tag words = {} SQLS3D = { qury = executeSQLQuery } chatTime = {} lastChatMessage = {} addEventHandler("onPlayerChat", getRootElement(), function(text, msgtype, thePlayer) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local root = getRootElement() local name = getPlayerName(source) local r,g,b = getPlayerNametagColor(source) local Account1 = getPlayerAccount ( source ) local new = "" local iter = 0 msg = string.gsub(text,"ـ","") for word in msg:gmatch("%S+") do iter = iter + 1 -- for i,swr in ipairs(words) do -- local src = word:lower():gsub("%s","") -- local src = src:gsub("#%x%x%x%x%x%x","") -- local src = src:gsub("%c","") -- local src = src:gsub("%p","") -- local pat = swr:lower():gsub("%s","") -- if src:find(pat) then -- local replaceString = "" -- for x=1,word:gsub("#%x%x%x%x%x%x",""):len() do -- replaceString = replaceString.."*" -- end -- word = word:gsub(word,replaceString) -- end -- end if iter == 1 and word:len() > 0 then word = word:gsub("%a",string.upper,1) end new = new..word.." " end if new ~= "" then msg = new end text = msg if chatTime[source] and chatTime[source] + tonumber(1000) > getTickCount() then cancelEvent() outputChatBox("#ff0000[SPAM] 2EFF00Espere 1 segundo para poder digitar nuevamente!", source, 255, 0, 0) return else chatTime[source] = getTickCount() end lastChatMessage[source] = text local r, g, b = getPlayerNametagColor(source) cancelEvent() if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then cancelEvent(true) outputChatBox("#ff0000[Admin]►" .. name ..": #2EFF00" .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #ff0000[Admin]►" .. name ..": #2EFF00" .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Soporte")) then cancelEvent(true) outputChatBox("#000000$$$[#8A2BE2SOP#000000]#FFFFFF " .. name ..": " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderador")) then cancelEvent(true) outputChatBox("#000000[#ff0000Mod#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Super Moderador")) then cancelEvent(true) outputChatBox("#000000[#ff0000SMod#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("ProKillers")) then cancelEvent(true) outputChatBox("#01445C[P♛K]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Killer")) then cancelEvent(true) outputChatBox("#FFFF00[☯Killer☯]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Legendario")) then cancelEvent(true) outputChatBox(" #CCEEFF[LEGENDARIO]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Asesino")) then cancelEvent(true) outputChatBox("#3F0CA5[☢ASESINO☢]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Elite")) then cancelEvent(true) outputChatBox("#3F0CA5[☢ASESINO☢]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Armada")) then cancelEvent(true) outputChatBox("#15133E[☮ARMADA☮]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Militar")) then cancelEvent(true) outputChatBox("#017C16[✯MILITAR✯]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Policia")) then cancelEvent(true) outputChatBox("#0174FE[✮POLICIA✮]#FFFFFF "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Reclutas")) then cancelEvent(true) outputChatBox("#585858[RECLUTAS]☥#585858 "..name.."#FFFFFF" .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Soporte")) then cancelEvent(true) outputChatBox("#02EFF6[#1E90FFSOP#000000]#02EFF6 "..name.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then cancelEvent(true) outputChatBox("#ff0000[VIP]#FFFFFF "..name.."#FFFFFF: " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox("#585858[Everyone]#585858"..name..": "..text, root, 255, 255, 255, true) outputServerLog("CHAT: " .. name .. ": " .. text) end end )
  2. Caos Host https://www.caoshost.com/
  3. Darwin

    Scoreboard

    Hola tengo un problema con el scoreboard, cuando agrego a una persona a un Team en el scoreboard siempre permanece en el team pero cuando se desconecta y vuelve a conectar no aparece en ningun team
  4. Darwin

    detener play

    Hola tengo un problema al detener el resource play, cuando lo hago a los que se registran en el servidor les sale la pantalla negra, y otro que al detenerlo el playerblip y nametag no aparecen en el mapa ni en radar
  5. Darwin

    Blip en radar

    diras que soy algo bruto pero asi? :v localblip = createBlip( 92.50121, -165.68721, 2.59375, 23 ) setBlipVisibleDistance( localblip, 100 )
  6. Darwin

    Blip en radar

    y cuando en ese caso es asi localblip = createBlip( 92.50121, -165.68721, 2.59375, 23 ) en ese caso como le pongo para que aparesca cuando este cerca del marcador? @DNL291
  7. Darwin

    Blip en radar

    hola me ayudan a que los blips solamente aparezcan cuando este cerca del marcador y no aparescan amontonados... PDS: soy nuevo en el foro Mark = { {296, -37.9, 1000.5}, {288, -108, 1000}, {294, -79, 1000}, {312, -165, 999}, {1007.83203125, -1435.0576171875, 13.546875}, {2009.0185546875, 2149.0576171875, 10.8203125}, {-2132.4541015625, 344.595703125, 35.171875}, } --Marker local Marker1 = createMarker(296, -37.9, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker1,1) setElementDimension (Marker1, 0) local Marker2 = createMarker(289, -109, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker2,6) setElementDimension (Marker2, 6) local Marker3 = createMarker(294, -80, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker3,4) setElementDimension (Marker3, 0) local Marker4 = createMarker(294, -80, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker4,4) setElementDimension (Marker4, 1) local Marker5 = createMarker(294, -80, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker5,4) setElementDimension (Marker5, 2) local Marker5 = createMarker(294, -80, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker5,4) setElementDimension (Marker5, 3) local Marker6 = createMarker(289, -109, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker6,6) setElementDimension (Marker6, 3) local Marker7 = createMarker(289, -109, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker7,6) setElementDimension (Marker7, 4) local Marker8 = createMarker(312, -165, 998.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker8,6) setElementDimension (Marker8, 0) local Marker9 = createMarker(296, -37.9, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker9,1) setElementDimension (Marker9, 1) local Marker10 = createMarker(289, -109, 1000.5, "cylinder", 1.5, 250,250,0) setElementInterior (Marker10,6) setElementDimension (Marker10, 5) --Blip createBlip( 1007.83203125, -1435.0576171875, 13.546875, 6, 0.5, 0 ,0, 0, 0, 0, 400) createBlip( 2009.0185546875, 2149.0576171875, 10.8203125, 6, 0.5, 0 ,0, 0, 0, 0, 400) createBlip( -2132.4541015625, 344.595703125, 35.171875, 6, 0.5, 0 ,0, 0, 0, 0, 400)
  8. Darwin

    Hospitales

    Hola me gustaria que me ayudaran a arreglar un script que encontre en la comunidad de mta, quiero que al morir, el player aparezca en el hospital mas cercano "cuando muere aparece siempre en el hospital de ls ya he detenido el spawnmanager y el play pero sigue igual" hospital.Lua hosp_loc = { -- x, y, z, rot { 1173, -1323, 15, 270}, -- All Saints { 2038, -1411, 17, 130}, --Jefferson { 1242, 327, 19, 340}, -- Red County { 1609, 1816, 12, 360}, -- Las Venturas { -2655, 635, 14, 180}, -- San Fierro { -2200, -2311, 30, 320}, -- Angel Pine { -320, 1049, 20, 0 }, --Fort Carson - Bone County { -1514.5, 2524, 56, 0 } --Tierra Robada } fade = true --true enables fade, false disables fade wepsave = true--true gives weapons on respawn, false will not give weapons on respawn saveweps = {} FadeTimer = 5 --Time for camera to be black and show the wasted message (in seconds) --Let it be noted, your camera fades out half the time set above to black, text shows instantly. function getDistance(thePlayer) --IIYAMA basically made this, I came up with the idea and tweaked it -- get the player position local px,py,pz = getElementPosition( thePlayer ) --Player location -- prepare 2 variables, but do not give them a value yet. local closestDistance local closestPoint -- loop through the tables for i=1,#hosp_loc do --For all the locations in table local hx, hy, hz = hosp_loc[1], hosp_loc[2], hosp_loc[3] --Hospital locations local distance = getDistanceBetweenPoints3D (hx, hy, hz, px, py, pz) --Get the distance between player and hospitals if not closestDistance or distance < closestDistance then -- If the closestDistance is nil/(false) OR the distance is smaller than the closestDistance. closestDistance = distance -- save the distance in closestDistance, which is located outside of the loop. closestPoint = hosp_loc -- save the point in closestPoint, which is located outside of the loop. end end --x, y, z, rotation from hospital location table local x = (tostring(closestPoint[1])) --x local y = (tostring(closestPoint[2])) --y local z = (tostring(closestPoint[3])) --z local r = (tostring(closestPoint[4])) --rotation skin = getElementData(thePlayer, "respawn-skin" )--get skin --outputChatBox(""..skin, thePlayer) spawnPlayer ( thePlayer, x, y, z, r, skin ) --Spawn the player setElementModel (thePlayer, skin) if (fade == true) then --If fade is enabled fadeCamera(thePlayer,true,1.5) --Since we set camera to black screen below, we reset it here end --Load weapons if (wepsave == true) then local name = getPlayerName(thePlayer) -- Get his name if saveweps[name] and saveweps[name].weapons then -- Check if there is a saveweps if saveweps[name].weapons ~= false then -- Double check local weps = saveweps[name].weapons for i, node in ipairs(weps) do -- Loop the table local wepinfo = split(node, ".") -- Split the string local wepid = wepinfo[1] local wepammo = wepinfo[2] --setTimer(giveWeapon, i*1000, 1, thePlayer, wepid, wepammo ) -- Used for testing giveWeapon ( thePlayer, wepid, wepammo ) -- gives the weapon end end end end end function Respawn() if (fade == true) then --If fade is true fadeCamera(source,false,tonumber(FadeTimer)/2,0,0,0) --Fade camera to black triggerClientEvent(source, "WastedText", getRootElement(), FadeTimer) end if (wepsave == true) then --weapon save local name = getPlayerName(source) -- Get the name if isPedDead(source) then -- Checks if the player is dead. saveweps[name] = { weapons = false } -- Reset the saveweps local weaponsTable = {} -- Create a empty table for i=1, 12 do -- Loop the stuff if(getPedWeapon(source, i) ~= 0 and getPedTotalAmmo(source, i) > 0) then table.insert(weaponsTable, getPedWeapon(source, i) .. "." .. getPedTotalAmmo(source, i)) -- Insert into the empty table end end saveweps[name].weapons = weaponsTable -- Put the empty table in the saveweps. else saveweps[name] = { weapons = false } -- If not then just empty the saveweps end end --Get players skin local skinid = getElementModel(source) setElementData(source, "respawn-skin", skinid) setTimer(getDistance, tonumber(FadeTimer)*1000, 1, source) --Set a timer to spawn player end addEventHandler("onPlayerWasted", getRootElement(), Respawn ) --When player dies function is triggered hospital_c local sx, sy = guiGetScreenSize ( ) local pX, pY = ( sx / 2 - 485 / 2 ), ( sy / 2 - 150 / 2 ) function Wasted_Dx( ) local blip = createBlip(1173, -1323, 15, 22) local blip = createBlip(2038, -1411, 17, 22) local blip = createBlip(1242, 327, 19, 22) local blip = createBlip(1609, 1816, 12, 22) local blip = createBlip(-2655, 635, 14, 22) local blip = createBlip(-2200, -2311, 30, 22) local blip = createBlip(-320, 1049, 20, 22) local blip = createBlip(-1514.5, 2524, 56, 22) dxDrawText("Wasted", pX, pY, 670-10, 314-20, tocolor(0, 0, 0, 255), 3, "bankgothic", "center", "top", false, false, false, false, false) dxDrawText("Wasted", pX, pY, 670, 314, tocolor(255, 0, 0, 255), 3, "bankgothic", "center", "top", false, false, false, false, false) end function WastedTimer(FadeTimer) addEventHandler("onClientRender", root, Wasted_Dx) setTimer(StopText, FadeTimer*1000, 1, localPlayer) end addEvent("WastedText", true) addEventHandler("WastedText", getRootElement(), WastedTimer) function StopText() removeEventHandler("onClientRender", root, Wasted_Dx) end meta <meta> <info author="kieranb, IIYAMA" type="script" name="Hospital Respawn" version="1.0.3" description="A magical pony, just kidding, it's a respawn script..." /> <min_mta_version server="1.5.5" client="1.5.5" /> <script src="hospital.Lua" type="server"/> <script src="hospital_c.Lua" type="client"/> </meta>