seanny Posted February 23, 2011 Share Posted February 23, 2011 I need help I dont know what to do =========================================================== = Multi Theft Auto: San Andreas v1.0.4 =========================================================== = Server name : Super Cool - Role play = Server IP address: = Server port : 22003 = = Log file : ..eas2/server/mods/deathmatch/logs/server.log = Maximum players : 120 = MTU packet size : 1264 = HTTP port : 22005 =========================================================== [2011-02-23 19:30:04] ERROR: Couldn't find meta.xml file for resource 'mabako-mta-paradise-6d4a852' [2011-02-23 19:30:04] Loading of resource 'mabako-mta-paradise-6d4a852' failed [2011-02-23 19:30:11] Resources: 210 loaded, 0 failed [2011-02-23 19:30:11] Querying game-monitor.com master server... success! [2011-02-23 19:30:12] MODULE: Loaded "MySQL 5.0 database module" (0.41) by "Alberto Alonso <[email protected]>" [2011-02-23 19:30:12] MODULE: Loaded "SHA Module" (1.02) by "mabako" [2011-02-23 19:30:12] Starting resources.... [2011-02-23 19:30:13] ERROR: Unable to start resource sql; Start up of resource cancelled by script [2011-02-23 19:30:13] ERROR: Unable to start resource irc; Start up of resource cancelled by script [2011-02-23 19:30:14] ERROR: Unable to start resource players; Start up of resource cancelled by script [2011-02-23 19:30:15] ERROR: Unable to start resource vehicles; Start up of resource cancelled by script [2011-02-23 19:30:16] ERROR: Unable to start resource interiors; Start up of resource cancelled by script [2011-02-23 19:30:19] ERROR: Unable to start resource items; Start up of resource cancelled by script [2011-02-23 19:30:37] ERROR: Unable to start resource shops; Start up of resource cancelled by script [2011-02-23 19:30:53] ERROR: Unable to start resource maps; Start up of resource cancelled by script [2011-02-23 19:30:53] ERROR: Unable to start resource teleports; Start up of resource cancelled by script [2011-02-23 19:31:07] ERROR: Unable to start resource bank; Start up of resource cancelled by script [2011-02-23 19:31:10] ERROR: Unable to start resource factions; Start up of resource cancelled by script [2011-02-23 19:31:11] ERROR: Unable to start resource 3dtext; Start up of resource cancelled by script [2011-02-23 19:31:11] Server started and is ready to accept connections! [2011-02-23 19:31:11] _ _ _ [2011-02-23 19:31:11] | | | (_) [2011-02-23 19:31:11] _ __ ___ | |_ __ _ _ __ __ _ _ __ __ _ __| |_ ___ ___ [2011-02-23 19:31:11] | '_ ` _ \| __/ _` | | '_ \ / _` | '__/ _` |/ _` | / __|/ _ \ [2011-02-23 19:31:11] | | | | | | || (_| | | |_) | (_| | | | (_| | (_| | \__ \ __/ [2011-02-23 19:31:11] |_| |_| |_|\__\__,_| | .__/ \__,_|_| \__,_|\__,_|_|___/\___| [2011-02-23 19:31:11] | | [2011-02-23 19:31:11] |_| v1.00 [2011-02-23 19:31:11] Server stopped! [2011-02-23 19:31:11] Stopping resources................... [2011-02-23 19:31:14] Closing SQLite3 database [2011-02-23 19:31:14] Closing SQLite3 database Link to comment
Michcio Posted February 24, 2011 Share Posted February 24, 2011 You haven't got connection with your MYSQL database. Show us your sql resource and we will help you. Link to comment
seanny Posted February 24, 2011 Author Share Posted February 24, 2011 You haven't got connection with your MYSQL database. Show us your sql resource and we will help you. I dont know what to show so Ill show the acl.xml 1. acl.xml <acl> <group name="Everyone"> <acl name="Default" /> <object name="user.*" /> <object name="resource.*" /> </group> <group name="Admin"> <acl name="Admin" /> <acl name="Moderator" /> <acl name="RPC" /> <object name="resource.admin" /> <object name="user.seanny" /> </group> <group name="Moderator"> <acl name="Moderator" /> </group> <group name="Console"> <acl name="Admin" /> <acl name="RPC" /> <acl name="Developer" /> <object name="user.Console" /> </group> <group name="RPC"> <acl name="RPC" /> <object name="resource.world" /> </group> <group name="sql"> <acl name="sql" /> <object name="resource.sql" /> </group> <group name="manageAccounts"> <acl name="manageAccounts" /> <acl name="IPandSerial" /> <object name="resource.players" /> </group> <group name="kickban"> <acl name="kickban" /> <acl name="IPandSerial" /> <object name="resource.parasite" /> <object name="resource.players" /> </group> <group name="IPandSerial"> <acl name="IPandSerial" /> <object name="resource.runcode" /> </group> <group name="Developer"> <acl name="Developer" /> <object name="user.mabako" /> </group> <acl name="Default"> <right name="general.ModifyOtherObjects" access="false" /> <right name="general.http" access="false" /> <right name="command.start" access="false" /> <right name="command.startall" access="false" /> <right name="command.stop" access="false" /> <right name="command.stopall" access="false" /> <right name="command.restart" access="false" /> <right name="command.restartall" access="false" /> <right name="command.refresh" access="false" /> <right name="command.refreshall" access="false" /> <right name="command.addaccount" access="false" /> <right name="command.delaccount" access="false" /> <right name="command.debugscript" access="false" /> <right name="command.chgpass" access="false" /> <right name="command.loadmodule" access="false" /> <right name="command.login" access="false" /> <right name="command.logout" access="false" /> <right name="command.upgrade" access="false" /> <right name="command.mute" access="false" /> <right name="command.unmute" access="false" /> <right name="command.kick" access="false" /> <right name="command.ban" access="false" /> <right name="command.banip" access="false" /> <right name="command.unbanip" access="false" /> <right name="command.shutdown" access="false" /> <right name="command.install" access="false" /> <right name="command.aexec" access="false" /> <right name="command.whois" access="false" /> <right name="command.whowas" access="false" /> <right name="command.run" access="false" /> <right name="command.srun" access="false" /> <right name="command.crun" access="false" /> <right name="function.executeCommandHandler" access="false" /> <right name="function.setPlayerMuted" access="false" /> <right name="function.addAccount" access="false" /> <right name="function.addBan" access="false" /> <right name="function.removeBan" access="false" /> <right name="function.removeAccount" access="false" /> <right name="function.setAccountPassword" access="false" /> <right name="function.kickPlayer" access="false" /> <right name="function.banIP" access="false" /> <right name="function.banPlayer" access="false" /> <right name="function.banSerial" access="false" /> <right name="function.getBansXML" access="false" /> <right name="function.unbanIP" access="false" /> <right name="function.unbanSerial" access="false" /> <right name="function.getClientIP" access="false" /> <right name="function.setServerPassword" access="false" /> <right name="function.getServerPassword" access="false" /> <right name="function.callRemote" access="false" /> <right name="function.startResource" access="false" /> <right name="function.stopResource" access="false" /> <right name="function.restartResource" access="false" /> <right name="function.createResource" access="false" /> <right name="function.copyResource" access="false" /> <right name="function.addResourceMap" access="false" /> <right name="function.addResourceConfig" access="false" /> <right name="function.removeResourceFile" access="false" /> <right name="function.setResourceDefaultSetting" access="false" /> <right name="function.removeResourceDefaultSetting" access="false" /> <right name="function.redirectPlayer" access="false" /> <right name="function.aclReload" access="false" /> <right name="function.aclSave" access="false" /> <right name="function.aclCreate" access="false" /> <right name="function.aclDestroy" access="false" /> <right name="function.aclSetRight" access="false" /> <right name="function.aclRemoveRight" access="false" /> <right name="function.aclCreateGroup" access="false" /> <right name="function.aclDestroyGroup" access="false" /> <right name="function.aclGroupAddACL" access="false" /> <right name="function.aclGroupRemoveACL" access="false" /> <right name="function.aclGroupAddObject" access="false" /> <right name="function.aclGroupRemoveObject" access="false" /> <right name="function.mysql_connect" access="false" /> <right name="function.mysql_close" access="false" /> <right name="function.mysql_errno" access="false" /> <right name="function.mysql_error" access="false" /> <right name="function.mysql_ping" access="false" /> <right name="function.mysql_select_db" access="false" /> <right name="function.mysql_escape_string" access="false" /> <right name="function.mysql_affected_rows" access="false" /> <right name="function.mysql_change_user" access="false" /> <right name="function.mysql_get_character_set_info" access="false" /> <right name="function.mysql_get_client_info" access="false" /> <right name="function.mysql_get_client_version" access="false" /> <right name="function.mysql_get_host_info" access="false" /> <right name="function.mysql_get_proto_info" access="false" /> <right name="function.mysql_get_server_info" access="false" /> <right name="function.mysql_get_server_version" access="false" /> <right name="function.mysql_hex_string" access="false" /> <right name="function.mysql_info" access="false" /> <right name="function.mysql_insert_id" access="false" /> <right name="function.mysql_query" access="false" /> <right name="function.mysql_unbuffered_query" access="false" /> <right name="function.mysql_set_character_set" access="false" /> <right name="function.mysql_stat" access="false" /> <right name="function.mysql_warning_count" access="false" /> </acl> <acl name="Moderator"> <right name="command.repairvehicle" access="true" /> <right name="command.repairvehicles" access="true" /> <right name="command.fillvehicle" access="true" /> <right name="command.fillvehicles" access="true" /> <right name="command.respawnvehicle" access="true" /> <right name="command.respawnvehicles" access="true" /> <right name="command.getvehicle" access="true" /> <right name="command.gotovehicle" access="true" /> <right name="command.temporaryvehicle" access="true" /> <right name="command.setskin" access="true" /> <right name="command.get" access="true" /> <right name="command.goto" access="true" /> <right name="command.announce" access="true" /> <right name="command.modchat" access="true" /> <right name="command.createshop" access="true" /> <right name="command.deleteshop" access="true" /> <right name="command.setdropoff" access="true" /> <right name="command.kick" access="true" /> <right name="command.setname" access="true" /> <right name="command.freeze" access="true" /> <right name="command.sethealth" access="true" /> <right name="command.setvehiclecolor" access="true" /> <right name="command.giveitem" access="true" /> <right name="command.freecam" access="true" /> <right name="command.spectate" access="true" /> <right name="command.getpos" access="true" /> <right name="command.toggleooc" access="true" /> <right name="command.staffduty" access="true" /> <right name="command.acceptreport" access="true" /> </acl> <acl name="Admin"> <right name="general.ModifyOtherObjects" access="true" /> <right name="general.http" access="true" /> <right name="command.start" access="true" /> <right name="command.startall" access="true" /> <right name="command.stop" access="true" /> <right name="command.stopall" access="true" /> <right name="command.restart" access="true" /> <right name="command.restartall" access="true" /> <right name="command.refresh" access="true" /> <right name="command.refreshall" access="true" /> <right name="command.addaccount" access="true" /> <right name="command.delaccount" access="true" /> <right name="command.ban" access="true" /> <right name="command.banip" access="true" /> <right name="command.unbanip" access="true" /> <right name="command.shutdown" access="true" /> <right name="command.whois" access="true" /> <right name="command.whowas" access="true" /> <right name="command.createinterior" access="true" /> <right name="command.deleteinterior" access="true" /> <right name="command.setinterior" access="true" /> <right name="command.setinteriorinside" access="true" /> <right name="command.setinteriorname" access="true" /> <right name="command.setinteriorprice" access="true" /> <right name="command.createvehicle" access="true" /> <right name="command.setwindowstinted" access="true" /> <right name="command.setvehiclefaction" access="true" /> <right name="command.reloadpermissions" access="true" /> <right name="command.adminchat" access="true" /> <right name="command.createteleport" access="true" /> <right name="command.deleteteleport" access="true" /> <right name="command.createatm" access="true" /> <right name="command.createbank" access="true" /> <right name="command.deleteatm" access="true" /> <right name="command.deletebank" access="true" /> <right name="command.createfaction" access="true" /> <right name="command.setfaction" access="true" /> <right name="command.setfactionrights" access="true" /> <right name="command.setfactionrank" access="true" /> <right name="command.createtext" access="true" /> <right name="command.deletetext" access="true" /> <right name="command.createfuelpoint" access="true" /> <right name="function.executeCommandHandler" access="true" /> <right name="function.setPlayerMuted" access="true" /> <right name="function.addAccount" access="true" /> <right name="function.addBan" access="true" /> <right name="function.removeBan" access="true" /> <right name="function.removeAccount" access="true" /> <right name="function.setAccountPassword" access="true" /> <right name="function.kickPlayer" access="true" /> <right name="function.banIP" access="true" /> <right name="function.banPlayer" access="true" /> <right name="function.banSerial" access="true" /> <right name="function.getBansXML" access="true" /> <right name="function.unbanIP" access="true" /> <right name="function.unbanSerial" access="true" /> <right name="function.getClientIP" access="true" /> <right name="function.setServerPassword" access="true" /> <right name="function.getServerPassword" access="true" /> <right name="function.callRemote" access="true" /> <right name="function.startResource" access="true" /> <right name="function.stopResource" access="true" /> <right name="function.restartResource" access="true" /> <right name="function.createResource" access="true" /> <right name="function.copyResource" access="true" /> <right name="function.addResourceMap" access="true" /> <right name="function.addResourceConfig" access="true" /> <right name="function.removeResourceFile" access="true" /> <right name="function.setResourceDefaultSetting" access="true" /> <right name="function.removeResourceDefaultSetting" access="true" /> <right name="function.redirectPlayer" access="true" /> <right name="function.aclReload" access="true" /> Link to comment
Michcio Posted February 24, 2011 Share Posted February 24, 2011 "Everyone"> "Default" /> "user.*" /> "resource.*" /> "Admin"> "Admin" /> "Moderator" /> "RPC" /> "resource.admin" /> "user.seanny" /> "Moderator"> "Moderator" /> "Console"> "Admin" /> "RPC" /> "Developer" /> "user.Console" /> "RPC"> "RPC" /> "resource.world" /> "sql"> "sql" /> "resource.sql" /> "manageAccounts"> "manageAccounts" /> "IPandSerial" /> "resource.players" /> "kickban"> "kickban" /> "IPandSerial" /> "resource.parasite" /> "resource.players" /> "IPandSerial"> "IPandSerial" /> "resource.runcode" /> "Developer"> "Developer" /> "user.mabako" /> "Default"> "general.ModifyOtherObjects" access="false" /> "general.http" access="false" /> "command.start" access="false" /> "command.startall" access="false" /> "command.stop" access="false" /> "command.stopall" access="false" /> "command.restart" access="false" /> "command.restartall" access="false" /> "command.refresh" access="false" /> "command.refreshall" access="false" /> "command.addaccount" access="false" /> "command.delaccount" access="false" /> "command.debugscript" access="false" /> "command.chgpass" access="false" /> "command.loadmodule" access="false" /> "command.login" access="false" /> "command.logout" access="false" /> "command.upgrade" access="false" /> "command.mute" access="false" /> "command.unmute" access="false" /> "command.kick" access="false" /> "command.ban" access="false" /> "command.banip" access="false" /> "command.unbanip" access="false" /> "command.shutdown" access="false" /> "command.install" access="false" /> "command.aexec" access="false" /> "command.whois" access="false" /> "command.whowas" access="false" /> "command.run" access="false" /> "command.srun" access="false" /> "command.crun" access="false" /> "function.executeCommandHandler" access="false" /> "function.setPlayerMuted" access="false" /> "function.addAccount" access="false" /> "function.addBan" access="false" /> "function.removeBan" access="false" /> "function.removeAccount" access="false" /> "function.setAccountPassword" access="false" /> "function.kickPlayer" access="false" /> "function.banIP" access="false" /> "function.banPlayer" access="false" /> "function.banSerial" access="false" /> "function.getBansXML" access="false" /> "function.unbanIP" access="false" /> "function.unbanSerial" access="false" /> "function.getClientIP" access="false" /> "function.setServerPassword" access="false" /> "function.getServerPassword" access="false" /> "function.callRemote" access="false" /> "function.startResource" access="false" /> "function.stopResource" access="false" /> "function.restartResource" access="false" /> "function.createResource" access="false" /> "function.copyResource" access="false" /> "function.addResourceMap" access="false" /> "function.addResourceConfig" access="false" /> "function.removeResourceFile" access="false" /> "function.setResourceDefaultSetting" access="false" /> "function.removeResourceDefaultSetting" access="false" /> "function.redirectPlayer" access="false" /> "function.aclReload" access="false" /> "function.aclSave" access="false" /> "function.aclCreate" access="false" /> "function.aclDestroy" access="false" /> "function.aclSetRight" access="false" /> "function.aclRemoveRight" access="false" /> "function.aclCreateGroup" access="false" /> "function.aclDestroyGroup" access="false" /> "function.aclGroupAddACL" access="false" /> "function.aclGroupRemoveACL" access="false" /> "function.aclGroupAddObject" access="false" /> "function.aclGroupRemoveObject" access="false" /> "function.mysql_connect" access="false" /> "function.mysql_close" access="false" /> "function.mysql_errno" access="false" /> "function.mysql_error" access="false" /> "function.mysql_ping" access="false" /> "function.mysql_select_db" access="false" /> "function.mysql_escape_string" access="false" /> "function.mysql_affected_rows" access="false" /> "function.mysql_change_user" access="false" /> "function.mysql_get_character_set_info" access="false" /> "function.mysql_get_client_info" access="false" /> "function.mysql_get_client_version" access="false" /> "function.mysql_get_host_info" access="false" /> "function.mysql_get_proto_info" access="false" /> "function.mysql_get_server_info" access="false" /> "function.mysql_get_server_version" access="false" /> "function.mysql_hex_string" access="false" /> "function.mysql_info" access="false" /> "function.mysql_insert_id" access="false" /> "function.mysql_query" access="false" /> "function.mysql_unbuffered_query" access="false" /> "function.mysql_set_character_set" access="false" /> "function.mysql_stat" access="false" /> "function.mysql_warning_count" access="false" /> "Moderator"> "command.repairvehicle" access="true" /> "command.repairvehicles" access="true" /> "command.fillvehicle" access="true" /> "command.fillvehicles" access="true" /> "command.respawnvehicle" access="true" /> "command.respawnvehicles" access="true" /> "command.getvehicle" access="true" /> "command.gotovehicle" access="true" /> "command.temporaryvehicle" access="true" /> "command.setskin" access="true" /> "command.get" access="true" /> "command.goto" access="true" /> "command.announce" access="true" /> "command.modchat" access="true" /> "command.createshop" access="true" /> "command.deleteshop" access="true" /> "command.setdropoff" access="true" /> "command.kick" access="true" /> "command.setname" access="true" /> "command.freeze" access="true" /> "command.sethealth" access="true" /> "command.setvehiclecolor" access="true" /> "command.giveitem" access="true" /> "command.freecam" access="true" /> "command.spectate" access="true" /> "command.getpos" access="true" /> "command.toggleooc" access="true" /> "command.staffduty" access="true" /> "command.acceptreport" access="true" /> "Admin"> "general.ModifyOtherObjects" access="true" /> "general.http" access="true" /> "command.start" access="true" /> "command.startall" access="true" /> "command.stop" access="true" /> "command.stopall" access="true" /> "command.restart" access="true" /> "command.restartall" access="true" /> "command.refresh" access="true" /> "command.refreshall" access="true" /> "command.addaccount" access="true" /> "command.delaccount" access="true" /> "command.ban" access="true" /> "command.banip" access="true" /> "command.unbanip" access="true" /> "command.shutdown" access="false" /> "command.whois" access="true" /> "command.whowas" access="true" /> "command.createinterior" access="true" /> "command.deleteinterior" access="true" /> "command.setinterior" access="true" /> "command.setinteriorinside" access="true" /> "command.setinteriorname" access="true" /> "command.setinteriorprice" access="true" /> "command.createvehicle" access="true" /> "command.setwindowstinted" access="true" /> "command.setvehiclefaction" access="true" /> "command.reloadpermissions" access="true" /> "command.adminchat" access="true" /> "command.createteleport" access="true" /> "command.deleteteleport" access="true" /> "command.createatm" access="true" /> "command.createbank" access="true" /> "command.deleteatm" access="true" /> "command.deletebank" access="true" /> "command.createfaction" access="true" /> "command.setfaction" access="true" /> "command.setfactionrights" access="true" /> "command.setfactionrank" access="true" /> "command.createtext" access="true" /> "command.deletetext" access="true" /> "command.createfuelpoint" access="true" /> "function.executeCommandHandler" access="true" /> "function.setPlayerMuted" access="true" /> "function.addAccount" access="true" /> "function.addBan" access="true" /> "function.removeBan" access="true" /> "function.removeAccount" access="true" /> "function.setAccountPassword" access="true" /> "function.kickPlayer" access="true" /> "function.banIP" access="true" /> "function.banPlayer" access="true" /> "function.banSerial" access="true" /> "function.getBansXML" access="true" /> "function.unbanIP" access="true" /> "function.unbanSerial" access="true" /> "function.getClientIP" access="true" /> "function.setServerPassword" access="true" /> "function.getServerPassword" access="true" /> "function.callRemote" access="true" /> "function.startResource" access="true" /> "function.stopResource" access="true" /> "function.restartResource" access="true" /> "function.createResource" access="true" /> "function.copyResource" access="true" /> "function.addResourceMap" access="true" /> "function.addResourceConfig" access="true" /> "function.removeResourceFile" access="true" /> "function.setResourceDefaultSetting" access="true" /> "function.removeResourceDefaultSetting" access="true" /> "function.redirectPlayer" access="true" /> "function.aclReload" access="true" /> "function.aclSave" access="true" /> "function.aclCreate" access="true" /> "function.aclDestroy" access="true" /> "function.aclSetRight" access="true" /> "function.aclRemoveRight" access="true" /> "function.aclCreateGroup" access="true" /> "function.aclDestroyGroup" access="true" /> "function.aclGroupAddACL" access="true" /> "function.aclGroupRemoveACL" access="true" /> "function.aclGroupAddObject" access="true" /> "function.aclGroupRemoveObject" access="true" /> "Developer"> "general.WillNotBeAfkKicked" access="true" /> "command.srun" access="true" /> "command.crun" access="true" /> "command.debugscript" access="true" /> "command.reloadacl" access="true" /> "command.reloadpermissions" access="true" /> "command.addmap" access="true" /> "command.removemap" access="true" /> "command.setmapdimension" access="true" /> "RPC"> "function.callRemote" access="true" /> "sql"> "function.mysql_connect" access="true" /> "function.mysql_close" access="true" /> "function.mysql_errno" access="true" /> "function.mysql_error" access="true" /> "function.mysql_ping" access="true" /> "function.mysql_select_db" access="true" /> "function.mysql_escape_string" access="true" /> "function.mysql_affected_rows" access="true" /> "function.mysql_change_user" access="true" /> "function.mysql_get_character_set_info" access="true" /> "function.mysql_get_client_info" access="true" /> "function.mysql_get_client_version" access="true" /> "function.mysql_get_host_info" access="true" /> "function.mysql_get_proto_info" access="true" /> "function.mysql_get_server_info" access="true" /> "function.mysql_get_server_version" access="true" /> "function.mysql_hex_string" access="true" /> "function.mysql_info" access="true" /> "function.mysql_insert_id" access="true" /> "function.mysql_query" access="true" /> "function.mysql_unbuffered_query" access="true" /> "function.mysql_set_character_set" access="true" /> "function.mysql_stat" access="true" /> "function.mysql_warning_count" access="true" /> "function.shutdown" access="false" /> "manageAccounts"> "function.aclGroupAddObject" access="true" /> "function.aclSave" access="true" /> "function.aclGroupRemoveObject" access="true" /> "function.addAccount" access="true" /> "function.setAccountPassword" access="true" /> "function.removeAccount" access="true" /> "kickban"> "function.kickPlayer" access="true" /> "function.addBan" access="true" /> "function.banPlayer" access="true" /> "IPandSerial"> "function.getClientIP" access="true" /> "function.getPlayerSerial" access="true" /> Try like that and check your sql resource (file mysql.lua) and show it. Link to comment
seanny Posted February 24, 2011 Author Share Posted February 24, 2011 I found this one in C:\Program Files\MTA San Andreas2\server\mods\deathmatch\resources\sql --[[ 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 Link to comment
Michcio Posted February 24, 2011 Share Posted February 24, 2011 --[[ 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 "write here your host or when it is local then write localhost" local user = get( "user" ) or "here write your username to your database" local password = get( "password" ) or "here password to your mysql database" local db = get( "database" ) or "here name of your 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 == "and here your username to database" 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 Do you have a mysql database? Link to comment
seanny Posted February 24, 2011 Author Share Posted February 24, 2011 in C:\Program Files\MTA San Andreas2\server\mods\deathmatch\resources\sql I have: Layout.lua Meta.xml mysql.lua does that mean I have MySQL Database? Link to comment
Michcio Posted February 24, 2011 Share Posted February 24, 2011 no you must buy mysql database or install it on computer/server. Link to comment
seanny Posted February 24, 2011 Author Share Posted February 24, 2011 I cant buy stuff as i got no credit card Link to comment
12p Posted February 24, 2011 Share Posted February 24, 2011 Then learn how to script and don't use Paradise Roleplay. Link to comment
seanny Posted February 24, 2011 Author Share Posted February 24, 2011 Why not paradise roleplay? Link to comment
12p Posted February 24, 2011 Share Posted February 24, 2011 You don't even know how it works. How do you expect to make a RP server without knowing how it works??? What if you find an error? FAIL! Link to comment
seanny Posted February 24, 2011 Author Share Posted February 24, 2011 ok then so no role play server for me Link to comment
12p Posted February 24, 2011 Share Posted February 24, 2011 Why people is so LAZY? Try, at least, to make a roleplay script by yourself. Link to comment
seanny Posted February 25, 2011 Author Share Posted February 25, 2011 I Can not script Link to comment
Moderators Citizen Posted February 25, 2011 Moderators Share Posted February 25, 2011 Stop crying seanny ^^, You can learn to script easier but you need some help for starting. Make a new folder in your resources folder ( seany for exemple ) Then with notepad++ create a new empty page. Paste this in your new page: function onGamemodInit() -- The instructions when the server started createVehicle( 522, 10, 10, 5 ) -- create a NRG-500 at the coordinates 10, 10, 5 end addEventHandler("onResourceStart", getRootElement(), onGamemodInit ) function OnPlayerJoin ( ) local thePlayer = source -- The source is the player who's joining the game local playername = getPlayerName( thePlayer ) -- we get his Name outputChatBox( "INFO: "..playername.." has joined the game", getRootElement(), 0, 180, 0 ) -- getRootElement() it's the same as "every players" outputChatBox( "Welcome"..playername.." !", thePlayer, 0, 180, 0 ) spawnPlayer( thePlayer, 0, 0, 3, 270)-- We spawn the player in the middle of the GTA's map fadeCamera( thePlayer, true ) setCameraTarget( thePlayer ) -- We set the camera like in single player end addEventHandler("onPlayerJoin", getRootElement(), OnPlayerJoin ) --Execute OnPlayerJoin () when a player joining the game Then save it in your seanny folder like this: seanny.lua After, you have to create a meta.xml: <?xml version="1.0" encoding="utf-8"?> <meta> <info author="Seanny" type="gamemode" name="" description="" /> <script src="seanny.lua" type="server" /> </meta> And save it. Now lunch MTA Server.exe wait a moment and you will see that your new resource is loaded. To lunch it, you have to stop freeroam if he is lunched as default: in the MTA Server, tape: stop freeroam Then he is stopped, lunch your resource like this: start seanny Then you can enter in your server by clicking on "Quick Connect" and enter in Host: 127.0.0.1 Port: 22003 And click on Connect. You have just made your own server on MTA Now you can add other things. When I started, I copy-paste the exemple of some functions and I modified it Server-Functions I have learn the lua only like that. Enjoy ! Link to comment
InDev Posted February 26, 2011 Share Posted February 26, 2011 Or, https://wiki.multitheftauto.com/wiki/Scr ... troduction Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now