-
Posts
611 -
Joined
-
Last visited
Everything posted by AlvareZ_
-
This its: http://imageshack.us/photo/my-images/15 ... .png/?sa=0
-
How to use sWidth, sHeight. The original position are this: 384, 219, 567, 332 and i remplace to this: sWidth*0.384, sHeight*0.219, sWidth*0.567, sHeight*0.332 but the gui are cumshot aside Sorry for my bad english
-
Ham yeah, sorry. But, You now why the dx gui are cumshot? i apply the sWidth,sHeight thus: Original: 668, 952, 715, 997 With sWidth,sHeight: sWidth*0.668, sHeight*0.952, sWidth*0.715, sHeight*0.997 anything error?
-
Thanks you so much, but the list of the grindlist dont found, and a question, because the dx gui get cumshot ?
-
Hehe, Thanks, but now create only the dx Guis and text but not create the Gridlist, image, label and button
-
not work, not debug error's
-
See the parts: function main () setTimer ( function() texto = dxDrawText("Tienda de Armas", sWidth*0.580, sHeight*0.189, sWidth*0.893, sHeight*0.215, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, true, false, false) addEventHandler ( "onClientRender", root, texto ) and muestra = guiCreateStaticImage(sWidth*0.717, sHeight*0.234, sWidth*0.191, sHeight*0.126, ":admin/client/images/info.png", false) addEventHandler("onClientRender", root, render ) end, 5000, 1 ) end addEventHandler("onMarkerHit", entrada, main)
-
I wanna the player hit the maker after show the gui, not debugscript error: local sWidth,sHeight = guiGetScreenSize() local entrada = createMarker (2790.69849, -1618.30640, 15.35537, "cylinder", 1.5, 255, 255, 0, 170 ) function main () setTimer ( function() texto = dxDrawText("Tienda de Armas", sWidth*0.580, sHeight*0.189, sWidth*0.893, sHeight*0.215, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, true, false, false) addEventHandler ( "onClientRender", root, texto ) GUIEditor.gridlist[1] = guiCreateGridList(sWidth*0.394, sHeight*0.236, sWidth*0.252, sHeight*0.296, false) guiGridListAddColumn(GUIEditor.gridlist[1], "Armas", 0.9) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Uzi", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Tec-9", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Sniper", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Satchel", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Recortada", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Rifle", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "Paracaidas", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 8, 1, "MP5", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 9, 1, "M4", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 10, 1, "Knife", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 11, 1, "Katana", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 12, 1, "Grenade", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 13, 1, "Desert Eagle", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 14, 1, "Combat Shotgun", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 15, 1, "Colt", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 16, 1, "Chainsaw", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 17, 1, "AK-47", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 18, 1, "Visores Nocturnos", false, false) GUIEditor.button[1] = guiCreateButton(sWidth*0.699, sHeight*0.466, sWidth*0.235, sHeight*0.049, "Comprar", false) GUIEditor.label[4] = guiCreateLabel(sWidth*0.718, sHeight*0.371, sWidth*0.190, sHeight*0.017, "Nombre: ---", false) GUIEditor.label[5] = guiCreateLabel(sWidth*0.718, sHeight*0.389, sWidth*0.190, sHeight*0.015, "Municiones: ---", false) GUIEditor.label[7] = guiCreateLabel(sWidth*0.718, sHeight*0.410, sWidth*0.190, sHeight*0.016, "Nivel: ---", false) GUIEditor.label[8] = guiCreateLabel(sWidth*0.718, sHeight*0.424, sWidth*0.190, sHeight*0.021, "Precio: ---", false) muestra = guiCreateStaticImage(sWidth*0.717, sHeight*0.234, sWidth*0.191, sHeight*0.126, ":admin/client/images/info.png", false) addEventHandler("onClientRender", root, render ) end, 5000, 1 ) end addEventHandler("onMarkerHit", entrada, main) function render() dxDrawRectangle(sWidth*0.384, sHeight*0.219, sWidth*0.567, sHeight*0.332, tocolor(0, 0, 0, 240), true) dxDrawRectangle(sWidth*0.384, sHeight*0.194, sWidth*0.567, sHeight*0.025, tocolor(4, 75, 74, 240), true) end
-
aqui entran los que estan en el team ELITE ELITE = createColCuboid ( 97.3376, 1800.0384, -32.0937, 250, 280, 120 ) createBlip ( 193.248, 1890.01, 17.234, 47 ) g_root = getRootElement () --rocketOne = createMarker ( -2931.5136, 454.4492, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker --rocketTwo = createMarker ( -2931.5932, 487.1994, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPlayerOccupiedVehicle ( pla ) if vehicle or not vehicle then local ELITE = {["[ELITE]"] = true} if getElementType ( hitElement ) == "player" then local playerTeam = getPlayerTeam ( source ) if ( playerTeam == "ELITE" ) then outputChatBox ( "Bienvenido, "..getClientName(pla).."!", pla, 0, 150, 0 ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) outputChatBox ( "***Area Restringida***", pla, 255, 0, 0 ) outputChatBox ( "* "..getClientName(pla).." A Entrado En la Zona Restringida!", g_root, 255, 0, 0 ) end end end end end addEventHandler ( "onColShapeHit", ELITE, hit ) function leave ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPlayerOccupiedVehicle ( pla ) if vehicle or not vehicle then local ELITE = {["[ELITE]"] = true} if getElementType ( leaveElement ) =="player" and getPlayerTeam ( leaveElement ) and teams [getTeamName(getPlayerTeam ( leaveElement ))] then outputChatBox ( "Adios!", pla, 0, 100, 0 ) else setElementData ( pla, "inRestrictedArea", "false" ) triggerClientEvent ( pla, "destroyTimers", g_root, pla ) outputDebugString ( "*"..getClientName(pla).." Esta invadiendo Zona" ) end end end end addEventHandler ( "onColShapeLeave", ELITE, leave )
-
--Mecánico function fixCar (player,command) local conductor = isPedInVehicle() local skin = getPlayerSkin() local carro = getPedOccupiedVehicle ( thePlayer ) if (carro) then if ( skin == 50 ) then fixVehicle(vehicle) givePlayerMoney (thePlayer,250) takePlayerMoney (conductor, 250) end end end addCommandHandler("repair" , fixCar) addCommandHandler("rp" , fixCar)
-
Muchas Gracias alex, Justo estaba por postear que lo logre por mi mismo, asi no lo creas
-
Ham, perdona pero no entendi me explicarias un poco que quisiste decir con eso
-
alguien sabe ?
-
Usas esto para volver a lo normal, ps si no pone el codigo que tienes fadeCamera (true)
-
addEventHandler( "onClientRender", root, function() for k, i in pairs( myPeds ) do --'k' es el ped, 'i' es el nombre. if isElementOnScreen ( k ) then local x, y, z = getPedBonePosition( k, 6 ) local dx, dy = getScreenFromWorldPosition ( x, y, z + 0.4 ) if dx and dy then getDistanceBetweenPoints3D(384.3000793457, -2082.1811523438, 7.8359375, 384.85708618164, -2070.2456054688, 7.8359375) dxDrawText( i, dx - (#i * 2 ), dy - 3, dx + (#i * 2), dy + 2, tocolor( 156, 255, 0, 255 ), 2, "arial", "center", "center", false, false, false, false, true ) end end end end )
-
No testeado if (getElementModel ( theVehicle ) ) = "id" then
-
Buenas, quisiera saber como funciona esta funcion getDistanceBetweenPoints3D por que e intentado de todas formas y aun nada, por lo que entendí en lo siguiente getDistanceBetweenPoints3D ( float x1, float y1, float z1, float x2, float y2, float z2 ) x1: The X position of the first point y1: The Y position of the first point z1: The Z position of the first point x2: The X position of the second point y2: The Y position of the second point z2: The Z position of the second point es que la posiciones x1 y1 y z1 es el objeto y las pociciones x2 y2 y z2 es hasta donde quiero que se vea no ? lo intente asi y nada lo estoy usando con un nombre de un ped
-
function state() setVehicleDoorState ( aqui iria el coche actual, 0, 4 ) end addCommandHandler ( "capo", state )
-
... ? -- Anuncios para ventas u demas cosas -- Ejemplo: /an Vendo Bullet barato #49546566 function publicChat(thePlayer, commandName, ...) local players = getElementsByType("player") local chatContent = {...} for index, player in ipairs ( players ) do outputChatBox( "[Anuncio] " ..table.concat ( chatContent, " "), player, 50, 200, 100) end end addCommandHandler( "an", publicChat )
-
Ham ok, Muchas gracias.
-
Algo asi ? GUIEditor = { gridlist = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(417, 171, 547, 361, "ZombieVille Tienda de Armas", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.99) GUIEditor.gridlist[1] = guiCreateGridList(21, 42, 218, 296, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Arma:", 0.9) guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "M4", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) local hola = guiCreateStaticImage ( 94, 40, 147, 126, ":admin/client/images/info.png", false, GUIEditor.window[1] ) function crearm4 ( ) local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local arma = guiGridListGetItemText ( source, row, 1 ) if ( arma == "M4" ) then guiStaticImageLoadImage ( hola, "imagen.png" ) end end end addEventHandler ( "onClientGUIClick", GUIEditor.gridlist[1], crearm4, false ) function crearak ( ) local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local arma = guiGridListGetItemText ( source, row, 1 ) if ( arma == "AK-47" ) then guiStaticImageLoadImage ( hola, "nuevaimagen.png" ) end end end addEventHandler ( "onClientGUIClick", GUIEditor.gridlist[1], crearak, false )
-
y si quiero que al seleccionar otro se borre el anterior por ejemplo ya sea una lista larga que al darle ak y luego m4 se borre la imagen anterior mente seleccionada como aria ?
-
Ham ya, Muchas gracias a el igual sasuke y plate
