X-SHADOW Posted March 29, 2013 Share Posted March 29, 2013 Hello i have A GameMode but it's on SQL who do i set SQL so the gamemod works ? and the SQL on the hosted server or the gameMode files ? If there is an Example or video for SQL Setup show me please Thank's Link to comment
Castillo Posted March 29, 2013 Share Posted March 29, 2013 Of what game mode are you talking about? Link to comment
X-SHADOW Posted March 29, 2013 Author Share Posted March 29, 2013 it's GangWars By Jayz the Group system it's on SQL and also the functions how to Work on SQL ? Link to comment
X-SHADOW Posted March 30, 2013 Author Share Posted March 30, 2013 is this SQL Or MySQL ? local connection = executeSQLQuery ( "CREATE TABLE IF NOT EXISTS gangs ( gangName TEXT, leader TEXT, color TEXT )" ) --[[ GANG SYSTEM ]] local cost = 20000 local maxStr = 20 function gangIsLeader ( uPlayer, uTeam ) local select = executeSQLQuery ( "SELECT leader FROM gangs WHERE gangName = '" .. uTeam .. "' " ); if ( select[1]["leader"] == uPlayer ) then return true; else return false; end end function gangSetLeader ( uTeam, uPlayer ) executeSQLQuery ( "UPDATE gangs SET leader = '" .. uPlayer .. "' WHERE gangName = '" .. uTeam .. "' ") return true end Link to comment
iPrestege Posted March 30, 2013 Share Posted March 30, 2013 https://wiki.multitheftauto.com/wiki/Mysql Link to comment
X-SHADOW Posted March 30, 2013 Author Share Posted March 30, 2013 lol it's hard i wont do it lol , Link to comment
iPrestege Posted March 30, 2013 Share Posted March 30, 2013 Hmm...Try to learn with this tut : https://forum.multitheftauto.com/viewtopic.php?f=148&t=38203 Link to comment
Castillo Posted March 30, 2013 Share Posted March 30, 2013 is this SQL Or MySQL ? local connection = executeSQLQuery ( "CREATE TABLE IF NOT EXISTS gangs ( gangName TEXT, leader TEXT, color TEXT )" ) --[[ GANG SYSTEM ]] local cost = 20000 local maxStr = 20 function gangIsLeader ( uPlayer, uTeam ) local select = executeSQLQuery ( "SELECT leader FROM gangs WHERE gangName = '" .. uTeam .. "' " ); if ( select[1]["leader"] == uPlayer ) then return true; else return false; end end function gangSetLeader ( uTeam, uPlayer ) executeSQLQuery ( "UPDATE gangs SET leader = '" .. uPlayer .. "' WHERE gangName = '" .. uTeam .. "' ") return true end That'S SQL. 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