Jump to content

iFoReX

Members
  • Posts

    1,708
  • Joined

  • Last visited

Everything posted by iFoReX

  1. iFoReX

    MTA Paradise.

    mm I cant do /start sql, because my console close in a seconds sql script : --[[ 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" -- server local user = get( "user" ) or "root" -- username local password = get( "password" ) or "" -- password local db = get( "database" ) or "rpserver" -- database 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
  2. iFoReX

    MTA Paradise.

    why it doesnt work ? local server = get( "server" ) or "localhost" -- server local user = get( "user" ) or "root" -- username local password = get( "password" ) or "" -- password local db = get( "database" ) or "rpserver" -- database local port = get( "port" ) or 3306 local socket = get( "socket" ) or nil ================================================================== = Multi Theft Auto: San Andreas v1.3 ================================================================== = Server name : TDF|paradise ~ Roleplay = Server IP address: = Server port : 4590 = = Log file : ..p/RP Server/mods/deathmatch/logs/server.log = Maximum players : 32 = HTTP port : 23002 = Voice Chat : Disabled = Bandwidth saving : Medium ================================================================== [2012-09-05 01:39:06] Resources: 30 loaded, 0 failed [2012-09-05 01:39:06] Querying game-monitor.com master server... unavailable! [2012-09-05 01:39:06] Querying backup master server... success! [2012-09-05 01:39:06] MODULE: Unable to find modules/mta_mysql.dll! [2012-09-05 01:39:06] MODULE: Loaded "SHA Module" (1.02) by "mabako" [2012-09-05 01:39:06] Starting resources..... [2012-09-05 01:39:06] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:06] Start up of resource sql cancelled by script [2012-09-05 01:39:06] ERROR: Unable to start resource sql; Start up of resource cancelled by script [2012-09-05 01:39:06] Start up of resource irc cancelled by script [2012-09-05 01:39:06] ERROR: Unable to start resource irc; Start up of resource cancelled by script [2012-09-05 01:39:06] WARNING: players/main.lua(Line 379) [server] setPedFrozen is deprecated and may not work in future versions. Please replace with setElementFrozen. [2012-09-05 01:39:06] Some files in 'players' use deprecated functions. [2012-09-05 01:39:06] Use the 'upgrade' command to perform a basic upgrade of resources. [2012-09-05 01:39:06] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:06] Start up of resource sql cancelled by script [2012-09-05 01:39:06] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:06] Start up of resource players cancelled by script [2012-09-05 01:39:06] ERROR: Unable to start resource players; Start up of resource cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource vehicles cancelled by script [2012-09-05 01:39:07] ERROR: Unable to start resource vehicles; Start up of resource cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource interiors cancelled by script [2012-09-05 01:39:07] ERROR: Unable to start resource interiors; Start up of resource cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource items cancelled by script [2012-09-05 01:39:07] ERROR: Unable to start resource items; Start up of resource cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource vehicles cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource items cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] WARNING: admin/player.lua(Line 225) [server] isPedFrozen is deprecated and may not work in future versions. Please replace with isElementFrozen. [2012-09-05 01:39:07] WARNING: admin/player.lua(Line 238) [server] setPedFrozen is deprecated and may not work in future versions. Please replace with setElementFrozen. [2012-09-05 01:39:07] WARNING: admin/player.lua(Line 241) [server] setVehicleFrozen is deprecated and may not work in future versions. Please replace with setElementFrozen. [2012-09-05 01:39:07] Some files in 'admin' use deprecated functions. [2012-09-05 01:39:07] Use the 'upgrade' command to perform a basic upgrade of resources. [2012-09-05 01:39:07] WARNING: shops/shop.lua(Line 57) [server] setPedFrozen is deprecated and may not work in future versions. Please replace with setElementFrozen. [2012-09-05 01:39:07] Some files in 'shops' use deprecated functions. [2012-09-05 01:39:07] Use the 'upgrade' command to perform a basic upgrade of resources. [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource items cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource shops cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource items cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] ERROR: Unable to start resource shops; Start up of resource cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource vehicles cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource players cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:07] Start up of resource items cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:07] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:07] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource shops cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource items cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource interiors cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource vehicles cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource vehicles cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource maps cancelled by script [2012-09-05 01:39:08] ERROR: Unable to start resource maps; Start up of resource cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource teleports cancelled by script [2012-09-05 01:39:08] ERROR: Unable to start resource teleports; Start up of resource cancelled by script [2012-09-05 01:39:08] WARNING: bank/bank.lua(Line 59) [server] setPedFrozen is deprecated and may not work in future versions. Please replace with setElementFrozen. [2012-09-05 01:39:08] Some files in 'bank' use deprecated functions. [2012-09-05 01:39:08] Use the 'upgrade' command to perform a basic upgrade of resources. [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource items cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource bank cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource items cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.) [2012-09-05 01:39:08] Start up of resource sql cancelled by script [2012-09-05 01:39:08] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-09-05 01:39:08] Start up of resource players cancelled by script [2012-09-05 01:39:08] ERROR: Unable to start resource bank; Start up of resource cancelled by script [2012-09-05 01:39:08] Server shutdown as requested by resource sql (MySQL module missing.)
  3. solo el error de argumento.
  4. es que tengo un timer que al logearse, se spawnea en 2 segundos, pero esto lo hara solo cuando muera ?
  5. Ook, el problema es que necesito un argumento para obtener el player en estas lineas : function fadeOn(thePlayer) local x,y,z = unpack ( lugares [ math.random ( #lugares ) ] ) fadeCamera( thePlayer, true ) addEventHandler("onPlayerWasted",root,function() skin = getElementModel(source) end ) spawnPlayer(thePlayer,x,y,z,0,skin) end source no sirve porque esta con un timer, y con thePlayer tampoco porque me aparece bad argument
  6. que argumento debo usar en : lugares = { { -2473.7883300781, 1553.5477294922, 33.234375 }, { -2473.7021484375, 1552.2395019531, 33.227333068848 }, { -2473.7443847656, 1550.9230957031, 33.227333068848 }, { -2473.7253417969, 1549.1356201172, 33.227333068848 }, { -2473.6928710938, 1547.2581787109, 33.227333068848 }, { -2473.4963378906, 1545.0604248047, 33.227333068848 }, } function setCameraOnPlayerJoin() fadeCamera( source, true ) setCameraMatrix( source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316 ) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) function fadeOn(thePlayer) local x,y,z = unpack ( lugares [ math.random ( #lugares ) ] ) ------------Aqui fadeCamera( thePlayer, true ) addEventHandler("onPlayerWasted",root,function() skin = getElementModel(source) end ) spawnPlayer(thePlayer,x,y,z,0,skin) end function stopCameraOnPlayerLogin() fadeCamera( source, false ) setTimer(fadeOn,2000,1) end addEventHandler("onPlayerLogin", getRootElement(), stopCameraOnPlayerLogin)
  7. plz reload the FastFire Link c:
  8. como buscar con string.find en el nombre del player si tiene un tag ? por ejemplo : TDF|Player, y ver si tiene TDF|
  9. Entonces como uquedaria el script ?
  10. Porque el $ no se guarda ? function playerLeave() local playeracc = getPlayerAccount(source) if ( playeraccount == true ) then local playercash = getPlayerMoney(source) setAccountData(playeracc, "cash", playercash) end end function playerReJoin() local playeracc = getPlayerAccount(source) if (playeracc == true) then local playerbank = getAccountData(playeracc, "cash") if (playerbank == true) then setPlayerMoney(source, playerbank) end end end addEventHandler("onPlayerJoin", getRootElement(), playerReJoin) addEventHandler("onPlayerLeave", getRootElement(), playerLeave)
  11. lol el timer se ejecuta cada 2 segundos repetidamente.
  12. local colores = { { 255, 0, 0 }, { 0, 255, 0 }, { 0, 0, 255 }, { 255, 255, 0 }, { 0, 255, 255 }, { 255, 255, 0 }, { 0, 0, 0 } } setTimer ( function ( ) r, g, b = unpack ( colores [ math.random ( #colores ) ] ) end ,2000, 0 ) addEventHandler("onClientResourceStart",resourceRoot,function() local elVehiculo = getPedOccupiedVehicle(getLocalPlayer()) setVehicleColor(elVehiculo,r,g,b) end ) no le veo nada malo.
  13. PLZ Reload the Arenas Link c:
  14. Alexs el comando es /abrircoches MODELO
  15. iFoReX

    Ayuda! :D

    usa un bindkey con el argumento Both que es para que se realize una accion solo cuando mantienes precionado un boton c:
  16. iFoReX

    LEVEL SYSTEM

    yo quiero es cuando suba e.e ?, in spanish plz, ademas, si no lo quieres asi, editalo tu, yo solo te correji algunos ends y comas
  17. iFoReX

    LEVEL SYSTEM

    Si te aconsejaria poner un mensaje cada vez que de spawn diciendo : , [server]Tu Nivel es : ..GetAccountData(bla,bla,bla) c:
  18. iFoReX

    LEVEL SYSTEM

    Ya paren el offtopic :3 sunlight tenes errores , ademas no entendi lo que quieres hacer, buee hay editalo a tu gusto. exports.scoreboard:addScoreboardColumn('Nivel') addEvent("onPlayerSpawn",true) addEventHandler("onPlayerSpawn",root, function() local account = getPlayerAccount(source) local experience = getAccountData(account,"experience") if (experience >= 0) and (experience <= 4) then setAccountData ( account, "Nivel", "1" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 5) and (experience <= 50) then setAccountData ( account, "Nivel", "2" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 99) and (experience <= 250) then setAccountData ( account, "Nivel", "3" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 300 and (experience <= 500) then setAccountData ( account, "Nivel", "4" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 700) and (experience <= 900) then setAccountData ( account, "Nivel", "5" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 999) and (experience <= 1500) then setAccountData ( account, "Nivel", "6" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 1700) and (experience <= 1900) then setAccountData ( account, "Nivel", "7" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 2100) and (experience <= 2500) then setAccountData ( account, "Nivel", "8" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 3100) and (experience <= 3600) then setAccountData ( account, "Nivel", "9" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 4000) and (experience <= 4800) then setAccountData ( account, "Nivel", "10" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 5250) and (experience <= 5900) then setAccountData ( account, "Nivel", "11" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 6593) and (experiences <= 6900) then setAccountData ( account, "Nivel", "12" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 7400) and (experience <= 8000) then setAccountData ( account, "Nivel", "13" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 8799) and (experience <= 9100) then setAccountData ( account, "Nivel", "14" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 9101) and (experience <= 9500) then setAccountData ( account, "Nivel", "15" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL SIGUE ASI!!", source, 255, 255, 255, true ) elseif (experience >= 10000) and (experience<= 15000) then setAccountData ( account, "Nivel", "16" ) outputChatBox ( "#FF0000FELICIDADES HAS SUBIDO DE NIVEL HAS LLEGADO AL MAX (POR AHORA >!", source, 255, 255, 255, true ) end end ) setTimer( function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local Nivel = getAccountData(account,"Nivel") if Nivel then setElementData(source,"Nivel", Nivel) end end end 500,0) algo asi
  19. Si, y tambien cancelar en BindKey 'F7', y el evento para clickearlo.
  20. iFoReX

    Correr

    lo probe y me saco el mta ._. xDD
×
×
  • Create New...