Jump to content

Enargy,

Members
  • Posts

    1,102
  • Joined

Everything posted by Enargy,

  1. function disableAll() if (guiGetEnabled(loginWindow["mainWindow"]) == true) then guiSetEnabled(loginWindow["mainWindow"], false) end end bindKey("enter", "down",disableAll ) -- if not found then replace enter by 'enter_exit '.
  2. Pon esto en el runcode: srun for _, player in ipairs(getElementsByType("player")) do setAccountData (getPlayerAccount(player), "funmodev2-money", 0) end ó for _, player in ipairs(getElementsByType("player")) do local account = getPlayerAccount(player); if account and getAccountData (account, "funmodev2-money") then setAccountData (account, "funmodev2-money", 0); end end
  3. It must be one because guiGetText starts counting by 1. if #guiGetText(v) == 1 then outputChatBox("Please enter all the details needed.", 255, 0, 0) return false end
  4. He didn't tell what does he want to do with these returns.
  5. Necesitas el archivo .col de un archivo dff. El codigo sería: col = engineLoadCOL ( "myColFile.col" ) engineReplaceCOL ( col, 0 ) -- id del objeto
  6. No, bcause you're returning at elseif, not ending. it will work perfectly with non-return. if getAccountData(account,"dead")then respawnPlayer(player) elseif getAccountData(account,"faint")then triggerClientEvent(player,"setPlayerFaint",player,getElementData(account,"faint_tick")or false) end
  7. Debe ser que el objeto no tiene una colisión.
  8. addCommandHandler("flyman", function (_,target) local targetElement = getPlayerFromName(tostring(target)) if not targetElement then return end if (isVehicleOnGround(getPedOccupiedVehicle(targetElement)) == true) then local sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(targetElement)) setElementVelocity(getPedOccupiedVehicle(targetElement), sx+0.5, sy, sz+0.6 ) end end)
  9. deathText = guiCreateLabel(0, 0.8, 1, 0.2, [[ You died! You will respawn in 5 seconds.]], true) ???
  10. Trata de usar esto, no lo he probado. addEventHandler ( "onClientPlayerDamage", getRootElement(), function( attacker, weapon, bodypart, loss ) local myself = getElementData(localPlayer, "gang") local otherguy = getElementData(attacker, "gang") if myself == "SWAT" and otherguy == "SWAT" then cancelEvent() end end)
  11. local model = objetos[getElementModel(v)] engineSetModelLODDistance(model, 500) 'model' te esta dando un booleano y no una id. Prueba así addEventHandler ( "onClientPlayerJoin", root, function ( startedRes ) setFarClipDistance( 3000 ) for i, v in ipairs(getElementsByType("object")) do local model = objetos[getElementModel(v)] if ( model ) then engineSetModelLODDistance(v, 500) end end end )
  12. if not string.find(username,text) then addAccount(...) else outputChatBox("Error") return end
  13. Ya lo tienes mostrado en el label al usar guiSetText.
  14. function player_Wasted ( ammo, attacker, weapon, bodypart ) if attacker and getElementType(attacker) == "player" then local arrestado = getElementData(source, "arrestado") or 0 local level = getPlayerWantedLevel(source) local acc = getPlayerAccount(source) if skins[getElementModel(attacker)] and level > 0 then setElementData(source,"arrestado", arrestado+1) local arresto = setAccountData(acc,"arresto",1) if arresto==0 then return end setTimer (fadeCamera, 2000, 1, source, false) setTimer (setCameraTarget, 4000, 1, source, source) setTimer (fadeCamera, 6000, 1, source, true) setTimer (spawnPlayer, 6000, 1, source, 4076.3999023438, -1788.5, 3.511967, 0, getElementModel (source), 0, 0, getPlayerTeam(source)) outputChatBox ( "Fuiste Arrestado Por "..getPlayerName ( attacker ).." por 50 segundos.", source,255,0,0 ) givePlayerMoney (attacker, 4000) outputChatBox ( "Arrestaste a "..getPlayerName(source), attacker,255,255,0 ) local player = source theTimer = setTimer ( function(p) local p = player while type(p) == "userdata" do -- uso while para hacer un ciclo que me indique si 'p' es un dato de usuario. setElementPosition ( p, 1544.4332275391, -1674.7698974609, 13.688399200439 ) setPlayerWantedLevel ( p,0) p = nil -- retorno la variable 'p' a nula. De otra manera al no hacer esto la función entra en un ciclo infinito. end end, 3000, 1 ) end end end addEventHandler ("onPlayerWasted", getRootElement(), player_Wasted)
  15. elseif tonumber( getPlayerMoney() < text ) then
  16. Si te refieres a la posición en la pantalla si.
  17. function onPlayerPitchATent (itemName) setElementData(source,itemName,getElementData(source,itemName)-1) setPedAnimation (source,"BOMBER","BOM_Plant",nil,false,false,nil,false) local source = source setTimer( function () local x,y,z = getElementPosition(source) local xr,yr,zr = getElementRotation(source) px, py, pz = getElementPosition(source) prot = getPedRotation(source) local offsetRot = math.rad(prot+90) local vx = px + 5 * math.cos(offsetRot) local vy = py + 5 * math.sin(offsetRot) local vz = pz + 2 local vrot = prot+180 tent = createObject(3243,vx,vy,z-1,0,0,vrot) setObjectScale(tent,1.3) tentCol = createColSphere(x,y,z,4) attachElements ( tentCol, tent, 0, 0, 0 ) setElementData(tentCol,"parent",tent) setElementData(tent,"parent",tentCol) setElementData(tentCol,"tent",true) setElementData(tentCol,"vehicle",true) setElementData(tentCol,"MAX_Slots",100) triggerClientEvent(source,"refreshInventoryManual",source) end,1500,1) end addEvent("onPlayerPitchATent",true) addEventHandler("onPlayerPitchATent",getRootElement(),onPlayerPitchATent) El dato es un elemento.
  18. https://community.multitheftauto.com/in ... ls&id=7766
  19. No lo hice yo, ya lo elimine igual, apenas me has dicho esto. muchas gracias igual ¿quieres ser scripter de mi server? ando buscando uno muy bueno El ya tiene un servidor. A menos que le pagues .
×
×
  • Create New...