-
Posts
53 -
Joined
-
Last visited
-
Days Won
1
Posts posted by error403 ツ
-
-
1.muestra el código para ver que error tienes.
2.Revisa si tu spawn predeterminado tiene el el siguiente evento onPlayerWasted .
-
Bienvenido @tobi_emetea Especifica mejor lo que quieres!
-
function playerGetDamageDayZ(attacker, weapon, bodypart, loss) cancelEvent() local occupiedvehicle = getPedOccupiedVehicle(localPlayer); if occupiedvehicle and getElementModel(occupiedvehicle) == 528 then return; end showPlayerDamageScreen(0,"up"); local headshot = false; if weapon == 37 then setElementData(localPlayer,"blood",getElementData(localPlayer,"blood")-10000) return elseif weapon == 51 or weapon == 59 or weapon == 63 or weapon == 16 then setElementData(localPlayer,"blood",getElementData(localPlayer,"blood")-12001) end if attacker and getElementType(attacker) == "player" then setElementData(localPlayer,"lastattacker",attacker) end damage = 100 headshot = false if attacker then if isElement(sleepText) then setElementData(localPlayer,"isSleeping",false) destroyElement(sleepText) triggerServerEvent("getDamageSleep", localPlayer) end if attacker and getElementType(attacker) and getElementType(attacker) == "vehicle" and not getElementData(getLocalPlayer(), "godmode") and not getElementData(getLocalPlayer(), "greenzone") then if loss >= 30 then setElementData(getLocalPlayer(),"blood",12001) end speedx, speedy, speedz = getElementVelocity(attacker) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) kmh = actualspeed * 180 if kmh >= 100 then setElementData(getLocalPlayer(),"blood",-10) else setElementData(getLocalPlayer(), "blood", getElementData(getLocalPlayer(), "blood") - 500) end setElementData(localPlayer,"lastattacker",getVehicleOccupant(attacker)) end if attacker then if getElementData(attacker, "zombie") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-gameplayVariables["zombiedamage"]) sendClientMessage ( '-'..gameplayVariables["zombiedamage"], 1, 'left' ) local number = math.random(1, 9) playSound("Sonidos/Ataque-Zombies/attack_"..number..".mp3") if number == 4 then setElementData(getLocalPlayer(),"infection",true) setElementData(getLocalPlayer(), "bleeding", getElementData(getLocalPlayer(), "bleeding") + math.floor(loss*10)) end end end end -- DAÑO DE LOS PUÑOS if attacker then if weapon == 0 and getElementType(attacker) == "player" then setElementData(localPlayer,"blood",getElementData(localPlayer,"blood")-150) end end -- if (weapon == 16) then local aX,aY,aZ = getElementPosition(attacker) local tX,tY,tZ = getElementPosition(localPlayer) if isLineOfSightClear(aX,aY,aZ,tX,tY,tZ,true,false,false,true) then setElementData(localPlayer, "blood", getElementData(localPlayer, "blood") - math.random(20000*0.8, 20000*1.2)); end end -- if weapon == 49 then if loss > 30 then setElementData(getLocalPlayer(),"brokenbone",true) setPedControlState ("jump",true) setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.floor(loss*10)) sendClientMessage ( '-'..math.floor(loss*10), 1, 'left' ) setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.floor(loss*5)) sendClientMessage ( '-'..math.floor(loss*5), 1, 'left' ) end end if weapon == 63 or weapon == 51 or weapon == 19 or weapon == 50 then local aX,aY,aZ = getElementPosition (localPlayer) local tX,tY,tZ = getElementPosition (localPlayer) if isLineOfSightClear(aX, aY, aZ, tX, tY, tZ, true, false, false, true) then setElementData(getLocalPlayer(), "blood", -300) if getElementData(getLocalPlayer(), "blood") <= 1 then if not getElementData(getLocalPlayer(), "isDead") == true then triggerServerEvent("kilLDayZPlayer",getLocalPlayer(), attacker, headshot) end end end if weapon and weapon > 1 and attacker and getElementType(attacker) == "player" then setElementData(localPlayer,"lastAttacker",attacker) damage = getWeaponDamage(weapon,attacker) local x1,y1,z1 = getElementPosition(localPlayer) local x2,y2,z2 = getElementPosition(attacker) local distancia = getDistanceBetweenPoints3D(x1,y1,z1,x2,y2,z2) local damage = math.random(distancia*5, distancia*6) if bodypart == 9 then damage = damage*gameplayVariables["headshotdamage_player"] sendClientMessage ( '-'..gameplayVariables["headshotdamage_player"], 1, 'left' ) headshot = true end if attacker then if weapon == 17 and getElementType(attacker) == "player" then setElementData(localPlayer,"blood",getElementData(localPlayer,"blood")-10) end end if bodypart == 7 or bodypart == 8 then setElementData(localPlayer,"brokenbone",true) end if getElementData(localPlayer,"humanity") >= 5000 then if damage <= 1000 then damage = 0 else damage = damage end end setElementData(localPlayer,"blood",getElementData(localPlayer,"blood")-math.floor(damage)) if damage >= 6000 then end local number = math.random(1,8) if number >= 6 and number <= 8 then if damage > 0 then setElementData(localPlayer,"bleeding",getElementData(localPlayer,"bleeding") + math.floor(loss*10)) end end local number = math.random(1,7) if number == 2 then setElementData(localPlayer,"pain",true) end ----------------------------------------- playRandomHitSound() local myKills = 200 - ((getElementData(localPlayer,"murders") / 3) * 150) local rawDamage = math.floor(math.sqrt((damage/55.55))) local humanityHit = -(myKills * rawDamage) if humanityHit > -800 then humanityHit = -800 end if not getElementData(localPlayer,"bandit") then triggerServerEvent("onPlayerChangeStatus",attacker,"humanity",math.floor(humanityHit)) if getElementData(attacker,"humanity") < 0 then setElementData(attacker,"bandit",true) end else triggerServerEvent("onPlayerChangeStatus",attacker,"humanity",math.floor(humanityHit)) if getElementData(attacker,"humanity") > 5000 then setElementData(attacker,"humanity",5000) end if getElementData(attacker,"humanity") > 2000 then setElementData(attacker,"bandit",false) end end if getElementData(localPlayer,"blood") <= 0 then if not getElementData(localPlayer,"isDead") then triggerServerEvent("kilLDayZPlayer",localPlayer,attacker,headshot,getWeaponNameFromID(weapon)) setElementData(localPlayer,"isDead",true) end end if weapon == 54 or weapon == 63 or weapon == 49 or weapon == 51 then local sangre = math.random( 100, 1000 ) setElementData(getLocalPlayer(),"blood",getElementData( getLocalPlayer(),"blood") - sangre ) sendClientMessage ( '-'..sangre, 1, 'left' ) local number = math.random(1,5) if loss > 30 then setElementData(localPlayer,"brokenbone",true) setPedControlState("jump",true) end if loss >= 100 then setElementData(localPlayer,"blood",49) setElementData(localPlayer,"bleeding",50) end local number = math.random(1,11) if number == 3 then setElementData(localPlayer,"pain",true) end end if getElementData(getLocalPlayer(),"blood")<= 0 and not getElementData(getLocalPlayer(),"isDead")== true then triggerServerEvent("kilLDayZPlayer",getLocalPlayer(),(getElementData(localPlayer, "lastattacker") or attacker),headshot,getWeaponNameFromID (weapon)) setElementData(getLocalPlayer(),"isDead",true) end end end addEventHandler("onClientPlayerDamage", getLocalPlayer(), playerGetDamageDayZ)
prueba esto. Y dime si te resulta.
-
siguimientos = {} function dogFollow( theprisoner) if siguimientos[theprisoner] == nil then else if not theprisoner then return end policia = siguimientos[theprisoner] local copx, copy, copz = getElementPosition ( siguimientos[theprisoner] ) local prisonerx, prisonery, prisonerz = getElementPosition ( theprisoner ) copangle = ( 360 - math.deg ( math.atan2 ( ( copx - prisonerx ), ( copy - prisonery ) ) ) ) % 360 setPedRotation ( theprisoner, copangle ) local dist = getDistanceBetweenPoints2D ( copx, copy, prisonerx, prisonery ) if getElementInterior(siguimientos[theprisoner]) ~= getElementInterior(theprisoner) then setElementInterior(theprisoner, getElementInterior(siguimientos[theprisoner])) end if getElementDimension(siguimientos[theprisoner]) ~= getElementDimension(theprisoner) then setElementDimension(theprisoner, getElementDimension(siguimientos[theprisoner])) end if dist >= 200 then local x,y,z = getElementPosition(siguimientos[theprisoner]) setElementPosition(theprisoner, x, y, z) elseif dist >= 9 then setPedAnimation(theprisoner, "ped", "sprint_civi") elseif dist >= 6 then setPedAnimation(theprisoner, "ped", "run_player") elseif dist >= 3 then setPedAnimation(theprisoner, "ped", "WALK_player") else setPedAnimation(theprisoner, false) end if isPedInVehicle ( policia ) then car = getPedOccupiedVehicle ( policia ) for i = 0, getVehicleMaxPassengers( car ) do local p = getVehicleOccupant( car, i ) if not p and not isVehicleLocked(car) then warpPedIntoVehicle ( theprisoner, car, i ) end end else if isPedInVehicle ( theprisoner ) then removePedFromVehicle ( theprisoner ) end end local zombify = setTimer ( dogFollow, 750, 1, theprisoner ) end end addCommandHandler("esposar", function(player, cmd, other) if not player or isPedDead(player) then return end if exports.factions:isPlayerInFaction(player, 1) then if exports.items:has(player, 35,4) then if other then target, targetName = exports.players:getFromName( player, other ) if not target or isPedDead(target) then return end x1, y1, z1 = getElementPosition ( player ) x2, y2, z2 = getElementPosition ( target ) distance = getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) if ( distance < 2) then if siguimientos[target] == nil then siguimientos[target] = player dogFollow(target) exports.chat:me(player, "pone las esposas a ".. targetName) showCursor(target, true) toggleControl ( target, "chatbox ", true ) setElementData(target, "esposado", true) else siguimientos[target] = nil exports.chat:me (player, "quita las esposas a ".. targetName) showCursor(target, false) toggleAllControls ( target, true ) setElementData(target, "esposado", false) end else outputChatBox("Estas demasiado lejos del fugetivo para esposarlo", player, 255, 0,0) end end else outputChatBox("(( No llevas las esposas en tu cinturón tactico ))", player, 255, 0, 0) end end end )
Hola aqui tienes una base, espero que te sirva
-
function msg(source,cmd,...) local cuenta = getAccountName(getPlayerAccount(source)) local nombre = getPlayerName ( source ):gsub ( '#%x%x%x%x%x%x', '' ) mensaje = table.concat ( { ... }, " " ) if not ... end not mensaje then return outputChatBox ( "Syntax: /"..cmd.." [Texto]", source, 255, 255, 0 ) end if isObjectInACLGroup("user."..cuenta,aclGetGroup("Admin")) then outputChatBox("#00FF00"..nombre.." #00FF00dice: #FDFEFE"..""..mensaje..".",root,255,255,0,true) else outputChatBox("No eres Admin") end end addCommandHandler("d",msg)
-
local sx, sy = guiGetScreenSize() local mostrando = true -- Configuration local settings = { disableGTASAhealthbar = true, -- disable GTASA's HUD health display disableGTASAarmorbar = true, -- disable GTASA's HUD armour display disableGTASAoxygenbar = true, -- disable GTASA's HUD oxygen display displayScale = 0.3*sy, -- width of radar (30% of screen width) aspectRatio = 3/2, -- 3:2 ratio, height is displayScale divided by this safeX = 0.025*sx, -- offset from left edge of screen safeY = 0.025*sy, -- offset from bottom edge of screen map = { image = "assets/world.jpg", alwaysRender = false, -- false = render only in interior world 0 backgroundColor = tocolor(124, 167, 209), -- rendered behind map (water color) }, bar = { -- generic health/armor/oxygen bar settings backgroundAlpha = 100, valueAlpha = 190, }, healthbar = { colorOk = {102, 204, 102}, colorLow = {200, 200, 0}, colorCritical = {200, 0, 0}, }, armorbar = { color = {0, 102, 255}, }, oxygenbar = { alwaysRender = false, -- false = only when oxygen not full or player is in water color = {255, 255, 0}, }, blips = { enabled = true, sizeFactor = 12, northBlip = true, drawProjectiles = true, projectilesAll = false, projectileColor = tocolor(255, 0, 0) }, } --------------------------------------------------------------------------- -- Do not modify anything below unless you're sure of what you're doing. -- --------------------------------------------------------------------------- -- Prepare rendertarget local rt = dxCreateRenderTarget(290, 290/settings.aspectRatio) local rtW, rtH = dxGetMaterialSize(rt) -- Prepare map image local map = dxCreateTexture(settings.map.image, "dxt5", true, "wrap") local mW, mH = dxGetMaterialSize(map) -- Precompute constants local mapScaleFactor = 6000/mW local mapDisplayWidth = settings.displayScale local mapDisplayHeight = settings.displayScale / settings.aspectRatio local armorBg = tocolor(settings.armorbar.color[1], settings.armorbar.color[2], settings.armorbar.color[3], settings.bar.backgroundAlpha) local armorVal = tocolor(settings.armorbar.color[1], settings.armorbar.color[2], settings.armorbar.color[3], settings.bar.valueAlpha) local oxygenBg = tocolor(settings.oxygenbar.color[1], settings.oxygenbar.color[2], settings.oxygenbar.color[3], settings.bar.backgroundAlpha) local oxygenVal = tocolor(settings.oxygenbar.color[1], settings.oxygenbar.color[2], settings.oxygenbar.color[3], settings.bar.valueAlpha) local function init() showPlayerHudComponent("radar", false) if settings.disableGTASAhealthbar then showPlayerHudComponent("health", false) end if settings.disableGTASAarmorbar then showPlayerHudComponent("armour", false) end if settings.disableGTASAoxygenbar then showPlayerHudComponent("breath", false) end end addEventHandler("onClientResourceStart", resourceRoot, init) local function getMaxHealth(p) return 100 + (getPedStat(p, 24) - 569) / 4.31 end local function getMaxOxygen(p) return 1000 + getPedStat(p, 225) * 1.5 end local minVel = 0.3 local minDist = 1 local maxVel = 1 local maxDist = 1/2 local ratio = (maxDist-minDist)/(maxVel-minVel) local function getRadarRadius() if not localPlayer.vehicle then return minDist else if localPlayer.vehicle.vehicleType == "Plane" then return maxDist end local speed = localPlayer.vehicle.velocity.length if speed <= minVel then return minDist elseif speed >= maxVel then return maxDist end local streamDistance = speed - minVel streamDistance = streamDistance * ratio streamDistance = streamDistance + minDist return math.ceil(streamDistance) end end -- Draws map to render target local function updateRT() dxSetRenderTarget(rt, true) if settings.map.alwaysRender or Camera.interior == 0 then local pos = Vector2(localPlayer.position) local X, Y = rtW/2 - (pos.x/mapZoomScale), rtH*(3/5) + (pos.y/mapZoomScale) dxDrawRectangle(0, 0, rtW, rtH, settings.map.backgroundColor) --render background local zmW, zmH = mW * getRadarRadius(), mH * getRadarRadius() dxDrawImage(X - (zmW)/2, Y - (zmH)/2, zmW, zmH, map, Camera.rotation.z, pos.x/mapZoomScale, -(pos.y/mapZoomScale), 0xFFFFFFFF) end dxSetRenderTarget() end -- Triggered on every frame function render() if not mostrando then return end mapZoomScale = mapScaleFactor / getRadarRadius() if (not isPlayerMapVisible()) then updateRT() local offset = 5 -- Calculations local barsHeight = 10 local barsWidth = mapDisplayWidth local radarWidth = mapDisplayWidth + offset + offset local radarHeight = mapDisplayHeight + offset + barsHeight + offset + offset local radarLeft = settings.safeX local radarTop = sy - settings.safeY - radarHeight local mapWidth = mapDisplayWidth local mapHeight = mapDisplayHeight local mapLeft = radarLeft + offset local mapTop = radarTop + offset local barsLeft = radarLeft + offset local barsTop = radarTop + offset + mapHeight + offset local barsOffset = 5 -- Draw radar dxDrawRectangle(radarLeft, radarTop, radarWidth, radarHeight, tocolor(0, 0, 0, 175)) dxSetBlendMode("add") dxDrawImage(mapLeft, mapTop, mapWidth, mapHeight, rt, 0, 0, 0, tocolor(255, 255, 255, 150)) dxSetBlendMode("blend") -- Calculate percentage values local health = getElementHealth(localPlayer) / getMaxHealth(localPlayer) local armor = getPedArmor(localPlayer) / 100 local oxygen = getPedOxygenLevel(localPlayer) / getMaxOxygen(localPlayer) -- Compute healthbar color local r, g, b = settings.healthbar.colorOk[1], settings.healthbar.colorOk[2], settings.healthbar.colorOk[3] if health >= 0.25 then interpolateBetween( settings.healthbar.colorOk[1], settings.healthbar.colorOk[2], settings.healthbar.colorOk[3], settings.healthbar.colorLow[1], settings.healthbar.colorLow[2], settings.healthbar.colorLow[3], math.floor(health*20)/10, "InOutQuad" ) else r, g, b = interpolateBetween( settings.healthbar.colorCritical[1], settings.healthbar.colorCritical[2], settings.healthbar.colorCritical[3], settings.healthbar.colorLow[1], settings.healthbar.colorLow[2], settings.healthbar.colorLow[3], math.floor(health*20)/10, "InOutQuad" ) end local healthBg = tocolor(r, g, b, 100) local healthVal = tocolor(r, g, b, 190) -- Draw health bar local healthbarLeft = barsLeft local healthbarWidth = barsWidth/2 - barsOffset/2 dxDrawRectangle(healthbarLeft, barsTop, healthbarWidth, barsHeight, healthBg) dxDrawRectangle(healthbarLeft, barsTop, healthbarWidth*health, barsHeight, healthVal) if settings.oxygenbar.alwaysRender or (oxygen < 1 or isPedInWater(localPlayer)) then -- draw armor bar local armorLeft = barsLeft + barsWidth/2 + barsOffset/2 local armorWidth = barsWidth/4 - barsOffset dxDrawRectangle(armorLeft, barsTop, armorWidth, barsHeight, armorBg) dxDrawRectangle(armorLeft, barsTop, armorWidth*armor, barsHeight, armorVal) -- draw oxygen bar local oxygenLeft = barsLeft + barsWidth/2 + barsWidth/4 + barsOffset/2 local oxygenWidth = barsWidth/4 - barsOffset/2 dxDrawRectangle(oxygenLeft, barsTop, oxygenWidth, barsHeight, oxygenBg) dxDrawRectangle(oxygenLeft, barsTop, oxygenWidth*oxygen, barsHeight, oxygenVal) else -- draw armor bar (extended length) local armorLeft = barsLeft + barsWidth/2 + barsOffset/2 local armorWidth = barsWidth/2 - barsOffset/2 dxDrawRectangle(armorLeft, barsTop, armorWidth, barsHeight, armorBg) dxDrawRectangle(armorLeft, barsTop, armorWidth*armor, barsHeight, armorVal) end local rx, ry, rz = getElementRotation(localPlayer) local centerX, centerY = mapWidth/2, mapHeight*(3/5) -- Draw heat-seeking rockets targeting the local player if settings.blips.drawProjectiles then for k, v in ipairs(getElementsByType("projectile")) do local blipPos = v.position local dist = (localPlayer.position - v.position).length if v.dimension == localPlayer.dimension and v.interior == Camera.interior and (settings.blips.projectilesAll or v.target == localPlayer or (localPlayer.vehicle and v.target == localPlayer.vehicle)) then local radius = dist/mapZoomScale local direction = math.atan2(v.position.x - localPlayer.position.x, v.position.y - localPlayer.position.y) + math.rad(Camera.rotation.z) local blipX, blipY = centerX + math.sin(direction) * radius, centerY - math.cos(direction) * radius if blipX >= 0 and blipX <= mapWidth and blipY >= 0 and blipY <= mapHeight then local path = "assets/blips/0.png" local blipColor = settings.blips.projectileColor local blipSize = settings.blips.sizeFactor dxDrawImage(mapLeft + blipX - blipSize/2, mapTop + blipY - blipSize/2, blipSize, blipSize, path, 0, 0, 0, blipColor) end end end end -- Draw blips for k, v in ipairs(getElementsByType("blip")) do local blipPos = v.position local dist = (localPlayer.position - v.position).length local maxdist = v.visibleDistance if dist <= maxdist and v.dimension == localPlayer.dimension and v.interior == Camera.interior then local radius = dist/mapZoomScale local direction = math.atan2(v.position.x - localPlayer.position.x, v.position.y - localPlayer.position.y) + math.rad(Camera.rotation.z) local blipX, blipY = centerX + math.sin(direction) * radius, centerY - math.cos(direction) * radius local blipX = math.max(0, math.min(blipX, mapWidth)) -- clamp position between 0 and mapWidth local blipY = math.max(0, math.min(blipY, mapHeight)) -- clamp position between 0 and mapHeight local blipRot = getElementData(v, "blipRotation") or 0 if type(blipRot) ~= "number" then blipRot = 0 end local path = "assets/blips/"..v.icon..".png" do local custom = getElementData(v, "customIcon") if custom and custom:sub(1, 1) == ":" then path = custom elseif custom then path = "assets/blips/"..custom..".png" end end local blipColor = (type(v.icon) == "number" and v.icon >= 1 and v.icon <= 63) and 0xFFFFFFFF or tocolor(getBlipColor(v)) local blipSize = v.size * settings.blips.sizeFactor dxDrawImage(mapLeft + blipX - blipSize/2, mapTop + blipY - blipSize/2, blipSize, blipSize, path, blipRot, 0, 0, blipColor) end end -- Draw north blip if settings.blips.northBlip then local direction = math.rad(-Camera.rotation.z + 180) local radius = math.sqrt((mapWidth/2)^2 + (mapHeight*(3/5))^2) local blipX, blipY = centerX + math.sin(direction) * radius, centerY + math.cos(direction) * radius local blipX = math.max(0, math.min(blipX, mapWidth)) -- clamp position between 0 and mapWidth local blipY = math.max(0, math.min(blipY, mapHeight)) -- clamp position between 0 and mapHeight local path = "assets/blips/4.png" local blipColor = 0xFFFFFFFF local blipSize = 2 * settings.blips.sizeFactor dxDrawImage(mapLeft + blipX - blipSize/2, mapTop + blipY - blipSize/2, blipSize, blipSize, path, 0, 0, 0, blipColor) end -- Draw local player blip local blipSize = 2 * settings.blips.sizeFactor dxDrawImage(mapLeft + centerX - blipSize/2, mapTop + centerY - blipSize/2, blipSize, blipSize, "assets/player.png", Camera.rotation.z-localPlayer.rotation.z, 0, 0) end end addEventHandler("onClientRender", root, render, false) function show() mostrando = not mostrando if mostrando then outputChatBox("On", 0, 255, 0) else outputChatBox("Off", 255, 0, 0) end end addCommandHandler("openHud", show) addCommandHandler("closeHud", show)
-
Es parecido como darte admin en el archivo ACL, en vez de user.cuenta vas a colocar resource.nombre_del_recurso.
-
●MTA DayZ | Last Day On EarthRe-apertura del servidor Last Day On Earth (de los mismos creadores de Survival Instintict y Global Infection) regresan con un nuevo modo para disfrutar y rememorar grandes momentos pasados.Cuenta con VIP Gratis (1 semana) para los usuarios que entren este mes de marzo.Contamos con un gran VPS libre de lagg, gamemode optimizado y grandes recursos entre ellos*Variación de armas*Interiores en hospitales,comisarias y zonas importantes (El resto sigue en trabajo)*Servidor Survival*Sistema de bases con protección*Autosprivados*Skinsprivados*VIP*Bases*Personalización de personaje*Chalecos y cascos*Trampas*Drogas*Animales salvajes*Base gratis por 3 meses a clanes con 10 usuarios activosEntra y demuestra que eres la salvación o la perdición..mtasa://144.217.86.190:27115mtasa://144.217.86.190:27115
-
Ponownie zainstaluj gta i MTA
-
addEventHandler( "onResourceStart", resourceRoot, function( ) -- load all vehicles local result = exports.sql:query_assoc( "SELECT * FROM vehicles ORDER BY vehicleID ASC" ) if result then for key, data in ipairs( result ) do if data.inactivo == 0 and data.cepo == 0 then local vehicle = createVehicle( data.model, data.posX, data.posY, data.posZ, data.rotX, data.rotY, data.rotZ ) setElementFrozen(vehicle, true) setElementAlpha(vehicle, 127) setElementCollisionsEnabled(vehicle, false) setTimer(setElementCollisionsEnabled, 2000, 1, vehicle, true) setTimer(setElementAlpha, 2000, 1, vehicle, 255) -- tables for ID -> vehicle and vehicle -> data vehicleIDs[ data.vehicleID ] = vehicle vehicles[ vehicle ] = { vehicleID = data.vehicleID, respawnInterior = data.respawnInterior, respawnDimension = data.respawnDimension, characterID = data.characterID, engineState = not doesVehicleHaveEngine( vehicle ) or data.engineState == 1, tintedWindows = data.tintedWindows == 1, fuel = data.fuel, km = data.km, pinturas = data.pinturas, motor = data.motor, mejoramotor = data.mejoramotor, frenos = data.frenos, mejorafrenos = data.mejorafrenos, model = data.model } setElementHealth( vehicle, data.health ) if data.health <= 300 then vehicles[ vehicle ].engineState = false end if data.color1 and data.color2 then r, g, b = HEX2RGB(data.color1) r2, g2, b2 = HEX2RGB(data.color2) setVehicleColor( vehicle, r, g, b, r2, g2, b2 ) end if data.color3 then r, g, b = HEX2RGB(data.color3) setVehicleHeadLightColor ( vehicle, r, g, b ) end setVehiclePlateText(vehicle, tostring(addZero( data.vehicleID, 4 ))) setVehicleRespawnPosition( vehicle, data.respawnPosX, data.respawnPosY, data.respawnPosZ, data.respawnRotX, data.respawnRotY, data.respawnRotZ ) setElementInterior( vehicle, data.interior ) setElementDimension( vehicle, data.dimension ) if data.alarma == 1 then setElementData(vehicle, "havealarm", true) end setVehicleLocked( vehicle, true ) setVehicleEngineState( vehicle, false ) setVehicleOverrideLights( vehicle, data.lightsState + 1 ) setElementData( vehicle, "fuel", data.fuel ) if data.cepo == 1 then setVehicleEngineState( vehicle, false ) setElementData( vehicle, "cepo", 1 ) end setVehiclePaintjob ( vehicle, data.pinturas ) setElementData(vehicle, "km", data.km) setElementData(vehicle, "idowner", data.characterID) setElementData(vehicle, "idveh", data.vehicleID) exports.vehicles_auxiliar:applyTunning(vehicle) setElementData(vehicle, "model", data.model) setElementData(vehicle, "fasemotor", data.fasemotor) setElementData(vehicle, "fasefrenos", data.fasefrenos) if data.diasLimpio > 0 then -- Solicitamos limpiarlo a todos los conectados y además lo guardamos. -- Preparado para una reforma futura setElementData(vehicle, "limpio", true) end if data.marchas == 1 then setElementData(vehicle, "marchas", 1) end if data.marchas == 0 then setElementData(vehicle, "marchas", 0) end if data.fasemotor > 0 then exports.vehicles_auxiliar:solicitarMejora(vehicle, 1, data.fasemotor) end if data.fasefrenos > 0 then exports.vehicles_auxiliar:solicitarMejora(vehicle, 2, data.fasefrenos) end end end end -- bind a key for everyone for key, value in ipairs( getElementsByType( "player" ) ) do bindKey( value, "num_3", "down", "lockvehicle" ) bindKey( value, "num_1", "down", "toggleengine" ) bindKey( value, "num_2", "down", "togglelights" ) bindKey( value, "num_0", "down", toggleFreezeStatus ) bindKey( value, "n", "down", toggleFreezeStatus ) bindKey( value, "k", "down", "lockvehicle" ) bindKey( value, "j", "down", "toggleengine" ) bindKey( value, "l", "down", "togglelights" ) bindKey( value, "c", "down", "cinturon" ) end -- -- Fuel update setTimer( function( ) for vehicle, data in pairs( vehicles ) do if not isElement( vehicle ) or getElementType( vehicle ) ~= "vehicle" then vehicles[ vehicle ] = nil elseif data.engineState and data.fuel and not isVehicleEmpty( vehicle ) and doesVehicleHaveEngine( vehicle ) and doesVehicleHaveFuel( vehicle ) and not ( models [ getElementModel ( vehicle ) ] ) then local vx, vy, vz = getElementVelocity( vehicle ) local speed = math.sqrt( vx * vx + vy * vy ) local loss = ( speed > 0.65 and 2 * speed or speed ) * 0.5 + 0.005 data.fuel = math.max( data.fuel - loss, 0 ) if math.floor( data.fuel + 0.5 ) ~= getElementData( vehicle, "fuel" ) then setElementData( vehicle, "fuel", math.floor( data.fuel + 0.5 ) ) end if data.fuel == 0 then setVehicleEngineState( vehicle, false ) setElementData (vehicle, "sinGasolina", true) for seat = 0, getVehicleMaxPassengers( vehicle ) do local player = getVehicleOccupant( vehicle, seat ) if player then triggerClientEvent( player, "gui:hint", player, "Sin gasolina", "Tu " .. getVehicleName( vehicle ) .. " No arranca sin gasolina!\nPara que no te vuelva a pasar esto recarga cada un tiempo.", 3 ) setVehicleEngineState( vehicle, false ) end end end end end end, 10000, 0 ) -- KM update setTimer( function( ) for vehicle, data in pairs( vehicles ) do if not isElement( vehicle ) or getElementType( vehicle ) ~= "vehicle" then vehicles[ vehicle ] = nil elseif data.engineState and not isVehicleEmpty( vehicle ) and doesVehicleHaveEngine( vehicle ) then local vx, vy, vz = getElementVelocity( vehicle ) local speed = math.sqrt( vx * vx + vy * vy ) local loss = (( speed > 0.65 and 2 * speed or speed ) * 0.8 + 0.005)*15 if data.km and data.km > 0 then data.km = math.max( data.km + loss, 0 ) else data.km = math.max( loss, 0 ) end if math.floor( data.km ) ~= getElementData( vehicle, "km" ) then setElementData( vehicle, "km", math.floor( data.km ) ) end end end end, 10000, 0 ) end ) function reloadVehicle(vehicleID) if vehicleID then if getVehicle(tonumber(vehicleID)) then destroyElement(getVehicle(tonumber(vehicleID))) end local data = exports.sql:query_assoc_single("SELECT * FROM vehicles WHERE vehicleID = "..vehicleID) if not data then return false end if data.inactivo == 0 then local vehicle = createVehicle( data.model, data.posX, data.posY, data.posZ, data.rotX, data.rotY, data.rotZ ) setElementFrozen(vehicle, true) setElementAlpha(vehicle, 127) setElementCollisionsEnabled(vehicle, false) setTimer(setElementCollisionsEnabled, 2000, 1, vehicle, true) setTimer(setElementAlpha, 2000, 1, vehicle, 255) -- tables for ID -> vehicle and vehicle -> data vehicleIDs[ data.vehicleID ] = vehicle vehicles[ vehicle ] = { vehicleID = data.vehicleID, respawnInterior = data.respawnInterior, respawnDimension = data.respawnDimension, characterID = data.characterID, engineState = not doesVehicleHaveEngine( vehicle ) or data.engineState == 1, tintedWindows = data.tintedWindows == 1, fuel = data.fuel, km = data.km, pinturas = data.pinturas, motor = data.motor, mejoramotor = data.mejoramotor, frenos = data.frenos, mejorafrenos = data.mejorafrenos, model = data.model } setElementHealth( vehicle, data.health ) if data.health <= 300 then vehicles[ vehicle ].engineState = false end if data.color1 and data.color2 then r, g, b = HEX2RGB(data.color1) r2, g2, b2 = HEX2RGB(data.color2) setVehicleColor( vehicle, r, g, b, r2, g2, b2 ) end if data.color3 then r, g, b = HEX2RGB(data.color3) setVehicleHeadLightColor ( vehicle, r, g, b ) end setVehiclePlateText(vehicle, tostring(addZero( data.vehicleID, 4 ))) setVehicleRespawnPosition( vehicle, data.respawnPosX, data.respawnPosY, data.respawnPosZ, data.respawnRotX, data.respawnRotY, data.respawnRotZ ) setElementInterior( vehicle, data.interior ) setElementDimension( vehicle, data.dimension ) if data.alarma == 1 then setElementData(vehicle, "havealarm", true) end setVehicleLocked( vehicle, true ) setVehicleEngineState( vehicle, false ) setVehicleOverrideLights( vehicle, data.lightsState + 1 ) setElementData( vehicle, "fuel", data.fuel ) if data.cepo == 1 then setVehicleEngineState( vehicle, false ) setElementData( vehicle, "cepo", 1 ) end setVehiclePaintjob ( vehicle, data.pinturas ) setElementData(vehicle, "km", data.km) setElementData(vehicle, "idowner", data.characterID) setElementData(vehicle, "idveh", data.vehicleID) exports.vehicles_auxiliar:applyTunning(vehicle) setElementData(vehicle, "model", data.model) setElementData(vehicle, "fasemotor", data.fasemotor) setElementData(vehicle, "fasefrenos", data.fasefrenos) if data.marchas == 1 then setElementData(vehicle, "marchas", 1) end if data.marchas == 0 then setElementData(vehicle, "marchas", 0) end if data.fasemotor > 0 then exports.vehicles_auxiliar:solicitarMejora(vehicle, 1, data.fasemotor) end if data.fasefrenos > 0 then exports.vehicles_auxiliar:solicitarMejora(vehicle, 2, data.fasefrenos) end return true end end end addCommandHandler( { "createvehicle", "makevehicle" }, function( player, commandName, ... ) model = table.concat( { ... }, " " ) model = getVehicleModelFromName( model ) or tonumber( model ) if model then local x, y, z, rz = getPositionInFrontOf( player ) local vehicle = createVehicle( model, x, y, z, 0, 0, rz ) if vehicle then local r,g,b,r2,g2,b2 = getVehicleColor( vehicle ) local luz1, luz2, luz3 = getVehicleHeadLightColor ( vehicle ) local c1 = RGB2HEX (r or 255, g or 255, b or 255) local c2 = RGB2HEX (r2 or 255, g2 or 255, b2 or 255) local c3 = RGB2HEX (luz1 or 255, luz2 or 255, luz3 or 255) local vehicleID, error = exports.sql:query_insertid("INSERT INTO vehicles (model, posX, posY, posZ, rotX, rotY, rotZ, color1, color2, color3, respawnPosX, respawnPosY, respawnPosZ, respawnRotX, respawnRotY, respawnRotZ, interior, dimension, respawnInterior, respawnDimension, numberplate) VALUES (" .. table.concat( { model, x, y, z, 0, 0, rz,"'".. c1 .."'", "'".. c2 .."'", "'".. c3 .."'", x, y, z, 0, 0, rz, getElementInterior( player ), getElementDimension( player ), getElementInterior( player ), getElementDimension( player ), "'".. getVehiclePlateText( vehicle ) .."'" }, ", " ) .. ")" ) if vehicleID then -- tables for ID -> vehicle and vehicle -> data vehicleIDs[ vehicleID ] = vehicle vehicles[ vehicle ] = { vehicleID = vehicleID, respawnInterior = getElementInterior( player ), respawnDimension = getElementDimension( player ), characterID = 0, engineState = false, tintedWindows = false, fuel = 100 } -- some properties setElementInterior( vehicle, getElementInterior( player ) ) setElementDimension( vehicle, getElementDimension( player ) ) setVehicleEngineState( vehicle, false ) setVehicleOverrideLights( vehicle, 1 ) setElementData(vehicle, "idveh", vehicleID) setElementData( vehicle, "fuel", 100 ) setElementData( vehicle, "km", 0 ) setElementData( vehicle, "marchas", 0 ) setVehiclePlateText(vehicle, vehicleID) exports.vehicles_auxiliar:saveColors(vehicle) -- success message outputChatBox( "Has creado un " .. getVehicleName( vehicle ) .. " con el ID " .. vehicleID .. ".", player, 0, 255, 0 ) else destroyElement( vehicle ) outputChatBox( "MySQL-Query failed.", player, 255, 0, 0 ) end else outputChatBox( "El nombre del vehículo es incorrecto. Vuelve a intentarlo.", player, 255, 0, 0 ) end else outputChatBox( "Syntax: /" .. commandName .. " [modelo]", player, 255, 255, 255 ) end end, true ) addCommandHandler( { "deletevehicle", "delvehicle" }, function( player, commandName, vehicleID ) if hasObjectPermissionTo( player, "command.createvehicle", false ) or hasObjectPermissionTo( player, "command.temporaryvehicle", false ) then vehicleID = tonumber( vehicleID ) if vehicleID and vehicleID ~= 0 then if ( vehicleID >= 0 and not hasObjectPermissionTo( player, "command.createvehicle", false ) ) or ( vehicleID < 0 and not hasObjectPermissionTo( player, "command.temporaryvehicle", false ) ) then outputChatBox( "No puedes borrar este vehículo.", player, 255, 0, 0 ) else local vehicle = vehicleIDs[ vehicleID ] if vehicle then if vehicleID < 0 or exports.sql:query_free( "DELETE FROM vehicles WHERE vehicleID = " .. vehicleID ) then outputChatBox( "Has borrado el vehículo con ID " .. vehicleID .. " (" .. getVehicleName( vehicle ) .. ").", player, 0, 255, 153 ) if vehicleID > 0 then exports.logs:addLogMessage("delveh", "Vehículo ID "..vehicleID.. ", borrado por "..getPlayerName(player)..".\n") end -- remove from vehicles list vehicleIDs[ vehicleID ] = nil vehicles[ vehicle ] = nil destroyElement( vehicle ) else outputChatBox( "MySQL-Query failed.", player, 255, 0, 0 ) end else outputChatBox( "Vehículo no encontrado.", player, 255, 0, 0 ) end end else outputChatBox( "Syntax: /" .. commandName .. " [id]", player, 255, 255, 255 ) end end end ) function deleteVehicle ( vehicle ) if not vehicle then return end local data = vehicles[ vehicle ] vehicleID = tonumber( data.vehicleID ) if vehicleID then if vehicleID < 0 or exports.sql:query_free( "DELETE FROM vehicles WHERE vehicleID = " .. vehicleID ) then vehicleIDs[ vehicleID ] = nil vehicles[ vehicle ] = nil destroyElement( vehicle ) return true else return false end else return false end end function saveVehicle( vehicle, force ) if vehicle then if models [getElementModel(vehicle)] and not force then return false end if getOwner(vehicle) and getOwner(vehicle) <= -1 and not force then return end local data = vehicles[ vehicle ] if data and data.vehicleID > 0 then local x, y, z = getElementPosition( vehicle ) local rx, ry, rz = getVehicleRotation( vehicle ) local km = getElementData(vehicle, "km") local success, error = exports.sql:query_free( "UPDATE vehicles SET respawnPosX = " .. x .. ", respawnPosY = " .. y .. ", respawnPosZ = " .. z .. ", respawnRotX = " .. rx .. ", respawnRotY = " .. ry .. ", respawnRotZ = " .. rz .. ", respawnInterior = " .. getElementInterior( vehicle ) .. ", respawnDimension = " .. getElementDimension( vehicle ) .. ", posX = " .. x .. ", km = " .. km .. ", posY = " .. y .. ", posZ = " .. z .. ", rotX = " .. rx .. ", rotY = " .. ry .. ", rotZ = " .. rz .. ", health = " .. math.min( 1000, math.ceil( getElementHealth( vehicle ) ) ) .. ", interior = " .. getElementInterior( vehicle ) .. ", dimension = " .. getElementDimension( vehicle ) .. ", fuel = " .. data.fuel .. " WHERE vehicleID = " .. data.vehicleID ) end end end addEventHandler( "onResourceStop", resourceRoot, function( ) for k, v in pairs( getElementsByType("vehicle") ) do saveVehicle( v ) end vehicles = { } vehicleIDs = { } end ) addEventHandler( "onVehicleRespawn", resourceRoot, function( ) local data = vehicles[ source ] if data and data.vehicleID > 0 then setElementInterior( source, data.respawnInterior ) setElementDimension( source, data.respawnDimension ) saveVehicle( source ) end end )
Aqui tienes una ayuda, para que puedas ver el link completo del codigo (aqui)
-
Prueba con esto!
function Apagar_Vehiculos ( ) local Vehiculos = getElementsByType ( "vehicle" ) for _, vehicle in pairs(Vehiculos) do setVehicleEngineState(vehicle, false) end end addEventHandler ( "onResourceStart", getRootElement(), Apagar_Vehiculos )
-
20 hours ago, jaredmedina said:
1 02:35:57] WARNING: [INFINITY]Assalto/AirNew_s.lua:56: Bad argument @ 'createBlipAttachedTo' [Expected element at argument 1, got nil]
[20-12-01 02:35:57] WARNING: [INFINITY]Assalto/AirNew_s.lua:57: Bad argument @ 'setElementVisibleTo' [Expected element at argument 1, got boolean]
[20-12-01 02:35:57] startResource: Resource '[INFINITY]Assalto' started
[20-12-01 02:35:57] WARNING: [INFINITY]Mercados/client.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8.
[20-12-01 02:35:57] Some files in '[INFINITY]Mercados' use deprecated functions.
[20-12-01 02:35:57] Use the 'upgrade' command to perform a basic upgrade of resources.
[20-12-01 02:35:57] startResource: Resource '[INFINITY]Mercados' started
[20-12-01 02:35:57] startResource: Resource '[INFINITY]Textos' started
[20-12-01 02:35:57] startResource: Resource '[SC]Maske' started
[20-12-01 02:35:57] startResource: Resource 'admin' started
[20-12-01 02:35:57] startResource: Resource 'ajax' started
[20-12-01 02:35:57] startResource: Resource 'ammunation' started
[20-12-01 02:35:57] startResource: Resource 'anims' started
[20-12-01 02:35:57] startResource: Resource 'anti-lag' started
[20-12-01 02:35:57] startResource: Resource 'armas' started
[20-12-01 02:35:57] startResource: Resource 'armasespalda' started
[20-12-01 02:35:57] startResource: Resource 'artificiales' started
[20-12-01 02:35:57] startResource: Resource 'asistencia' started
[20-12-01 02:35:58] WARNING: File 'carros/buffalo.dff' in resource 'autos' contains errors.
[20-12-01 02:35:58] WARNING: File 'carros/regina.dff' in resource 'autos' contains errors.
[20-12-01 02:35:58] startResource: Resource 'autos' started
[20-12-01 02:35:58] ERROR: bank/bank.lua:93: exports: Call to non-running server resource (sql) [string "?"] ME AYUDAN CON ESTO?
[20-12-01 02:35:58] startResource: Resource 'bank' started
[20-12-01 02:35:58] startResource: Resource 'barreras' started
[20-12-01 02:35:58] startResource: Resource 'basket' startedSignifica que el recurso sql no ha iniciado, ya que el recurso bank exporta una función de ese recurso.
- 1
-
Prueba asi...
addCommandHandler( "taximetro", function( player, commandName ) local vehiculo = getPedOccupiedVehicle ( player ) local vehiculos = getVehicleName ( vehiculo ) if vehiculos == "Taxi" then if exports.factions:IsPlayerInFaction(player,10) then setElementData( vehiculo, "distancia", type( getElementData( vehiculo, "distancia" ) ) ~= "number" and 0 or false ) end end end )
o tambien puedes probar asi:
addCommandHandler( "taximetro", function( theVehicle , commandName ) local vehiculo = getPedOccupiedVehicle( source ) local vehiculos = getElementModel ( theVehicle ) if vehiculos == 420 then if exports.factions:IsPlayerInFaction(player,10) then if vehiculo then setElementData( vehiculo, "distancia", type( getElementData( vehiculo, "distancia" ) ) ~= "number" and 0 or false ) end end end end )
Puedes mostrar exactamente el codigo en donde te dice el error?
taxidemetro\client.lua: Linea 3
Ejemplo de como deberia de ir la sintaxis del codigo: local theVehicle = getPedOccupiedVehicle ( thePlayer )--- Si el usuario o ped esta dentro de un vehiculo.
taxidemetro\client.lua: Linea 4
Ejemplo: Deberias de usar esto: local id = getElementModel ( theVehicle ) ---Obtiene la id del vehiculo.
-
23 hours ago, Cristianmarin said:
Estoy teniendo problemas alguno que sepa mucho se puede comunicar conmigo por discord Marcos Khalajari #9405
Escribeme al privado
-
if msgType == 0 then -- Se obtiene la posicion del jugador local X, Y, Z = getElementPosition(source) for i, Jugador in ipairs(getElementsByType("player")) do -- Se chequea si el jugador está a una distancia de 15 if getDistanceBetweenPoints3D(X, Y, Z, getElementPosition(Jugador)) <= 15 then -- Se muestra el mensaje outputChatBox("#FF0000[#FF7D00Say#FF0000] #FFFFFF"..getAccountName(getPlayerAccount(source)) or getPlayerName(source)..":#FFFFFF"..msg, Jugador, 211, 211, 211, true) end end end
Espero que esto te sirva de guia.
-
Pasa el codigo que esta en el cliente para poder ayudarte...
-
15 hours ago, trux_yt said:
hola. Tardaron mucho en responderme y tube que buscar yo solo, si tiene sistema VIP con skins beneficios en la concecionaria y mas. Pero pague un host y me apaga el servidor por que no encuentra los modulos ya estando puestos. "MYSQL Modules Missing"
Revisaste en el mtaserver.conf deberás especificar qué módulo necesitas (mta_mysql.dll para Windows; mta_mysql.so para Linux)
<module src="mta_mysql.dll"/> <!-- Windows --> <module src="mta_mysql.so"/> <!-- Linux -->
-
On 07/09/2020 at 15:07, trux_yt said:
y como doy VIP a un usuario?
En una gm roleplay no esiste beneficios, y si no me equivoco esta gm no posee sistema vip.
On 07/09/2020 at 15:29, trux_yt said:y tambien como creo un spawn de vehiculos de job?
crea el vehiculo de dicho trabajo en donde tu quieras usando este comando /createvehicle
Un spawn como tal no existe en esta gm. -
16 hours ago, trux_yt said:
o por lomenos como me doy administrador
debes de buscar en tu base de datos, buscar la id de la cuenta y la id del grupo, si no me equivoco la tabla en la base de datos se llama user_to_group ahi colocas tu id y el id del grupo que lo vas a añadir.
-
Pensándolo bien a mi también me pasa, creo un market en el interior 3 dimensión 2000, y estando en el mismo interior pero diferente dimensión se abre el panel que coloque en ese market. Ojo el market no se ve, pero abre el panel. Teniendo en cuenta lo siguiente
if getElementDimension =~ 2000 end getElementInterior =~ 3 then
muestra el panel.
-
Cual de las siguientes ciudades se desarrolla el entorno adecuado para rolear.
1= Los Santos
2= San Fierro
3= Las Vegas
-
local number = 0 local time = 10 -- segundos function cuentaregresiva () setTimer(function() number = number + 1 outputChatBox(number) if number < time then cuentaregresiva() else number = 0 end end, 1000, 1) end
-
On 12/12/2018 at 21:44, alex17" said:
function DarExp(Jugador, cmd,Usuario,Cantidad) local CuentaJugador = getAccountName (getPlayerAccount(Jugador)) if isObjectInACLGroup ( "user." .. CuentaJugador, aclGetGroup ( "Admin" ) ) then local Nombrejugador = getPlayerFromName(Usuario) local lvl = getElementData(Nombrejugador,"Nivel") local Exp = getElementData(Nombrejugador,"Experiencia") local progresoMaximo = getElementData(Nombrejugador, "ProgresoMaximo") local newexp = Exp + Cantidad setElementData(Nombrejugador,"Experiencia",newex) if newex >= progresoMaximo then setElementData(Nombrejugador, "Nivel", lvl + 1) end end end addCommandHandler("exp", DarExp)
no me funciono
function Exp(user, cmd, Player, Quantity) local AccountPlayer = getAccountName(getPlayerAccount(user)) if isObjectInACLGroup("user."..AccountPlayer, aclGetGroup("Admin")) then if Player and Quantity then local Playername = getPlayerFromName(Player) if Playername then if Quantity:match("^%d+$") then local lvl = getElementData(Playername, "Level") or 1 local exp = getElementData(Playername, "Exp") or 0 local Maximumprogress = getElementData(Playername, "maximumprogress") if tonumber(exp) + tonumber(Quantity) >= Maximumprogress then setElementData(Playername, "Level", tonumber(lvl) + 1) setElementData(Playername, "Exp", 0) else setElementData(Playername, "Exp", tonumber(exp) + tonumber(Quantity)) end else outputChatBox("Quantity must be a number.", user, 255, 0, 0) end else outputChatBox("Player not found.", user, 255, 0, 0) end else outputChatBox("/exp [Player, Quantity].", user, 255, 0, 0) end else outputChatBox("You don't have rights.", user, 255, 0, 0) end end addCommandHandler("exp", Exp)
Esto me lo pasaron pero no hace lo que quiero!
-
creo una tabla llamada arma donde coloco la id del arma y el nombre
{34, "Barret"}, ahora creo otra table donde llamo esa arma para darle un objeto Arma['Barret'] = {2385}
ahora quiero colocarle un skin y esto es lo que me sucede
--------------------------------------------------------
al usar esto me cambia el skin del arma cuando lo tengo en la espalda del personaje o cuando lo lanzo al suelo. aqui solo cambio el objeto.
txd = engineLoadTXD ("Armas/AK-107.txd") engineImportTXD ( txd, 2385)
dff = engineLoadDFF ("Armas/AK-107.dff", 2385) engineReplaceModel ( dff, 2385) --------------------------------------------------------
al usar esto me cambia el skin del arma cuando lo tengo equipado. aqui solo cambio el arma.
txd = engineLoadTXD ("Armas/AK-107.txd") engineImportTXD ( txd, 358)
dff = engineLoadDFF ("Armas/AK-107.dff", 358) engineReplaceModel ( dff, 358)
mi pregunta esta como puedo hacer que me cambie ambas
AYUDA, contrate un hosting y ahora tengo este problema y no encuentro solucion
in Scripting
Posted · Edited by error403 ツ
necesitas el modulo mta.mysql.so de x64 bits.... Para que pueda iniciar la conexion con la base de datos.