-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Proba con esto: local nombrejugador = "Joangel" local result = mysql_query ( handler, "INSERT INTO `some_table` (`nombre`) VALUES ('".. nombrejugador .."');" )
-
Te faltaban los dos puntos despues de cada valor. addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[2] ) then guiSetText ( GUIEditor_Edit[1], " " ) guiSetText ( GUIEditor_Edit[2], " " ) guiSetText ( GUIEditor_Edit[3], " " ) guiSetVisible ( GUIEditor_Button[2], false ) elseif ( source == GUIEditor_Button[1] ) then local x, y, z = getElementPosition ( localPlayer ) guiSetText ( GUIEditor_Edit[1], x ) guiSetText ( GUIEditor_Edit[2], y ) guiSetText ( GUIEditor_Edit[3], z ) guiSetVisible ( GUIEditor_Button[2], true ) local newFile = fileCreate ( "poss.txt" ) if ( newFile ) then fileWrite ( newFile, "Tus Posicion es: ".. x ..", ".. y ..", ".. z ) -- Aca. fileClose ( newFile ) end end end )
-
-- server side: addEventHandler ( "onPlayerJoin", root, function ( ) for index = 0, 150 do outputChatBox ( " ", source ) end end ) Cuando el jugador entre, va a enviar 150 mensajes al chat, si no llega a limpiarlo todo, entonces cambia el numero "150".
-
@marcos: Mejor usa lo de Alexs_Steel, asi obtiene el interior del jugador y lo usa para el PED. @Alexs_Steel: CP = Crear Ped ( O create ped ).
-
Mira que el archivo se va a crear en la carpeta de los recursos descargados, no en la carpeta del servidor.
-
De nada. Tema cerrado.
-
Eso es porque los zombies usan setElementHealth, y eso no ejecuta el evento.
-
Que tiene quever la posicion y la rotacion con el interior? el interior tiene que ser un numero entero. En el admin panel podes ver en que interior estas.
-
Si cancelas todos los daños, entonces para que queres el script que cure? si nunca van a perder vida.
-
Primero: --Server Side function antirobo ( thePlayer, seat, jacked ) if ( jacked ) then cancelEvent ( ) end end -- Te falto terminar la funcion. addEventHandler ( "onVehicleStartEnter", getRootElement(), antirobo ) Segundo: Esta todo mal. --Client Side function stopDamage ( attacker, weapon, bodypart, loss ) local vida = getElementHealth ( source ) if ( attacker and getElementType ( attacker ) == "player" ) and ( weapon == 41 ) and ( loss > 1 ) and ( vida < 99 ) then triggerServerEvent ( "healPlayer", localPlayer ) cancelEvent ( ) -- cancela los daños del graffiti. end end addEventHandler ( "onClientPlayerDamage", localPlayer, stopDamage ) --Server Side function curar ( ) local vida = getElementHealth ( source ) setElementHealth ( source, vida + 15 ) end addEvent ( "healPlayer", true ) addEventHandler ("healPlayer", getRootElement(), curar )
-
-
Excuse me, but Will wasn't doing anything this days, we've wasted days waiting for him with his "ideas" to come with us to work on the 3.0 version, and he never came. The main question is already answered, I'm locking this topic to prevent a flame war.
-
Eso no sirviria sin ofender. local posiciones = { { 2170.3459, 1611.5499, 999.9727 }, { 2193.1315, 1625.0666, 999.9719 }, { 2199.9279, 1608.9176, 999.9716 }, { 2225.5649, 1620.4234, 999.9655 }, { 2229.4406, 1597.1533, 999.968 }, { 2229.7163, 1574.3369, 999.9692 }, { 2219.9885, 1552.2485, 1004.7188 }, { 2205.5302, 1580.3706, 999.9785 }, { 2187.1303, 1591.5382, 999.9782 }, { 2175.5495, 1577.6177, 999.9683 }, { 2177.8242, 1601.6416, 999.9774 } } local jugadoresEnDM = { } addEventHandler ( "onPlayerWasted", getRootElement( ), function ( ) local azar = math.random ( #posiciones ) local interior = getElementInterior ( source ) local skin = getElementModel ( source ) local x, y, z = unpack ( posiciones [ azar ] ) setTimer( spawnPlayer, 2000, 1, source, x, y, z, 0, skin, interior ) end ) function consoleSetPlayerPosition ( thePlayer ) local azar = math.random ( #posiciones ) local interior = getElementInterior ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) setElementInterior ( thePlayer, 1 ) setElementPosition ( thePlayer, unpack ( posiciones [ azar ] ) ) jugadoresEnDM [ thePlayer ] = { interior, x, y, z } -- Agregamos al jugador que uso el comando a nuestra tabla con sus datos. end addCommandHandler ( "setpos", consoleSetPlayerPosition ) addCommandHandler ( "salirdm", function ( thePlayer ) if ( jugadoresEnDM [ thePlayer ] ) then -- Si el jugador que uso el comando esta en nuestra tabla.. setElementInterior ( thePlayer, unpack ( jugadoresEnDM [ thePlayer ] ) ) -- Obtenemos los datos del jugador y cambiamos su interior y posicion. jugadoresEnDM [ thePlayer ] = nil end end ) Lean los comentarios, les va a ayudar a entender lo que hice.
-
Topic moved to "Scripting" section.
-
You're welcome.
-
I think it does, add it to the Group "Admin" on the "acl.xml". Like this: "resource.myResourceName">
-
Some resources need's to be on the ACL, but not every, just these that uses functions restricted in the ACL.
-
You don't know how to install resources on your server? if so, check this manual: https://wiki.multitheftauto.com/wiki/Ser ... our_server
-
@ElMota: Eso esta mal. local posiciones = { { 2170.3459, 1611.5499, 999.9727 }, { 2193.1315, 1625.0666, 999.9719 }, { 2199.9279, 1608.9176, 999.9716 }, { 2225.5649, 1620.4234, 999.9655 }, { 2229.4406, 1597.1533, 999.968 }, { 2229.7163, 1574.3369, 999.9692 }, { 2219.9885, 1552.2485, 1004.7188 }, { 2205.5302, 1580.3706, 999.9785 }, { 2187.1303, 1591.5382, 999.9782 }, { 2175.5495, 1577.6177, 999.9683 }, { 2177.8242, 1601.6416, 999.9774 } } addEventHandler ( "onPlayerWasted", getRootElement( ), function ( ) local azar = math.random ( #posiciones ) local interior = getElementInterior ( source ) local skin = getElementModel ( source ) local x, y, z = unpack ( posiciones [ azar ] ) setTimer( spawnPlayer, 2000, 1, source, x, y, z, 0, skin, interior ) end ) function consoleSetPlayerPosition ( thePlayer ) local azar = math.random ( #posiciones ) setElementInterior ( thePlayer, 1 ) setElementPosition ( thePlayer, unpack ( posiciones [ azar ] ) ) end addCommandHandler ( "setpos", consoleSetPlayerPosition )
-
Usas el evento onPlayerChat, y outputChatBox y lo cancelas con: cancelEvent.
-
Es porque eso es un interior, necesitas usar setElementInterior.
-
triggerServerEvent -- To trigger a server side event. createVehicle -- To create the vehicle. warpPedIntoVehicle -- To warp the player to the vehicle.