Jump to content

nowofresh

Members
  • Posts

    124
  • Joined

  • Last visited

Everything posted by nowofresh

  1. [list=]Thanks, gays. Working great.
  2. I cant see fucking picture. <meta> <info author="NL team" version="1.0" type="gamemode" /> <script src="n_polaczenie/login_c.lua" type="client" /> <file src="n_polaczenie/img/pokazlogo.png" /> </meta>
  3. function pokazlogo() guiCreateStaticImage( 0, 0, 1200, 1500, "img/pokazlogo.png", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), pokazlogo ) What wrong ? Picture cant work
  4. Hey, I am going to create like that: Player connect with a my sever. => Show 1 picture (5 sec) =>Show 2 picture (10sec) =>Show window in gui . function pokazlogo(x,y,width,height,path,relative,thefunction,time,Interval, TimesToExecute) guiCreateStaticImage( 0, 0, 1300, 1000, "img/pokazlogo.png", false ) setTimer ( pokazwczytywanie, 50, 1) --OutputChatBox("Zrobione...") end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), pokazlogo ) function pokazwczytywanie(x,y,width,height,path,relative,thefunction,time,Interval, TimesToExecute) guiCreateStaticImage( 0, 0, 1300, 1000, "img/pokazwczytywanie.png", false ) setTimer ( pokazlogowanie, 50, 1) end addEventHandler( "onResourceStart", rootElement, pokazwcztytywanie )
  5. Hey, I want to create a connect with MySQL. My rescources going to work on MySQL and they need a connect. I saw on community rescource about mysql and it cant work good and dosent have functions from mta.
  6. Ok. //This shitting paradise dosent work... I am create new gamemode. I must have a rescource, for example sourceSQL with connect mysql functions. For example if I had a rescource players and i have file lua whose need create new tables on my MYSQL. How to do this ? Sry for my English .
  7. What Did I do wrong ? <settings> <!-- MySQL Configuration --> <setting name="@sql.user" value="piotrvx_xlor"/> <setting name="@sql.password" value="haslo"/> <setting name="@sql.database" value="piotrvx_xlor"/> <setting name="@sql.hostname" value="localhost"/> <setting name="@sql.port" value="3306"/> <!-- Registration --> <setting name="@players.allow_registration" value="1"/><!-- Change to 0 to disable registration and show an error message --> <setting name="@players.registration_error_message" value="Edit this to show the user a message when registration is disabled"/> </settings>
  8. Can anyone write how he did start this ?
  9. Why I cant connect with database ? (paradise mta) $dbms = 'mysqli'; $dbhost = 'localhost'; $dbport = ''; $dbname = 'piotrvx_xlor'; $dbuser = 'piotrvx_xlor'; $dbpasswd = '[..]'; Changed by me 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( "localhost" ) or "localhost" local user = get( "piotrvx_xlor" ) or "root" local password = get( "haslo" ) or "" local db = get( "piotrvx_xlor" ) or "mta" local port = get( "3306" ) or 3306 local socket = get( "nil" ) 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 Oryginal: 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 Error: Help
  10. Orange gamemodes,highlighting others ? ever, release ? never.
  11. When i uploaded this same rescource like 1 week before, it cant work. Why my server get information: Resource could not be found when i type start gamem
  12. Write function. if(getPlayerTeam" class="kw2">getPlayerTeam(thePlayer) == TEAM_NAME) then [...] This should be work. for example: function test(arguments...) if(getPlayerTeam" class="kw2">getPlayerTeam(thePlayer) == TEAM_NAME) then local reason = {...} if(not [..]) then outputChatBox() outputChatBox() return end
  13. So... Can someone upload hes WORK's MTA-PARADISE I can't install Any version since 7 days... I was trying install mta-paradise all of this day. Pls, upload, good working mta-paradise
  14. How to install a MTA: SA 1.1 unstable ? I have always errors When I starts *exe file. When Will be finish MTA: SA 1.1 stable official ?
  15. [2010-12-05 21:58:20] ERROR: Couldn't find script glueS.lua for resource glue [2010-12-05 21:58:20] Loading of resource 'glue' failed [2010-12-05 21:58:20] Resources: 218 loaded, 0 failed [2010-12-05 21:58:20] Server password set to 'log2in' [2010-12-05 21:58:20] Querying game-monitor.com master server... success! [2010-12-05 21:58:20] MODULE: Loaded "MySQL 5.0 database module" (0.41) by "Alberto Alonso <[email protected]>" [2010-12-05 21:58:20] MODULE: Loaded "SHA Module" (1.02) by "mabako" [2010-12-05 21:58:20] MODULE: Loaded "Sockets Module" (0.10) by "Gamesnert, mabako, MCvarial & x86" [2010-12-05 21:58:20] Starting resources.... [2010-12-05 21:58:20] ERROR: Unable to start resource sql; Start up of resource cancelled by script <settings> <!-- MySQL Configuration --> <setting name="@sql.user" value="mtasa" /> <setting name="@sql.password" value="my_password" /> <setting name="@sql.database" value="mtasa" /> <setting name="@sql.hostname" value="localhost" /> <setting name="@sql.port" value="3306" /> <setting name="@sql.socket" value="/var/run/mysqld/mysqld.sock" /> <setting name="@players.allow_registration" value="1" /> </settings> -- retrieve the settings local server = get( "server" ) or "localhost" local user = get( "mtasa" ) or "root" local password = get( "my_password" ) or "" local db = get( "mtasa" ) or "mta" local port = get( "port" ) or 3306 local socket = get( "socket" ) or nil Dont work =_= ;( ;( ;(
  16. pls help ! It is last think what i want from u. I find it from 7 days. What i must do with SQL rescource ? 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 I must change it ?
  17. [2010-12-05 17:42:01] ERROR: Couldn't find script glueS.lua for resource glue [2010-12-05 17:42:01] Loading of resource 'glue' failed [2010-12-05 17:42:01] Resources: 215 loaded, 0 failed [2010-12-05 17:42:01] Server password set to 'log2in' [2010-12-05 17:42:01] Querying game-monitor.com master server... success! [2010-12-05 17:42:01] MODULE: Unable to find modules/ml_sockets.dll (/home/maxrate/mtasa/mods/deathmatch/modules/ml_sockets.dll: invalid ELF header)! [2010-12-05 17:42:01] MODULE: Loaded "MySQL 5.0 database module" (0.41) by "Alberto Alonso <[email protected]>" [2010-12-05 17:42:01] MODULE: Loaded "SHA Module" (1.02) by "mabako" [2010-12-05 17:42:01] MODULE: Loaded "Sockets Module" (0.10) by "Gamesnert, mabako, MCvarial & x86" [2010-12-05 17:42:01] Starting resources.... [2010-12-05 17:42:01] ERROR: Unable to start resource sql; Start up of resource cancelled by script [2010-12-05 17:42:01] ERROR: Unable to start resource irc; Start up of resource cancelled by script What !? I have all ok with settings.xml and mtaserver.conf. I have problems with sql resc. always
  18. Can u config me settings.xml and mtaserver.conf for Linux ?
  19. I have database Mysql and when i input text and restart server I have alaways problems with sql rescource etc.
  20. How to connect with database ? Can u configurate me settings.xml and mtaserver.conf on the linux ? Pls. It never works.
  21. Gays, pls help me ! I can't connect with database. I always have a problem with SQL. My Settings
  22. Hey, I am from Poland and I Am looking programmist for my project. I offer: # Two domeins # Website and Community forum witch Player Account ( MTA - WWW ) and many many more... # Team witch good graphic designer ( me ) and programmer PHP. # Hosting 100 GB and more # Head Administrator project You must be good. You can contact witch me by Gmail: [email protected] .
×
×
  • Create New...