I guess the last thing I PM'd you should fix it.
addCommandHandler("log",
function ( thePlayer, command, value1, value2 )
local query;
if ( value1 and value2 ) then
query = exports["Main-system"]:clean_query ( "SELECT `AccountId`, `AccountPassword`, `AccountUsername` FROM `Accounts` WHERE `AccountPassword` = '".. mysql_escape_string ( db, value1 ) .."' AND `AccountUsername` = '".. mysql_escape_string ( db, value2 ) .."'" );
elseif ( value1 and not value2 ) then
query = exports["Main-system"]:clean_query ( "SELECT `AccountId`, `AccountPassword`, `AccountUsername` FROM `Accounts` WHERE `AccountPassword` = '".. value1 .."' and `AccountUsername` = '".. getPlayerName ( thePlayer ) .."'" );
else
outputChatBox ( "Wrong usage: /log [] ", thePlayer );
return;
end
if ( query > 0) then
local row = query[1]
setElementData ( thePlayer, "loggedin", true );
setElementData ( thePlayer, "accountid", row["AccountId"] );
spawnPlayer ( source, 1686, -2334, 14 );
fadeCamera ( source, true );
setCameraTarget ( source, source );
else
outputChatBox ( "nopes", thePlayer );
return;
end
end
);