-
Posts
1,708 -
Joined
-
Last visited
Everything posted by iFoReX
-
si supiera que es bone_attach...
-
con una tabla , un unpack y un math.random
-
alexs no necesariamente tiene que estar cerca yo cuando hacia un attachelements, ponia el objeto que se unira en (0,0,0)
-
I dont undestand how fix it ._. Please help me --[[ Copyright (c) 2010 MTA: Paradise This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ]] local connection = nil local connection = nil local null = nil local results = { } local max_results = 128 -- connection functions local function connect( ) -- retrieve the settings local server = get( "server" ) or "localhost" local user = get( "user" ) or "root" local password = get( "password" ) or "" local db = get( "database" ) or "mta" local port = get( "port" ) or 3306 local socket = get( "socket" ) or nil -- connect connection = mysql_connect ( server, user, password, db, port, socket ) if connection then if user == "root" then setTimer( outputDebugString, 100, 1, "Connecting to your MySQL as 'root' is strongly discouraged.", 2 ) end return true else outputDebugString ( "Connection to MySQL Failed.", 1 ) return false end end local function disconnect( ) if connection and mysql_ping( connection ) then mysql_close( connection ) end end local function checkConnection( ) if not connection or not mysql_ping( connection ) then return connect( ) end return true end addEventHandler( "onResourceStart", resourceRoot, function( ) if not mysql_connect then if hasObjectPermissionTo( resource, "function.shutdown" ) then shutdown( "MySQL module missing." ) end cancelEvent( true, "MySQL module missing." ) elseif not hasObjectPermissionTo( resource, "function.mysql_connect" ) then if hasObjectPermissionTo( resource, "function.shutdown" ) then shutdown( "Insufficient ACL rights for mysql resource." ) end cancelEvent( true, "Insufficient ACL rights for mysql resource." ) elseif not connect( ) then if connection then outputDebugString( mysql_error( connection ), 1 ) end if hasObjectPermissionTo( resource, "function.shutdown" ) then shutdown( "MySQL failed to connect." ) end cancelEvent( true, "MySQL failed to connect." ) else null = mysql_null( ) end end ) addEventHandler( "onResourceStop", resourceRoot, function( ) for key, value in pairs( results ) do mysql_free_result( value.r ) outputDebugString( "Query not free()'d: " .. value.q, 2 ) end disconnect( ) end ) -- function escape_string( str ) if type( str ) == "string" then return mysql_escape_string( connection, str ) elseif type( str ) == "number" then return tostring( str ) end end local function query( str, ... ) checkConnection( ) if ( ... ) then local t = { ... } for k, v in ipairs( t ) do t[ k ] = escape_string( tostring( v ) ) or "" end str = str:format( unpack( t ) ) end local result = mysql_query( connection, str ) if result then for num = 1, max_results do if not results[ num ] then results[ num ] = { r = result, q = str } return num end end mysql_free_result( result ) return false, "Unable to allocate result in pool" end return false, mysql_error( connection ) end function query_free( str, ... ) if sourceResource == getResourceFromName( "runcode" ) then return false end checkConnection( ) if ( ... ) then local t = { ... } for k, v in ipairs( t ) do t[ k ] = escape_string( tostring( v ) ) or "" end str = str:format( unpack( t ) ) end local result = mysql_query( connection, str ) if result then mysql_free_result( result ) return true end return false, mysql_error( connection ) end function free_result( result ) if results[ result ] then mysql_free_result( results[ result ].r ) results[ result ] = nil end end function query_assoc( str, ... ) if sourceResource == getResourceFromName( "runcode" ) then return false end local t = { } local result, error = query( str, ... ) if result then for result, row in mysql_rows_assoc( results[ result ].r ) do local num = #t + 1 t[ num ] = { } for key, value in pairs( row ) do if value ~= null then t[ num ][ key ] = tonumber( value ) or value end end end free_result( result ) return t end return false, error end function query_assoc_single( str, ... ) if sourceResource == getResourceFromName( "runcode" ) then return false end local t = { } local result, error = query( str, ... ) if result then local row = mysql_fetch_assoc( results[ result ].r ) if row then for key, value in pairs( row ) do if value ~= null then t[ key ] = tonumber( value ) or value end end free_result( result ) return t end free_result( result ) return false end return false, error end function query_insertid( str, ... ) if sourceResource == getResourceFromName( "runcode" ) then return false end local result, error = query( str, ... ) if result then local id = mysql_insert_id( connection ) free_result( result ) return id end return false, error end function query_affected_rows( str, ... ) if sourceResource == getResourceFromName( "runcode" ) then return false end local result, error = query( str, ... ) if result then local rows = mysql_affected_rows( connection ) free_result( result ) return rows end return false, error end
-
yeh blazy I have all modules in it place, and Montiz very thank you I will Download it files I done it but again the mtaserver.exe closed here the console problem
-
Ok thnx you, I done it, but The mtaserver.exe again close here the console problem
-
I want Install MTA Paradise for my server but I have a problem and I dont know how fix it Here the console problem
-
no creo que funcione pero buee... y si haces esto ? setTimer( function() setElementHealth( elPed, 100 ) end,500,0)
-
thank you, work, but when I press Edit 2 and I press "1", the edit 2 doesnt change
-
I want do : if the player press BChooser1 and the BNumber[1] in the ENumber[1] set the "1"
-
why when I press the button the Edit Doesnt Change ? --[[ Dont Copy my Script or Dead -.- ]] BNumber = {} ENumber = {} B = {} x2, y2 = 58,31 CGUI = guiCreateWindow(0.3648,0.1517,0.25,0.3667,"Calculadora",true) ENumber[1] = guiCreateEdit(9,25,112,23,"",false,CGUI) guiEditSetMaxLength(ENumber[1], 4) ENumber[2] = guiCreateEdit(125,25,47,22,"",false,CGUI) guiEditSetMaxLength(ENumber[2], 1) ENumber[3] = guiCreateEdit(177,25,133,22,"",false,CGUI) guiEditSetMaxLength(ENumber[3], 4) EResult = guiCreateEdit(9,51,344,21,"---Resultado",false,CGUI) BDelete = guiCreateButton(237,75,72,26,"Borrar",false,CGUI) BNumber[1] = guiCreateButton(9,112,x2, y2,"1",false,CGUI) BNumber[2] = guiCreateButton(70,111,x2, y2,"2",false,CGUI) BNumber[3] = guiCreateButton(130,111,x2, y2,"3",false,CGUI) BNumber[4] = guiCreateButton(9,145,x2, y2,"4",false,CGUI) BNumber[5] = guiCreateButton(70,145,x2, y2,"5",false,CGUI) BNumber[6] = guiCreateButton(130,145,x2, y2,"6",false,CGUI) BNumber[7] = guiCreateButton(9,177,x2, y2,"7",false,CGUI) BNumber[8] = guiCreateButton(70,176,x2, y2,"8",false,CGUI) BNumber[9] = guiCreateButton(130,176,x2, y2,"9",false,CGUI) B0 = guiCreateButton(251,175,58,31,"0",false,CGUI) B.D = guiCreateButton(190,111,58,31,"/",false,CGUI) B.X = guiCreateButton(190,145,58,31,"X",false,CGUI) B.S = guiCreateButton(250,110,58,31,"+",false,CGUI) B.R = guiCreateButton(250,144,58,31,"-",false,CGUI) B.Re = guiCreateButton(190,175,58,31,"=",false,CGUI) BChooser1 = guiCreateButton(9,73,68,21,"1 Edit",false,CGUI) BChooser2 = guiCreateButton(83,73,68,21,"2 Edit",false,CGUI) guiSetVisible(CGUI, false) showCursor(false) bindKey("c","down", function () if getKeyState("lctrl") then guiSetVisible(CGUI, not guiGetVisible(CGUI)) showCursor(guiGetVisible(CGUI)) end end ) addEventHandler("onClientGUIClick",root, function() if source == BChooser1 then addEventHandler("onClientGUIClick",root, SetE) end end ) function setE() if source == BNumber[1] then guiSetText(ENumber[1], "1") end end
-
Solid, and other web ?
-
lol no creo que necesites hacer eso , pero hay uno se llama k-respawn
-
error en el debugging ?
-
pon lo de local d fuera de la funcion y ve si funciona.
-
get free dimension ? y esa funcion ? no existe creo.
-
Cuando le aprieto el Boton no se copia el texto , algun problema en mi codigo ? Boton = {} Boton[1] = guiCreateButton(381.0,285.0,301.0,135.0,"BotonInvisible",true) Boton[2] = guiCreateButton(0.5449,0.5286,0.1162,0.0352,"Cerrar",true) guiSetVisible(Boton[1],false) guiSetVisible(Boton[2],false) guiSetAlpha(Boton[1],0) guiSetAlpha(Boton[2],0) showCursor(false) function MostrarlaNGUI() dxDrawText("Ve a tu Navegador y pon CTRL+V o Pegar",385.0,383.0,619.0,399.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawText("Luego que lo presiones",385.0,358.0,513.0,384.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawText("Copiar Direccion del Foro",542.0,362.0,667.0,383.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,true) dxDrawRectangle(534.0,357.0,145.0,27.0,tocolor(0,0,0,255),false) dxDrawText("Nuevo Foro! Presiona en el siguiente Boton :",388.0,335.0,638.0,351.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawText("Nuevas Noticias Del Server :",388.0,289.0,544.0,307.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawText("Nuevas Noticias Del Server",415.0,265.0,644.0,277.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawRectangle(381.0,258.0,302.0,28.0,tocolor(255,0,0,200),false) dxDrawRectangle(381.0,285.0,302.0,157.0,tocolor(0,0,0,90),false) dxDrawText("Cerrar",599.0,408.0,633.0,423.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,true) dxDrawRectangle(557.0,403.0,119.0,27.0,tocolor(0,0,0,255),false) end bindKey("N","down", function() if getKeyState"lctrl" then addEventHandler("onClientRender", root, MostrarlaNGUI) guiSetVisible(Boton[1],true) guiSetVisible(Boton[2],true) showCursor(true) end end ) addEventHandler("onClientGUIClick", root, function() if source == Boton[2] then removeEventHandler("onClientRender", root, MostrarlaNGUI) guiSetVisible(Boton[1],false) guiSetVisible(Boton[2],false) showCursor(false) elseif source == Boton[1] then setClipboard("http://bhzserver.forochile.org/") end end ) Gracias en Avanzado
-
Carlossg, practicamente yo hago todas las GUis en el guieditor, y nunca me ha pasado ese problema.
-
Que yo sepa a todos los vehiculos se les puede cambiar llanta ( exceptuando los aviones y helis xDD )
-
facil Soren addVehicleUpgrade ( ElVehiculo, IDupgrade ) ei ID de upgrade lo vez aqui IDs de Upgrades