Jump to content

Sasu

MTA Contributors
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Sasu

  1. Sasu

    admin group

    if getElementData( localPlayer, 'OpenPanel') ~= nil then ._.? It would be: if getElementData( localPlayer, 'OpenPanel') ~= true then
  2. Al costado te aparece Server function y events. Igual para los de client.
  3. This script will do that music play for all. The client is good but server is wrong. Try this: Client function Sound() playSound("sound.mp3",false) end addEvent("onActiveSound",true) addEventHandler("onActiveSound",getRootElement(),Sound) Server addEventHandler ( "onPlayerLogin", root, function() triggerClientEvent("onActiveSound",source,Sound) end )
  4. Do you have error on debug 3?
  5. En el ejemplo de onPlayerDamage te dice. function playerDamage_text ( attacker, weapon, bodypart, loss ) if ( bodypart == 9 ) then local knombre = getPlayerName(attacker) local nombre = getPlayerName(source) outputChatBox ( knombre.." le dio HeadShot a "..nombre, getRootElement (), 255, 0, 0 ) killPed ( source, attacker, weapon, bodypart ) end end addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage_text ) Ahi lo modifique para lo que queres.
  6. Sasu

    Ayuda

    No te sale el outputChatBox porque solo se va ejecutar si presionas Z. Prueba asi: Marker = createMarker ( 1294.7626953125, -1379.625, 13.486034584045, "corona",1.5,90,253,70,163) function check (thePlayer, source) if ( isElementWithinMarker( thePlayer, Marker ) ) then local money = getPlayerMoney(thePlayer) if (money > 1000) then setPedArmor ( thePlayer, 10 ) else outputChatBox ("No tienes Dinero para comprar Armor!", source, 8, 224, 13 ) end end end bindKey(thePlayer, "z", "down", check) function decir(hitElement) outputChatBox ("Preciona Z para comprar el armor!", hitElement, 8, 224, 13 ) end addEventHandler("onMarkerHit", Marker, decir)
  7. Sasu

    Ayuda

    Y todas esas funciones se pueden usar en server side. Ademas esta para server side xq usas thePlayer y en client no estaria definido. Prueba poniendolo en server.
  8. guiGetScreenSize es client Side. Muestra el script que tienes.
  9. Sasu

    Ayuda

    Cierto. Me olvide de cambiar la funcion para ejecutar. Muchas Gracias.
  10. Sasu

    Ayuda

    local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer ) if getElementType ( thePlayer ) == "player" then outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) local ganar = setTimer(givePlayerMoney, 1000, 0, thePlayer, 1000) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) function hill_Leave ( thePlayer ) if isTimer(ganar) then killTimer(ganar) end end addEventHandler ( "onColShapeLeave", hillArea, hill_Enter ) Si no funciona, fijate los errores en /debugscript 3 y me los dices.
  11. Sasu

    Ayuda

    Que quieres lo que haga. Es que no quiero leer lo otro
  12. addCommandHandler ( "giveall", function (thePlayer,_,weapon ) local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then for i, v in ipairs(getElementsByType("player")) do if weapon then giveWeapon(v, tonumber(weapon)) outputChatBox ( "#5555FFThe #00FF00Admin #5555FF" .. name .. "#00FF00 Has #5555FFGive #00FF00All #5555FFPlayers #00FF00".. weapon .."#5555FF$", getRootElement(), 255, 0, 0, true ) end end end end )
  13. Y usa tonumber para verificar que es la supuesta ID es un numero.
  14. triggerServerEvent("iniciar", root, elPlayer)
  15. Sasu

    killTimer

    For each players not. Only see... function banear(text, adminJail, timeJail, editText) local thePlayer = getPlayerFromName(text) if not thePlayer then outputChatBox("Selecciona a un jugador de la lista", source,255,0,0,true) return end if (getElementData(thePlayer, "jail") == "si") then setElementPosition(thePlayer, 1543.29, -1675.92, 13.55) outputChatBox(text.." ha sido liberado por "..adminJail..".", getRootElement(), 255, 0, 0, false) if isTimer(tiempo) then killTimer(tiempo) end setElementData(thePlayer, "jail", "no") else if (timeJail) then theTimeBan = math.floor ( tonumber ( timeJail )*60*1000 ) setElementPosition(thePlayer, 5562.25, -2121.5, 19.9) tiempo = setTimer(setElementPosition, theTimeBan, 1, thePlayer, 1543.29, -1675.92, 13.55) setElementData(thePlayer, "jail", "si") outputChatBox(text.." ha sido encarcelado por "..adminJail..". Razon: "..editText.." ( "..timeJail.." Min )", getRootElement(), 255, 0, 0, false) end end end addEvent("jailHim", true) addEventHandler("jailHim", getRootElement(), banear)
  16. Sasu

    killTimer

    OFF: Use english in this section . How? I didnt understand.
  17. Sasu

    killTimer

    local tiempo = setTimer(setElementPosition, theTimeBan, 1, thePlayer, 1543.29, -1675.92, 13.55) I use to killTimer... if isTimer(tiempo) then killTimer(tiempo) end But it dont kill Timer. And no error on debug 3. I am doing a panel jail system.
  18. theTimeBan = math.floor(tonumber(timeBan)*60) Is it correctly?
  19. And how i do to ban functions use minutes ??
  20. The same time :C EDIT: I use the reason to get minutes ban and... ._. banPlayer(thePlayer, false, false, true, adminBanner, editText.. "( "..theTimeBan.." Min )", theTimeBan) and said 0 min ._.
  21. ._. only show banlist.xml ._. "6144C81929C21A254E0A4D087C9C9794" banner="Sasuke*" reason="Chau bitch puta" time="1363299062" unban="1363359062"> Sorry for the reason :3
  22. Yes because it's seconds : seconds: The amount of seconds the player will be banned from the server for. This can be 0 for an infinite amount of time. theTimeBan = math.floor(tonumber(timeBan)*60*1000) I convert the miliseconds to minutes . I writed 1 minute why it ban me for 22721,651 minutes -.-'
  23. No. The reason its work but when I put 1 on timeBan it ban me 1363299062 miliseconds = 22721,651 minutes .__.
×
×
  • Create New...