Teams = {
{ 'Grove Street' , 0, 128 , 0 , 'True' },
{ 'Ballas' , 128, 0, 128 , 'True' },
{ 'Vagos' , 255, 200, 0 , 'True' },
{ 'Aztecas' , 0, 128, 255 , 'True' },
{ 'Doctor' , 24, 198, 238 , 'True' },
{ 'Police', 0, 0, 255 , 'True' },
{ 'Criminal' , 255, 0, 0 , 'False' }
}
function OutPut ( aElement_ , aText_ )
exports['guimessages']:outputServer( aElement_, aText_ )
end
executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aAccountss___ ( AccountName , AccountPassword , Serial , Year , Month , Day )' )
executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS SaveMoney ( Accont, Money )' )
addEventHandler( 'onPlayerQuit', root,
function( )
local Account = getPlayerAccount( source )
if ( Account and isGuestAccount( Account ) ) then
local SQL = executeSQLQuery( 'SELECT * FROM SaveMoney WHERE Accont = ? ', getAccountName( Account ) )
if ( SQL ~= -1 ) then
executeSQLQuery( 'UPDATE SaveMoney SET Money = ? WHERE Accont = ? ', getElementData( source, 'Money' ), getAccountName( Account ) )
else
executeSQLQuery ( 'INSERT INTO SaveMoney VALUES ( ? , ? )', getAccountName( Account ), getElementData( source, 'Money' ) )
end
end
end )
addEventHandler("onPlayerSpawn", root,
function()
local CriminalTeam = getTeamFromName("Criminal")
if (CriminalTeam) then
setTeamFriendlyFire(CriminalTeam, true)
end
end)
for aTeams in ipairs ( Teams ) do
aTeam_ = createTeam ( Teams[aTeams][1] , Teams[aTeams][2] , Teams[aTeams][3], Teams[aTeams][4] )
if ( Teams[aTeams][5] == 'True' ) then setTeamFriendlyFire ( aTeam_ , false ) end
end