-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
if getElementData( localPlayer, 'OpenPanel') ~= nil then ._.? It would be: if getElementData( localPlayer, 'OpenPanel') ~= true then
-
Al costado te aparece Server function y events. Igual para los de client.
-
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 )
-
Do you have error on debug 3?
-
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.
-
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)
-
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.
-
guiGetScreenSize es client Side. Muestra el script que tienes.
-
Cierto. Me olvide de cambiar la funcion para ejecutar. Muchas Gracias.
-
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.
-
Que quieres lo que haga. Es que no quiero leer lo otro
-
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 )
-
Y usa tonumber para verificar que es la supuesta ID es un numero.
-
triggerServerEvent("iniciar", root, elPlayer)
-
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)
-
theTimeBan = math.floor(tonumber(timeBan)*60) Is it correctly?
-
And how i do to ban functions use minutes ??
-
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 ._.
-
._. only show banlist.xml ._. "6144C81929C21A254E0A4D087C9C9794" banner="Sasuke*" reason="Chau bitch puta" time="1363299062" unban="1363359062"> Sorry for the reason :3
-
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 -.-'
-
No. The reason its work but when I put 1 on timeBan it ban me 1363299062 miliseconds = 22721,651 minutes .__.