SQL BASIERTES SMARTPHONE FÜR 4.4 UND 4.4 R4
Upgedated von Alaskavet , Basis Code von Silex
Hallo, heute mache ich mal was ganz schmackhaftes, was viele von euch kennen und lieben gelernt haben.
Dann fangen wir mal an.
CLIENT PART:
Öffnet eure "configuration.sqf" und fügt dort, wo die life_variables sind, das hier ein:
In der "CfgRemoteExec.hpp", fügt das hier ein:
Dann geht in die "Functions.hpp" und fügt das hier unter der class "Player_Menu" ein:
Öffnet eure "Masterhandler.hpp", diese findet ihr im "dialog" Ordner und fügt das ein:
Dann geht in die "player_inv.hpp" im "dialog" Ordner, sucht nach "ButtonCell" und ersetzt diesen Event "onButtonClick" mit diesem hier:
Erstellt im "dialog" Ordner eine neue Datei namens "smartphone.hpp" und fügt das hier ein:
class Life_my_smartphone {
idd = 88888;
name = "life_my_telephone_menu";
movingEnable = false;
enableSimulation = true;
onLoad = "[] spawn life_fnc_smartphone;";
class controlsBackground {
class Life_RscTitleBackground:Life_RscText {
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.95;
h = (1 / 25);
};
class MainBackground:Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.95;
h = 0.7 - (22 / 250);
};
class PlayerListTitleBackground:Life_RscText {
colorBackground[] = {0.588, 0.424, 0.145, 1.0};
idc = -1;
x = 0.11;
y = 0.25;
w = 0.2;
h = (1 / 25);
};
class MessageTitleBackground:Life_RscText {
colorBackground[] = {0.588, 0.424, 0.145, 1.0};
idc = -1;
x = 0.325;
y = 0.25;
w = 0.7;
h = (1 / 25);
};
class RandomTitleBackground:Life_RscText {
colorBackground[] = {0.588, 0.424, 0.145, 1.0};
idc = -1;
x = 0.325;
y = 0.25 + 0.3 + (1 / 25);
w = 0.7;
h = (1 / 25);
};
};
class controls {
class MessageTitle : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 88886;
text = "";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
x = 0.325;
y = 0.25;
w = 0.7;
h = (1 / 25);
};
class RandomTitle : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 88890;
text = "$STR_SMARTPHONE_RANDOMTITLE";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
x = 0.325;
y = 0.25 + 0.3 + (1 / 25);
w = 0.7;
h = (1 / 25);
};
class PlayerList : Life_RscListBox {
idc = 88881;
onLBSelChanged = "[2] spawn life_fnc_smartphone;";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
x = 0.11;
y = 0.25 + (1 / 25);
w = 0.2;
h = 0.5;
};
class MessageList : Life_RscListNBox {
idc = 88882;
onLBSelChanged = "[(lbCurSel 88882)] call life_fnc_showMsg;";
//sizeEx = 0.04;
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
colorBackground[] = {0, 0, 0, 0.0};
columns[] = {0,0.3};
x = 0.325;
y = 0.25 + (1 / 25);
w = 0.7;
h = 0.3;
};
class TextShow : Life_RscControlsGroup {
x = 0.325;
y = 0.25 + 0.3 + (1 / 25) + (1 / 25);
w = 0.7;
h = 0.15;
class HScrollbar : HScrollbar {
height = 0;
};
class controls {
class showText : Life_RscStructuredText {
idc = 88887;
text = "";
colorBackground[] = {0.28,0.28,0.28,0.28};
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
shadow = 0;
x = 0;
y = 0;
w = 0.69;//w = 0.7;
h = 1;//h = 2.15;
};
};
};
class Schreiben : Life_RscButtonMenu {
idc = 887892;
text = "$STR_SMARTPHONE_SCHREIBEN";
onButtonClick = "[4] call life_fnc_smartphone;";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1.0};
x = 0.11;
y = 0.25 + (1 / 25) + 0.51;
w = 0.2;
h = (1 / 25);
};
class Title : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = -1;
text = "$STR_SMARTPHONE_TITLE";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
x = 0.1;
y = 0.2;
w = 0.95;
h = (1 / 25);
};
class PlayerListTitle : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = -1;
text = "$STR_SMARTPHONE_PLAYERLISTTITLE";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
x = 0.11;
y = 0.25;
w = 0.2;
h = (1 / 25);
};
class CloseLoadMenu : Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
y = 0.9 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
class Notruf : Life_RscButtonMenu {
idc = -1;
text = "$STR_SMARTPHONE_NOTRUF";
onButtonClick = "createDialog ""Life_smartphone_notruf"";";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
x = 0.325 + 0.7 - (6.25 / 40);
y = 0.25 + (1 / 25) + 0.51;
w = (6.25 / 40);
h = (1 / 25);
};
};
};
class Life_smartphone_schreiben{
idd = 88883;
name = "life_my_smartphone_schreiben";
movingEnable = false;
enableSimulation = true;
onLoad = "";
class controlsBackground {
class Life_RscTitleBackground:Life_RscText {
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.6;
h = (1 / 25);
};
class MainBackground:Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.6;
h = 0.1;
};
};
class controls {
class Title : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 88886;
text = "$STR_SMARTPHONE_NACHRICHTTITLE";
x = 0.1;
y = 0.2;
w = 0.95;
h = (1 / 25);
};
class Absenden : Life_RscButtonMenu {
idc = 88885;
text = "$STR_SMARTPHONE_ABSENDEN";
onButtonClick = "[1,-1,(ctrlText 88884)] call life_fnc_newMsg;";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1.0};
x = 0.6 - (6.25 / 40) + 0.088;
y = 0.3 + (1 / 25) - 0.048;
w = (6.25 / 40);
h = (1 / 25);
};
class AdminMsg : life_RscButtonMenu
{
idc = 888897;
text = "$STR_CELL_AdminMsg";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1.0};
onButtonClick = "[5,-1,(ctrlText 88884)] call life_fnc_newMsg;";
x = 0.6 - (6.25 / 40) - 0.121;
y = 0.3 + (1 / 25) - 0.048;
w = 0.2;
h = (1 / 25);
};
class Close : Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
x = 0.11;
y = 0.3 + (1 / 25) - 0.048;
w = (6.25 / 40);
h = (1 / 25);
};
class textEdit : Life_RscEdit {
idc = 88884;
text = "";
sizeEx = 0.030;
x = 0.11; y = 0.3 - 0.048;
w = 0.58; h = 0.03;
};
};
};
class Life_smartphone_notruf {
idd = 887890;
name= "life_my_smartphone_notruf";
movingEnable = false;
enableSimulation = true;
onLoad = "[6] spawn life_fnc_newMsg;";
class controlsBackground {
class Life_RscTitleBackground:Life_RscText {
colorBackground[] = {0.584, 0.086, 0.086,1.0};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.64;
h = (1 / 25);
};
class MainBackground:Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.64;
h = 0.15 - (5 / 250);
};
};
class controls {
class Title : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 888892;
text = "$STR_SMARTPHONE_Notruftitle";
x = 0.1;
y = 0.2;
w = 0.6;
h = (1 / 25);
};
class textEdit : Life_RscEdit {
idc = 888894;
text = "";
sizeEx = 0.030;
x = 0.11; y = 0.25;
w = 0.62; h = 0.03;
};
class TxtCopButton : life_RscButtonMenu
{
idc = 888895;
text = "$STR_CELL_TextPolice";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[2,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.32;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class TxtAdminButton : life_RscButtonMenu
{
idc = 888896;
text = "$STR_CELL_TextAdmins";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[3,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.53;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class AdminMsgAll : life_RscButtonMenu
{
idc = 888898;
text = "$STR_CELL_AdminMSGAll";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[7,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.53;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class EMSReq : life_RscButtonMenu
{
idc = 888899;
text = "$STR_CELL_EMSRequest";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[4,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.11;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class CloseButton : Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
y = 0.36 + (1 / 50);
w = (6.25 / 40);
h = (1 / 25);
};
};
};
Alles anzeigen
Öffnet dann eure "stringtable.xml" und fügt eine neue Package ein:
<Package name="Smartphone">
<Key ID="STR_PM_Smartphone">
<Original>Smartphone</Original>
</Key>
<Key ID="STR_SMARTPHONE_TITLE">
<Original>Smartphone Menu</Original>
</Key>
<Key ID="STR_SMARTPHONE_PLAYERLISTTITLE">
<Original>List of Players</Original>
</Key>
<Key ID="STR_SMARTPHONE_MESSAGETITLE">
<Original>New Message</Original>
</Key>
<Key ID="STR_SMARTPHONE_RANDOMTITLE">
<Original>Select a message to read</Original>
</Key>
<Key ID="STR_SMARTPHONE_SCHREIBEN">
<Original>Write</Original>
</Key>
<Key ID="STR_SMARTPHONE_NOTRUF">
<Original>Emergency call</Original>
</Key>
<Key ID="STR_SMARTPHONE_Absenden">
<Original>Send</Original>
</Key>
<Key ID="STR_SMARTPHONE_NACHRICHTTITLE">
<Original>Message:</Original>
</Key>
<Key ID="STR_SMARTPHONE_Notruftitle">
<Original>CALLS EMERGENCY | Abuse leads to BAN!</Original>
</Key>
</Package>
Alles anzeigen
Geht dann in den Ordner "core\pmenu" und erstellt 3 neue Dateien:
"fn_newMsg.sqf" , "fn_smartphone.sqf" , fn_showMsg.sqf
1. fn_newMsg.sqf
#include "..\..\script_macros.hpp"
/*
file: fn_newMsg.sqf
Author: Silex
*/
private["_to","_type","_playerData","_msg"];
disableSerialization;
_type = [_this,0,-1] call BIS_fnc_param;
_playerData = [_this,1,-1] call BIS_fnc_param;
_msg = [_this,2,"",[""]] call BIS_fnc_param;
_display = findDisplay 88888;
_cPlayerList = _display displayCtrl 88881;
_cMessageEdit = _display displayCtrl 88884;
switch(_type) do{
case 0: {
life_smartphoneTarget = call compile format["%1",_playerData];
ctrlSetText[88886, format["message: %1",name life_smartphoneTarget]];
if((FETCH_CONST(life_adminlevel) < 1)) then {
ctrlShow[888897,false];
};
};
//normal message
case 1: {
if(isNUll life_smartphoneTarget) exitWith {hint format["No person selected!"];
};
ctrlShow[88885, false];
if(_msg == "") exitWith {hint "You must enter a message to be sent!";
ctrlShow[88885, true];
};
[life_smartphoneTarget,_msg,player,0] remoteExec ["TON_fnc_handleMessages",2];
hint format["You sent %1 a message: %2",name life_smartphoneTarget,_msg];
ctrlShow[88885, true];
closeDialog 88883;
};
//copmessage
case 2: { if(({side _x == west} count playableUnits) == 0) exitWith {hint format["The police is currently inaccessible. Please try again later."];
};
ctrlShow[888895,false];
if(_msg == "") exitWith {hint "You must enter a message to be sent!";
ctrlShow[888895,true];
};
[ObjNull,_msg,player,1] remoteExec ["TON_fnc_handleMessages",2];
_to = "Police";
hint format["You sent %1 a message: %2",_to,_msg];
ctrlShow[888895,true];
closeDialog 887890;
};
//msgadmin
case 3: { ctrlShow[888896,false];
if(_msg == "") exitWith {hint "You must enter a message to be sent!";
ctrlShow[888896,true];
};
[ObjNull,_msg,player,2] remoteExec ["TON_fnc_handleMessages",2];
_to = "The Admins";
hint format["You sent %1 a message: %2",_to,_msg];
ctrlShow[888896,true];
closeDialog 887890;
};
//emsrequest
case 4: { if(({side _x == independent} count playableUnits) == 0) exitWith {hint format["Currently there is no EMS on duty . Please try again later."];
};
ctrlShow[888899,false];
if(_msg == "") exitWith {hint "You must enter a message to be sent!";
ctrlShow[888899,true];
};
[ObjNull,_msg,player,3] remoteExec ["TON_fnc_handleMessages",2];
hint format["You have sent a message to all EMS units.",_msg];
ctrlShow[888899,true];
closeDialog 887890;
};
//adminToPerson
case 5: { if((call life_adminlevel) < 1) exitWith {hint "You are not an admin!";
};
if(isNULL life_smartphoneTarget) exitWith {hint format["No person selected!"];
};
if(_msg == "") exitWith {hint "You must enter a message to be sent!";
};
[life_smartphoneTarget,_msg,player,4] remoteExec ["TON_fnc_handleMessages",2];
hint format["Administrator Message sent: %1 - Message: %2",name life_smartphoneTarget,_msg];
closeDialog 88883;
};
//emergencyloading
case 6: { if((FETCH_CONST(life_adminlevel) < 1)) then {
ctrlShow[888898,false];
ctrlShow[888896,true];
} else {
ctrlShow[888898,true];
ctrlShow[888896,false];
};
};
//adminMsgAll
case 7: { if((FETCH_CONST(life_adminlevel) < 1)) exitWith {hint "You are not an admin!";
};
if(_msg == "") exitWith {hint "You must enter a message to be sent!";
};
[ObjNull,_msg,player,5] remoteExec ["TON_fnc_handleMessages",2];
hint format["A message sent to all admins: %1",_msg];
closeDialog 887890;
};
};
Alles anzeigen
2. fn_smartphone.sqf
#include "..\..\script_macros.hpp"
/* file: fn_smartphone.sqf Author: Silex */
private["_display","_units","_type","_data","_rowData","_msg"];
_type = [_this,0,0] call BIS_fnc_param;
_data = [_this,1,0,["",[],0]] call BIS_fnc_param;
disableSerialization;
waitUntil {!isNull findDisplay 88888};
_display = findDisplay 88888;
_cPlayerList = _display displayCtrl 88881;
_cMessageList = _display displayCtrl 88882;
_cMessageHeader = _display displayCtrl 88886;
_cMessageHeader ctrlSetText format["Message's From:Players:"];
ctrlEnable[887892,false];
switch(_type) do{
case 0: { lbClear _cPlayerList;
{if(alive _x && _x != player) then {
switch(side _x) do
{
case west: {_type = "Cop"};
case civilian: {_type = "Civ"};
case independent: {_type = "Med"};
};
_cPlayerList lbAdd format["%1 (%2)",_x getVariable["realname", name _x],_type];
_cPlayerList lbSetData [(lbSize _cPlayerList)-1,str(_x)];
};
} forEach playableUnits;
[getPlayerUID player, player] remoteExec ["TON_fnc_msgRequest",2];
ctrlEnable[887892,false];
};
case 1: { _msg = [_data select 2,40] call KRON_StrLeft;
_rowData = [_data select 0, _data select 1, _data select 2, _data select 3];
_cMessageList lnbAddRow[_data select 3,format["%1 ...",_msg]];
_cMessageList lnbSetData[[((lnbSize _cMessageList) select 0)-1,0],str(_rowData)];
};
case 2: { ctrlEnable[887892,true];
_target = lbData[88881,(lbCurSel 88881)];
life_smartphoneTarget = call compile format["%1",_target];
};
case 4: {
createDialog "Life_smartphone_schreiben";
ctrlSetText[88886, format["Message: %1",name life_smartphoneTarget]];
if((FETCH_CONST(life_adminlevel) < 1)) then {
ctrlShow[888897,false];
};
};
};
Alles anzeigen
3. fn_showMsg.sqf
#include "..\..\script_macros.hpp"
/*
file: fn_showMsg.sqf
Author: Silex
*/
private["_index", "_data", "_status"];
_index = [_this, 0, 0] call BIS_fnc_param;
disableSerialization;
waitUntil {
!isNull findDisplay 88888
};
_display = findDisplay 88888;
_cMessageList = _display displayCtrl 88882;
_cMessageShow = _display displayCtrl 88887;
_cMessageHeader = _display displayCtrl 88890;
_data = call compile(_cMessageList lnbData[_index, 0]);
_status = "[OFFLINE]"; {
if (getPlayerUID _x == _data select 0) then {
_status = "[ONLINE]";
life_smartphoneTarget = _x;
ctrlEnable[887892, true];
};
}
forEach playableUnits;
_cMessageHeader ctrlSetText format["%1 %2 written:", _data select 3, _status];
_cMessageShow ctrlSetText format["%1", _data select 2];
Alles anzeigen
LIFE_SERVER PART:
Öffnet eure "config.cpp" und sucht nach der class "TON_system", unter diesem class fügt eine weitere class hinzu:
class Smartphone
{
file = "\life_server\Functions\Smartphone";
class handleMessages {};
class msgRequest {};
};
Geh in den "Functions" Ordner und erstelle einen Ordner namens "Smartphone", in diesem Ordner erstellt 2 Dateien:
"fn_handleMessages.sqf" , "fn_msgRequest.sqf"
1. fn_handleMessages.sqf
/* file: fn_handleMessages.sqf Author: Silex*/
private["_msg","_to","_target","_player","_type"];
_target = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
_msg = [_this,1,"",[""]] call BIS_fnc_param;
_player = [_this,2,ObjNull,[ObjNull]] call BIS_fnc_param;
_type = [_this,3,-1] call BIS_fnc_param;
switch(_type) do{ //normal message
case 0: { if(isNULL _target) exitWith {};
_to = call compile format["%1", _target];
[_msg,name _player,0] remoteExec ["TON_fnc_clientMessage",_to];
private["_query","_pid","_toID"];
_pid = getPlayerUID _player;
_toID = getPlayerUID _target;
_msg = [_msg] call DB_fnc_mresString;
_fromName = name _player;
_toName = name _target;
_query = format["INSERT INTO messages (fromID, toID, message, fromName, toName) VALUES('%1', '%2', '""%3""', '%4', '%5')",_pid,_toID,_msg,_fromName,_toName];
diag_log format["Query: %1",_query];
waitUntil{!DB_Async_Active};
[_query,1] call DB_fnc_asyncCall;
};
//message to cops
case 1: {
[_msg,name _player,1] remoteExec ["TON_fnc_clientMessage",west];
};
//to admins
case 2: {
[_msg,name _player,2] remoteExec ["TON_fnc_clientMessage",0];
};
//ems request
case 3: {
[_msg,name _player,5] remoteExec ["TON_fnc_clientMessage",independent];
};
//adminToPerson
case 4: { _to = call compile format["%1", _target];
if(isNull _to) exitWith {};
[_msg,name _player,3] remoteExec ["TON_fnc_clientMessage",_to];
};
//adminMsgAll
case 5: {[_msg,name _player,4] remoteExec ["TON_fnc_clientMessage",0];
};
};
Alles anzeigen
2. fn_msgRequest.sqf
/* file: fn_msgRequest.sqf
Author: Silex
Fills the Messagelist
*/
private["_query", "_queryResult", "_uid", "_player"];
_uid = [_this, 0, "", [""]] call BIS_fnc_param;
_player = [_this, 1, ObjNull, [ObjNull]] call BIS_fnc_param;
_query = format["SELECT fromID, toID, message, fromName, toName FROM messages WHERE toID='%1' ORDER BY time DESC", _uid];
waitUntil {
!DB_Async_Active
};
_queryResult = [_query, 2, true] call DB_fnc_asyncCall;
if (count _queryResult == 0) exitWith {}; {
[1, _x] remoteExec["life_fnc_smartphone", _player];
}
forEach _queryResult;
_queryResult = [_query,2,true] call DB_fnc_asyncCall;
if(count _queryResult == 0) exitWith {};
{[1,_x] remoteExec ["life_fnc_smartphone",_player];
}forEach _queryResult;
Alles anzeigen
Erstellt nun eine neue Datei auf dem Desktop namens "smartphone.sql" und fügt folgendes ein:
CREATE TABLE IF NOT EXISTS `messages` (
`uid` int(12) NOT NULL AUTO_INCREMENT,
`fromID` varchar(50) NOT NULL,
`toID` varchar(50) NOT NULL,
`message` text,
`fromName` varchar(32) NOT NULL,
`toName` varchar(32) NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Nun führt ihr diese Datei in eurer Datenbank aus und schon habt ihr die Tabelle "messages".
FERTIG!
Falls ihr irgendwelche Fragen habt, stellt Sie mir einfach