#include <a_samp>
#include <a_mysql>
#include <md5>
#include <ocmd>
#define SQL_HOST "127.0.0.1"
#define SQL_NAME "root"
#define SQL_DATA "samp"
new Text:Watermark;
new Handle;
new Connection;
new JailDoor[12];
new JailDoorOpen = true;
forward SQL_Connect(ip[], name[], pass[], data[]);
forward SQL_CheckAccount(playerid);
forward SQL_CheckPassword(playerid);
forward SQL_LoadAccount(playerid);
forward SQL_SaveAccount(playerid);
forward SQL_LoadSpawnGuns(playerid);
forward SpawnOfficer(playerid);
forward SpawnPrisoner(playerid);
forward Payday();
forward SpawnInJail(playerid);
forward OpenJails(playerid);
forward CentralMenu(playerid);
new CopSkins[] =
{
280,
281,
282,
283,
288,
284,
285,
286
};
new PrisonerSkins[] =
{
95,
107,
110,
116,
125,
254,
268,
260
};
enum pPlayerInfo
{
Confirmed,
Time,
CopSkin,
PrisonerSkin,
Officer,
PaydayTime,
Upgrade,
Level,
Money,
Skin,
SkinCount,
Melee,
Pistol,
InJail,
Armor
};
new pInfo[MAX_PLAYERS][pPlayerInfo];
enum pJailInfo
{
Started,
Time,
Players,
Prisoners,
Officers
};
new pJail[pJailInfo];
enum
{
DIALOG_REGISTER,
DIALOG_LOGIN,
DIALOG_WELCOME,
DIALOG_TEAM,
DIALOG_COPCLOTHES,
DIALOG_WEAPONS,
DIALOG_LOADING,
DIALOG_HANDWEAPS,
DIALOG_CENTRAL,
DIALOG_MELEEWEAPS,
DIALOG_ARMORWEAPS
};
main(){}
new Float:CopBaseSpawn[][] =
{
{280.5527,171.3673,1007.1719,322.5851},
{287.2065,169.0052,1007.1719,359.6632},
{290.5421,168.8926,1007.1719,359.6632},
{296.0088,172.7228,1007.1719,49.6926}
};
new Float:PrisonerBaseSpawn[][] =
{
{1726.8997,-1670.5448,22.6151,14.9442},
{1730.8209,-1666.3082,22.6094,69.5372},
{1728.5966,-1668.8352,22.6094,43.1126},
{1728.1583,-1644.2771,20.2268,133.9800}
};
new Float:CopSpawnJail[][] =
{
{194.3630,-179.2462,1.5752,324.9875},
{194.2906,-176.8384,1.5752,324.9875},
{196.4540,-176.4042,1.5752,324.9875},
{198.0299,-177.7151,1.5752,324.9875},
{198.5843,-180.2222,1.5752,324.9875},
{198.7825,-182.4286,1.5752,324.9875},
{199.0525,-185.0829,1.5752,324.9875},
{199.7361,-186.8750,1.5752,324.9875}
};
new Float:PrisonerSpawnJail[][] =
{
{172.0425,-94.4443,1.5752,180.1199},
{172.5921,-120.7576,1.5752,357.9266},
{195.5302,-120.7284,1.5752,0.7059},
{195.2871,-94.6067,1.5752,178.8259},
{195.7892,-94.9398,4.8965,168.3409},
{172.0609,-95.2879,4.8965,179.7428},
{158.9294,-107.5369,4.8965,269.4614},
{172.2350,-120.0110,4.8965,357.7817},
{208.9480,-107.5774,4.8965,85.6376},
{195.4874,-120.6410,4.8965,0.4740}
};
new Float:DoorPos[][] =
{
{173.5996100,-119.5996100,0.3000000,90.0000000,179.9950000,270.0000000},
{172.2300000,-119.6000000,0.3000000,90.0000000,0.0000000,270.0000000},
{170.9500000,-119.6000000,0.3000000,90.0000000,0.0000000,270.0000000},
{196.8000000,-119.6000000,0.3000000,90.0000000,179.9950000,270.0000000},
{196.8000000,-95.6000000,0.3000000,90.0000000,179.9950000,270.0000000},
{194.1300000,-119.6000000,0.3000000,90.0000000,0.0000000,270.0000000},
{195.5000000,-119.5996100,0.3000000,90.0000000,179.9950000,270.0000000},
{195.5000000,-95.6000000,0.3000000,90.0000000,179.9950000,270.0000000},
{170.8999900,-95.6000000,0.3000000,90.0000000,0.0000000,270.0000000},
{194.0996100,-95.5996100,0.3000000,90.0000000,0.0000000,270.0000000},
{172.2000000,-95.6000000,0.3000000,90.0000000,0.0000000,270.0000000},
{173.6000100,-95.6000000,0.3000000,90.0000000,180.0000000,270.0000000}
};
public OnGameModeInit()
{
DisableInteriorEnterExits();
SetNameTagDrawDistance(30.0);
ShowPlayerMarkers(PLAYER_MARKERS_MODE_OFF);
SQL_Connect(SQL_HOST, SQL_NAME, SQL_PASS, SQL_DATA);
SetGameModeText("German Prison Break");
AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0);
Watermark = TextDrawCreate(522.000000, 4.000000, "German ~r~Prison Break");
TextDrawBackgroundColor(Watermark, 255);
TextDrawFont(Watermark, 2);
TextDrawLetterSize(Watermark, 0.240000, 1.399999);
TextDrawColor(Watermark, -1);
TextDrawSetOutline(Watermark, 0);
TextDrawSetProportional(Watermark, 1);
TextDrawSetShadow(Watermark, 1);
SetTimer("Payday", 1000 * 60, true);
/* Cop Clothes */
CreatePickup(1275, 1, 254.4144, 190.5917, 1008.1719, -1);
Create3DTextLabel("Kleiderschrank (/kleidung)\nPreis: $1500", 0x0091FFFF, 254.4144, 190.5917, 1008.1719, 20.0, 0, 1);
/* Prisoner Clothes */
CreatePickup(1275, 1, 1712.3420,-1640.2197,20.2239, -1);
Create3DTextLabel("Kleiderschrank (/kleidung)\nPreis: $1500", 0x0091FFFF, 1712.3420,-1640.2197,20.2239, 20.0, 0, 1);
/* Waffenladen Cops */
CreatePickup(1247, 1, 268.2095,186.0142,1008.1719, -1);
Create3DTextLabel("Spawnequipment (/spawnequip)", 0xCC974DFF, 268.2095,186.0142,1008.1719, 20.0, 0, 1);
/* Jail Enter Cop */
CreatePickup(1318, 1, 238.7445,139.4836,1003.0234, -1);
Create3DTextLabel("Beitritt zum Gefängnis! (/enterjail)", 0x00A300FF, 238.7445,139.4836,1003.0234, 20.0, 0, 1);
/* Prisoner Enter Cop */
CreatePickup(1318, 1, 1701.3378,-1667.9337,20.2188, -1);
Create3DTextLabel("Beitritt zum Gefängnis! (/enterjail)", 0x00A300FF, 1701.3378, -1667.9337, 20.2188, 20.0, 0, 1);
/* Controlcenter - Jail */
CreatePickup(1239, 1, 220.5488,-174.4541,5.7925, 0);
Create3DTextLabel("Zentrale (/zentrale)", 0x0097FFFF, 220.5488,-174.4541,5.7925, 20.0, 0, 1);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(!Connection)
Kick(playerid);
new strQuery[256];
mysql_format(Handle, strQuery, sizeof(strQuery), "SELECT * FROM accounts WHERE name='%s' LIMIT 1", GetUsername(playerid));
mysql_tquery(Handle, strQuery, "SQL_CheckAccount", "i", playerid);
return 1;
}
public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid, 0xFFFFFFFF);
RemoveBuildingForPlayer(playerid, 13201, 207.8047, -191.8438, 0.5781, 0.25);
RemoveBuildingForPlayer(playerid, 13292, 166.6172, -106.5781, 4.4531, 0.25);
RemoveBuildingForPlayer(playerid, 13293, 201.0938, -106.5781, 4.4531, 0.25);
RemoveBuildingForPlayer(playerid, 13493, 224.4922, -68.2578, 5.3750, 0.25);
RemoveBuildingForPlayer(playerid, 1438, 206.3516, -162.6328, 0.5469, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 193.1172, -153.0000, 0.7031, 0.25);
RemoveBuildingForPlayer(playerid, 780, 204.9375, -157.5703, 0.8438, 0.25);
RemoveBuildingForPlayer(playerid, 1294, 185.7969, -138.8359, 5.0313, 0.25);
RemoveBuildingForPlayer(playerid, 700, 196.3438, -131.0313, 1.0391, 0.25);
RemoveBuildingForPlayer(playerid, 700, 154.7188, -129.1719, 1.1953, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 143.4531, -125.6563, 0.7031, 0.25);
RemoveBuildingForPlayer(playerid, 781, 164.7266, -130.1953, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 781, 176.9766, -131.1406, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 700, 149.3594, -120.8359, 1.0234, 0.25);
RemoveBuildingForPlayer(playerid, 1536, 207.5000, -113.1250, 3.8828, 0.25);
RemoveBuildingForPlayer(playerid, 1345, 196.7109, -121.4063, 1.2734, 0.25);
RemoveBuildingForPlayer(playerid, 781, 146.0625, -112.0391, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 1294, 224.4219, -173.9453, 5.0313, 0.25);
RemoveBuildingForPlayer(playerid, 773, 218.9063, -167.9922, 0.5391, 0.25);
RemoveBuildingForPlayer(playerid, 700, 209.5469, -131.1797, 1.0391, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 222.4766, -137.1250, 0.6172, 0.25);
RemoveBuildingForPlayer(playerid, 781, 220.6250, -134.5859, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 781, 220.6953, -124.3203, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 700, 209.7656, -123.0547, 1.0391, 0.25);
RemoveBuildingForPlayer(playerid, 1294, 224.4063, -112.0000, 5.0313, 0.25);
RemoveBuildingForPlayer(playerid, 12938, 201.0938, -106.5781, 4.4531, 0.25);
RemoveBuildingForPlayer(playerid, 12940, 166.6172, -106.5781, 4.4531, 0.25);
RemoveBuildingForPlayer(playerid, 955, 201.0156, -107.6172, 0.8984, 0.25);
RemoveBuildingForPlayer(playerid, 764, 186.4141, -107.2578, 0.7500, 0.25);
RemoveBuildingForPlayer(playerid, 766, 180.7734, -108.8047, 0.6484, 0.25);
RemoveBuildingForPlayer(playerid, 1294, 141.1953, -107.0078, 5.0313, 0.25);
RemoveBuildingForPlayer(playerid, 13450, 183.8516, -107.6094, 3.0391, 0.25);
RemoveBuildingForPlayer(playerid, 1345, 165.9219, -107.6328, 1.2734, 0.25);
RemoveBuildingForPlayer(playerid, 781, 220.9375, -107.3672, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 781, 146.4375, -102.9766, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 781, 221.0000, -97.1016, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 700, 147.8438, -95.6875, 1.0234, 0.25);
RemoveBuildingForPlayer(playerid, 1345, 182.9922, -93.6172, 1.2734, 0.25);
RemoveBuildingForPlayer(playerid, 1345, 171.4453, -93.4453, 1.2734, 0.25);
RemoveBuildingForPlayer(playerid, 700, 155.6797, -85.4375, 1.1953, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 222.8359, -86.1016, 0.7031, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 148.0469, -82.2422, 0.7031, 0.25);
RemoveBuildingForPlayer(playerid, 781, 165.1719, -82.9766, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 781, 175.6250, -82.8125, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 781, 188.7266, -83.0313, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 781, 201.8125, -83.2422, 0.4141, 0.25);
RemoveBuildingForPlayer(playerid, 1294, 166.4297, -80.2109, 5.0313, 0.25);
RemoveBuildingForPlayer(playerid, 1294, 208.0547, -80.2109, 5.0313, 0.25);
RemoveBuildingForPlayer(playerid, 13436, 252.3281, -28.8906, 9.1094, 0.25);
RemoveBuildingForPlayer(playerid, 1522, 201.9219, -201.5234, 0.5625, 0.25);
RemoveBuildingForPlayer(playerid, 1522, 204.9531, -201.5000, 0.5625, 0.25);
RemoveBuildingForPlayer(playerid, 13437, 210.9375, -245.1406, 10.0234, 0.25);
RemoveBuildingForPlayer(playerid, 12924, 207.8047, -191.8438, 0.5781, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 225.8516, -195.8125, 0.6172, 0.25);
RemoveBuildingForPlayer(playerid, 1688, 198.7266, -188.0781, 7.5703, 0.25);
RemoveBuildingForPlayer(playerid, 1691, 194.2188, -188.7813, 6.9766, 0.25);
RemoveBuildingForPlayer(playerid, 1687, 209.3750, -187.6172, 7.3828, 0.25);
RemoveBuildingForPlayer(playerid, 1440, 196.1953, -180.7969, 1.0625, 0.25);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SQL_SaveAccount(playerid);
pInfo[playerid][Confirmed] = false;
pInfo[playerid][Time] = false;
pInfo[playerid][CopSkin] = false;
pInfo[playerid][PrisonerSkin] = false;
pInfo[playerid][Officer] = false;
pInfo[playerid][PaydayTime] = false;
pInfo[playerid][Upgrade] = false;
pInfo[playerid][Level] = false;
pInfo[playerid][Money] = false;
pInfo[playerid][Skin] = false;
pInfo[playerid][SkinCount] = false;
pInfo[playerid][Melee] = false;
pInfo[playerid][Pistol] = false;
pInfo[playerid][InJail] = false;
pInfo[playerid][Armor] = false;
if(IsPlayerJailed(playerid))
{
new Temp[256];
pJail[Players]--;
if(IsPlayerPrisoner(playerid))
{
pJail[Prisoners]--;
format(Temp, sizeof(Temp), "{849CFF}** Gefangener %s hat das Spiel verlassen!", GetUsername(playerid));
}
else
{
format(Temp, sizeof(Temp), "{849CFF}** Wärter %s hat das Spiel verlassen!", GetUsername(playerid));
pJail[Officers]--;
}
SendClientMessageToAll(-1, Temp);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerLoggedIn(playerid))
{
if(pInfo[playerid][Officer])
SpawnOfficer(playerid);
else
SpawnPrisoner(playerid);
if(pInfo[playerid][InJail])
SpawnInJail(playerid);
}
else
{
Kick(playerid);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
new Temp[256];
if(IsPlayerPrisoner(playerid))
{
format(Temp, sizeof(Temp), "{FF6567}Gefangener %s:{FFFFFF} %s", GetUsername(playerid), text);
SendClientMessage(playerid, -1, Temp);
}
else
{
format(Temp, sizeof(Temp), "{008CFF}Wärter %s:{FFFFFF} %s", GetUsername(playerid), text);
SendClientMessage(playerid, -1, Temp);
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
ocmd:team(playerid, params[])
{
if(IsPlayerLoggedIn(playerid))
{
TogglePlayerSpectating(playerid, true);
InterpolateCameraPos(playerid, 223.138931, -209.686340, 32.131401, 234.480102, -81.005691, 31.686792, 10000);
InterpolateCameraLookAt(playerid, 220.834838, -206.901214, 28.676805, 230.885742, -83.180137, 28.975269, 10000);
for(new i = 0; i < 20; i++)
SendClientMessage(playerid, -1, " ");
new Temp[256];
format(Temp, sizeof(Temp), "{FFFFFF}Du musst nun auswählen in welchem Team du Spielen möchtest.\n");
ShowPlayerDialog(playerid, DIALOG_TEAM, DIALOG_STYLE_MSGBOX, "Wähle dein Team!", Temp, "{008CFF}Wärter", "{FF6567}Gefangener");
SetPlayerInterior(playerid, 0);
}
return 1;
}
ocmd:kleidung(playerid, params[])
{
if(IsPlayerLoggedIn(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 254.4144, 190.5917, 1008.1719) || IsPlayerInRangeOfPoint(playerid, 5.0, 1712.3420,-1640.2197,20.2239) )
{
if(pInfo[playerid][Money] >= 1500)
{
if(IsPlayerPrisoner(playerid))
{
SetPlayerPos(playerid, 1726.6606,-1639.7579,23.7191);
SetPlayerFacingAngle(playerid, 180);
SetPlayerCameraPos(playerid, 1726.6815,-1642.1686,24.7657);
SetPlayerCameraLookAt(playerid, 1726.6606,-1639.7579,23.7191, 0);
}
else
{
SetPlayerPos(playerid, 246.1158,186.0663,1008.1719);
SetPlayerFacingAngle(playerid, 360);
SetPlayerCameraPos(playerid, 246.0719,191.2205,1008.1719);
SetPlayerCameraLookAt(playerid, 246.1158,186.0663,1008.1719, 0);
}
TogglePlayerControllable(playerid, false);
CleanChat(playerid);
pInfo[playerid][Money] -= 1500;
RefreshMoney(playerid);
SendClientMessage(playerid, -1, "Verwende die {FFFF00}'Maustasten'{FFFFFF} um dir einen Skin auszusuchen!");
SendClientMessage(playerid, -1, "Mit {FFFF00}'ENTER'{FFFFFF} kannst du deine Auswahl bestätigen!");
pInfo[playerid][Skin] = true;
}
else
{
SendClientMessage(playerid, -1, "{FF6768}Du benötigst mindestens $1500!");
}
}
else
{
SendClientMessage(playerid, -1, "{FF6768}Du bist nicht in der nähe eines Kleiderschrank!");
}
}
return 1;
}
ocmd:spawnequip(playerid, params[])
{
if(IsPlayerLoggedIn(playerid))
{
if(!IsPlayerPrisoner(playerid))
{
new Temp[256];
format(Temp, sizeof(Temp), "Pistolen\nSchlagwaffen\nArmor", Temp);
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_TABLIST, "Spawnwaffen", Temp, "Bestätigen", "Beenden");
}
}
return 1;
}
ocmd:enterjail(playerid, params[])
{
if(IsPlayerLoggedIn(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 238.7445,139.4836,1003.0234) || IsPlayerInRangeOfPoint(playerid, 5.0, 1701.3378,-1667.9337,20.2188))
{
new Temp[256];
pInfo[playerid][InJail] = true;
SpawnInJail(playerid);
pJail[Players]++;
if(IsPlayerPrisoner(playerid))
{
pJail[Prisoners]++;
format(Temp, sizeof(Temp), "{B5EE00}** Spieler %s ist als Gefangener beigetreten!", GetUsername(playerid));
}
else
{
pJail[Officers]++;
format(Temp, sizeof(Temp), "{B5EE00}** Spieler %s ist als Wärter beigetreten!", GetUsername(playerid));
}
SendClientMessageToAll(-1, Temp);
}
else
{
SendClientMessage(playerid, -1, "{FF6768}Du befindest dich nicht in der nähe zum Einstieg in das Spiel!");
}
}
return 1;
}
ocmd:exitjail(playerid, params[])
{
if(IsPlayerLoggedIn(playerid))
{
if(IsPlayerJailed(playerid))
{
new Temp[256];
pInfo[playerid][InJail] = false;
pJail[Players]--;
if(IsPlayerPrisoner(playerid))
{
pJail[Prisoners]--;
format(Temp, sizeof(Temp), "{849CFF}** Gefangener %s hat das Spiel verlassen!", GetUsername(playerid));
SpawnPrisoner(playerid);
}
else
{
format(Temp, sizeof(Temp), "{849CFF}** Wärter %s hat das Spiel verlassen!", GetUsername(playerid));
pJail[Officers]--;
SpawnOfficer(playerid);
}
SendClientMessageToAll(-1, Temp);
}
else
{
SendClientMessage(playerid, -1, "{FF6768}Du bist nicht im Gefängnis und kannst es nicht verlassen!");
}
}
return 1;
}
ocmd:zentrale(playerid, params[])
{
CentralMenu(playerid);
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(pInfo[playerid][Skin])
{
if(newkeys & KEY_FIRE && pInfo[playerid][SkinCount] <= 6)
pInfo[playerid][SkinCount]++;
if(newkeys & KEY_HANDBRAKE && pInfo[playerid][SkinCount] >= 0)
pInfo[playerid][SkinCount]--;
if(newkeys & KEY_SECONDARY_ATTACK)
{
pInfo[playerid][Skin] = false;
SpawnPlayer(playerid);
if(IsPlayerPrisoner(playerid))
pInfo[playerid][PrisonerSkin] = PrisonerSkins[pInfo[playerid][SkinCount]];
else
pInfo[playerid][CopSkin] = CopSkins[pInfo[playerid][SkinCount]];
}
if(IsPlayerPrisoner(playerid))
SetPlayerSkin(playerid, PrisonerSkins[pInfo[playerid][SkinCount]]);
else
SetPlayerSkin(playerid, CopSkins[pInfo[playerid][SkinCount]]);
}
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_REGISTER)
{
if(response)
{
if(strlen(inputtext) >= 6)
{
new strQuery[256];
mysql_format(Handle, strQuery, sizeof(strQuery), "INSERT INTO accounts (name, password, level, money) VALUES ('%e', '%e', '%i', '%i')", GetUsername(playerid), MD5_Hash(inputtext), 1, 30000);
mysql_tquery(Handle, strQuery, "", "");
mysql_format(Handle, strQuery, sizeof(strQuery), "SELECT * FROM accounts WHERE name='%e' AND password='%e' LIMIT 1", GetUsername(playerid), MD5_Hash(inputtext));
mysql_tquery(Handle, strQuery, "SQL_CheckPassword", "i", playerid);
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Erfolgreich!", "{FFFFFF}Du hast dir erfolgreich einen Account erstellt!", "Weiter", "");
}
else
{
SendClientMessage(playerid, -1, "{FF6768}Dein Passwort muss mindestens 6. Zeichen lang sein!");
new Temp[256];
format(Temp, sizeof(Temp), "{FFFFFF}Unser System konnte {FF6768}keinen{FFFFFF} Account mit deinem Namen finden.\n");
format(Temp, sizeof(Temp), "%sGib ein Passwort an und drücke anschließend auf {FFFF00}'Weiter'{FFFFFF} um einen Account zu erstellen.", Temp);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration", Temp, "Weiter", "Beenden");
}
}
else
{
Kick(playerid);
}
}
if(dialogid == DIALOG_LOGIN)
{
if(response)
{
new strQuery[256];
mysql_format(Handle, strQuery, sizeof(strQuery), "SELECT * FROM accounts WHERE name='%e' AND password='%e' LIMIT 1", GetUsername(playerid), MD5_Hash(inputtext));
mysql_tquery(Handle, strQuery, "SQL_CheckPassword", "i", playerid);
}
else
{
Kick(playerid);
}
}
if(dialogid == DIALOG_TEAM)
{
if(response)
{
if(pInfo[playerid][Time] >= 30)
{
TogglePlayerSpectating(playerid, false);
StopAudioStreamForPlayer(playerid);
pInfo[playerid][Officer] = true;
SpawnPlayer(playerid);
SpawnOfficer(playerid);
SendClientMessage(playerid, -1, "{6C98FF}Du bist nun ein Wärter, bereite dich auf deinen Einsatz vor!");
}
else
{
new Temp[256];
format(Temp, sizeof(Temp), "{FFFFFF}Du musst nun auswählen in welchem Team du Spielen möchtest.\n");
ShowPlayerDialog(playerid, DIALOG_TEAM, DIALOG_STYLE_MSGBOX, "Wähle dein Team!", Temp, "{008CFF}Wärter", "{FF6567}Gefangener");
format(Temp, sizeof(Temp), "{FF6768}Um als Wärter spielen zu können, benötigst du mindestens 30. Spielminuten!");
SendClientMessage(playerid, -1, Temp);
}
}
else
{
TogglePlayerSpectating(playerid, false);
StopAudioStreamForPlayer(playerid);
pInfo[playerid][Officer] = false;
SpawnPlayer(playerid);
SpawnPrisoner(playerid);
SendClientMessage(playerid, -1, "{6C98FF}Du bist nun ein Gefangener, bereite dich auf das Gefängnis vor!");
}
}
if(dialogid == DIALOG_WEAPONS)
{
if(response)
{
if(listitem == 0)
{
new Temp[256];
format(Temp, sizeof(Temp), "Waffe\tPreis\tLevel\n");
if(pInfo[playerid][Pistol] == 22)
format(Temp, sizeof(Temp), "%s{FFFF00}Standart Pistole\t$5000\t3{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sStandart Pistole\t$5000\t3\n", Temp);
if(pInfo[playerid][Pistol] == 23)
format(Temp, sizeof(Temp), "%s{FFFF00}Schalldämpfer Pistole\t$10000\t6{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sSchalldämpfer Pistole\t$10000\t6\n", Temp);
if(pInfo[playerid][Pistol] == 24)
format(Temp, sizeof(Temp), "%s{FFFF00}Desert Eagle\t$15000\t12{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sDesert Eagle\t$15000\t12\n", Temp);
ShowPlayerDialog(playerid, DIALOG_HANDWEAPS, DIALOG_STYLE_TABLIST_HEADERS, "Pistolen", Temp, "Auswählen", "Beenden");
}
if(listitem == 1)
{
new Temp[256];
format(Temp, sizeof(Temp), "Waffe\tPreis\tLevel\n");
if(pInfo[playerid][Melee] == 2)
format(Temp, sizeof(Temp), "%s{FFFF00}Golfschläger\t$1000\t3{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sGolfschläger\t$1000\t3\n", Temp);
if(pInfo[playerid][Melee] == 3)
format(Temp, sizeof(Temp), "%s{FFFF00}Schlagstock\t$1200\t6{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sSchlagstock\t$1200\t6\n", Temp);
if(pInfo[playerid][Melee] == 6)
format(Temp, sizeof(Temp), "%s{FFFF00}Schaufel\t$1300\t12{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sSchaufel\t$1300\t12\n", Temp);
ShowPlayerDialog(playerid, DIALOG_MELEEWEAPS, DIALOG_STYLE_TABLIST_HEADERS, "Schlagwaffen", Temp, "Auswählen", "Beenden");
}
if(listitem == 2)
{
new Temp[256];
format(Temp, sizeof(Temp), "Wert\tPreis\tLevel\n");
if(pInfo[playerid][Armor] == 25)
format(Temp, sizeof(Temp), "%s{FFFF00}Schutzweste auf 25 Prozent\t$5000\t3{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sSchutzweste auf 25 Prozent\t$5000\t3\n", Temp);
if(pInfo[playerid][Armor] == 70)
format(Temp, sizeof(Temp), "%s{FFFF00}Schutzweste auf 70 Prozent\t$10000\t6{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sSchutzweste auf 70 Prozent\t$10000\t6\n", Temp);
if(pInfo[playerid][Armor] == 100)
format(Temp, sizeof(Temp), "%s{FFFF00}Schutzweste auf 100 Prozent\t$15000\t12{FFFFFF}\n", Temp);
else
format(Temp, sizeof(Temp), "%sSchutzweste auf 100 Prozent\t$15000\t12\n", Temp);
ShowPlayerDialog(playerid, DIALOG_ARMORWEAPS, DIALOG_STYLE_TABLIST_HEADERS, "Schutzwesten", Temp, "Auswählen", "Beenden");
}
}
}
if(dialogid == DIALOG_HANDWEAPS)
{
if(response)
{
if(listitem == 0)
{
if(pInfo[playerid][Level] >= 3)
SetPistolWeapon(playerid, 22, 5000, "Du hast dir die normalen Pistolen geholt!");
}
if(listitem == 1)
{
if(pInfo[playerid][Level] >= 6)
SetPistolWeapon(playerid, 23, 10000, "Du hast dir die Schalldämpfer Pistole geholt!");
}
if(listitem == 2)
{
if(pInfo[playerid][Level] >= 12)
SetPistolWeapon(playerid, 24, 15000, "Du hast dir die Desert Eagle geholt!");
}
}
}
if(dialogid == DIALOG_MELEEWEAPS)
{
if(response)
{
if(listitem == 0)
{
if(pInfo[playerid][Level] >= 3)
SetMeleeWeapon(playerid, 2, 1000, "Du hast dir einen Golfschläger gekauft!");
}
if(listitem == 1)
{
if(pInfo[playerid][Level] >= 6)
SetMeleeWeapon(playerid, 3, 1100, "Du hast dir einen Schlagstock gekauft!");
}
if(listitem == 2)
{
if(pInfo[playerid][Level] >= 12)
SetMeleeWeapon(playerid, 6, 1000, "Du hast dir eine Schaufel gekauft!");
}
}
}
if(dialogid == DIALOG_ARMORWEAPS)
{
if(response)
{
if(listitem == 0)
{
if(pInfo[playerid][Level] >= 3)
SetArmorPlayer(playerid, 25, 1000, "Du hast dir 25 prozent Schutzweste gekauft!");
}
if(listitem == 1)
{
if(pInfo[playerid][Level] >= 6)
SetArmorPlayer(playerid, 70, 10000, "Du hast dir 70 prozent Schutzweste gekauft!");
}
if(listitem == 2)
{
if(pInfo[playerid][Level] >= 12)
SetArmorPlayer(playerid, 100, 15000, "Du hast dir 100 prozent Schutzweste gekauft!");
}
}
}
if(dialogid == DIALOG_CENTRAL)
{
if(response)
{
if(listitem == 0)
{
OpenJails(playerid);
CentralMenu(playerid);
}
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
stock GetUsername(playerid)
{
new Temp[32];
GetPlayerName(playerid, Temp, sizeof(Temp));
return Temp;
}
stock IsPlayerLoggedIn(playerid)
{
if(pInfo[playerid][Confirmed])
return true;
else
return false;
}
stock RefreshMoney(playerid)
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, pInfo[playerid][Money]);
return 1;
}
stock CleanChat(playerid)
{
for(new i = 0; i < 20; i++)
{
SendClientMessage(playerid, -1, " ");
}
return 1;
}
stock IsPlayerPrisoner(playerid)
{
if(pInfo[playerid][Officer])
return false;
else
return true;
}
stock SpawnPlayerCorrect(playerid, Float:x, Float:y, Float:z, Float:angle)
{
SetPlayerPos(playerid, x, y, z);
SetPlayerFacingAngle(playerid, angle);
SetCameraBehindPlayer(playerid);
return true;
}
stock IsPlayerJailed(playerid)
{
if(pInfo[playerid][InJail])
return true;
else
return false;
}
stock SetMeleeWeapon(playerid, weapon, price, msg[])
{
if(pInfo[playerid][Money] >= price)
{
pInfo[playerid][Money] -= price;
pInfo[playerid][Melee] = weapon;
GivePlayerWeapon(playerid, weapon, 120);
RefreshMoney(playerid);
SendClientMessage(playerid, -1, msg);
}
else
{
SendClientMessage(playerid, -1, "{FF0000}Du kannst dir dieses Produkt nicht leisten!");
}
return true;
}
stock SetPistolWeapon(playerid, weapon, price, msg[])
{
if(pInfo[playerid][Money] >= price)
{
pInfo[playerid][Money] -= price;
pInfo[playerid][Pistol] = weapon;
GivePlayerWeapon(playerid, weapon, 120);
RefreshMoney(playerid);
SendClientMessage(playerid, -1, msg);
}
else
{
SendClientMessage(playerid, -1, "{FF0000}Du kannst dir dieses Produkt nicht leisten!");
}
return true;
}
stock SetArmorPlayer(playerid, amount, price, msg[])
{
if(pInfo[playerid][Money] >= price)
{
pInfo[playerid][Money] -= price;
pInfo[playerid][Armor] = amount;
SetPlayerArmour(playerid, amount);
RefreshMoney(playerid);
SendClientMessage(playerid, -1, msg);
}
else
{
SendClientMessage(playerid, -1, "{FF0000}Du kannst dir dieses Produkt nicht leisten!");
}
return true;
}
public SQL_Connect(ip[], name[], pass[], data[])
{
Handle = mysql_connect(ip, name, data, pass);
if(mysql_errno())
{
printf("[SQL] KEINE VERBINDUNG ZUR DATENBANK MOEGLICH!");
Connection = false;
}
else
{
printf("[SQL] VERBINDUNG ZUR DATENBANK WURDE HERGESTELLT!");
Connection = true;
}
}
public SQL_CheckAccount(playerid)
{
new Fields, Rows;
cache_get_data(Rows, Fields, Handle);
TogglePlayerSpectating(playerid, true);
InterpolateCameraPos(playerid, 433.658966, -2110.827392, 39.952560, 437.411956, -1777.464111, 10.099081, 10000);
InterpolateCameraLookAt(playerid, 430.606811, -2107.437255, 37.905204, 434.100738, -1773.718139, 10.158975, 10000);
for(new i = 0; i < 20; i++)
SendClientMessage(playerid, -1, " ");
if(Rows)
{
SendClientMessage(playerid, -1, "Willkommen auf {FF9700}German Prison Break{FFFFFF}!");
SendClientMessage(playerid, -1, "Bitte gib dein Passwort ein um dich in deinen Account einzuloggen!");
new Temp[256];
format(Temp, sizeof(Temp), "{FFFFFF}Unser System konnte einen Account mit deinem Namen finden.\n");
format(Temp, sizeof(Temp), "%sGib dein Passwort an und drücke anschließend auf {FFFF00}'Weiter'{FFFFFF} um dich einzuloggen.", Temp);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", Temp, "Weiter", "Beenden");
}
else
{
SendClientMessage(playerid, -1, "Willkommen auf {FF9700}German Prison Break{FFFFFF}!");
SendClientMessage(playerid, -1, "Um auf diesem Server spielen zu können benötigst du einen Account!");
new Temp[256];
format(Temp, sizeof(Temp), "{FFFFFF}Unser System konnte {FF6768}keinen{FFFFFF} Account mit deinem Namen finden.\n");
format(Temp, sizeof(Temp), "%sGib ein Passwort an und drücke anschließend auf {FFFF00}'Weiter'{FFFFFF} um einen Account zu erstellen.", Temp);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration", Temp, "Weiter", "Beenden");
}
}
public SQL_CheckPassword(playerid)
{
new Fields, Rows;
cache_get_data(Rows, Fields, Handle);
if(Rows)
{
InterpolateCameraPos(playerid, 223.138931, -209.686340, 32.131401, 234.480102, -81.005691, 31.686792, 10000);
InterpolateCameraLookAt(playerid, 220.834838, -206.901214, 28.676805, 230.885742, -83.180137, 28.975269, 10000);
for(new i = 0; i < 20; i++)
SendClientMessage(playerid, -1, " ");
SendClientMessage(playerid, -1, "{95FF00}Du hast dich erfolgreich in deinen Account eingeloggt!");
SendClientMessage(playerid, -1, "Solltest du noch fragen zur Spielweise haben so verwende {008CFF}'/help'{FFFFFF}.");
new Temp[256];
format(Temp, sizeof(Temp), "{FFFFFF}Du musst nun auswählen in welchem Team du Spielen möchtest.\n");
ShowPlayerDialog(playerid, DIALOG_TEAM, DIALOG_STYLE_MSGBOX, "Wähle dein Team!", Temp, "{008CFF}Wärter", "{FF6567}Gefangener");
SetPlayerInterior(playerid, 0);
pInfo[playerid][Confirmed] = true;
SQL_LoadAccount(playerid);
TextDrawShowForPlayer(playerid, Watermark);
SetPlayerScore(playerid, pInfo[playerid][Level]);
RefreshMoney(playerid);
}
else
{
for(new i = 0; i < 20; i++)
SendClientMessage(playerid, -1, " ");
SendClientMessage(playerid, -1, "{FF6768}Dein Passwort stimmt nicht überein!");
new Temp[256];
format(Temp, sizeof(Temp), "{FFFFFF}Unser System konnte einen Account mit deinem Namen finden.\n");
format(Temp, sizeof(Temp), "%sGib dein Passwort an und drücke anschließend auf {FFFF00}'Weiter'{FFFFFF} um dich einzuloggen.", Temp);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", Temp, "Weiter", "Beenden");
}
}
public SQL_LoadAccount(playerid)
{
if(pInfo[playerid][Confirmed])
{
pInfo[playerid][Time] = cache_get_field_content_int(0, "time", Handle);
pInfo[playerid][CopSkin] = cache_get_field_content_int(0, "copskin", Handle);
pInfo[playerid][PrisonerSkin] = cache_get_field_content_int(0, "prisonerskin", Handle);
pInfo[playerid][PaydayTime] = cache_get_field_content_int(0, "payday", Handle);
pInfo[playerid][Upgrade] = cache_get_field_content_int(0, "upgrade", Handle);
pInfo[playerid][Level] = cache_get_field_content_int(0, "level", Handle);
pInfo[playerid][Money] = cache_get_field_content_int(0, "money", Handle);
new Temp[256];
new Rows, Fields;
mysql_format(Handle, Temp, sizeof(Temp), "SELECT * FROM weapons WHERE name='%e'", GetUsername(playerid));
mysql_query(Handle, Temp);
cache_get_data(Rows, Fields, Handle);
if(Rows)
{
pInfo[playerid][Melee] = cache_get_field_content_int(0, "melee", Handle);
pInfo[playerid][Pistol] = cache_get_field_content_int(0, "pistol", Handle);
pInfo[playerid][Armor] = cache_get_field_content_int(0, "armor", Handle);
}
else
{
mysql_format(Handle, Temp, sizeof(Temp), "INSERT INTO weapons (name, melee, pistol) VALUES ('%e', '%i', '%i')", GetUsername(playerid), 0, 0);
mysql_query(Handle, Temp);
}
}
}
public SQL_SaveAccount(playerid)
{
if(IsPlayerLoggedIn(playerid))
{
new strQuery[256];
mysql_format(Handle, strQuery, sizeof(strQuery), "UPDATE accounts SET time='%i', copskin='%i', prisonerskin='%i', payday='%i', upgrade='%i', level='%i', money='%i' WHERE name='%e'",
pInfo[playerid][Time],
pInfo[playerid][CopSkin],
pInfo[playerid][PrisonerSkin],
pInfo[playerid][PaydayTime],
pInfo[playerid][Upgrade],
pInfo[playerid][Level],
pInfo[playerid][Money],
GetUsername(playerid));
mysql_tquery(Handle, strQuery, "", "");
mysql_format(Handle, strQuery, sizeof(strQuery), "UPDATE weapons SET melee='%i', pistol='%i', armor='%i' WHERE name='%e'", pInfo[playerid][Melee], pInfo[playerid][Pistol], pInfo[playerid][Armor], GetUsername(playerid));
mysql_query(Handle, strQuery);
}
}
public SpawnOfficer(playerid)
{
TogglePlayerSpectating(playerid, false);
new RandomInt = random(sizeof(CopBaseSpawn));
SpawnPlayerCorrect(playerid, CopBaseSpawn[RandomInt][0], CopBaseSpawn[RandomInt][1], CopBaseSpawn[RandomInt][2], CopBaseSpawn[RandomInt][3]);
SetPlayerInterior(playerid, 3);
SetPlayerSkin(playerid, pInfo[playerid][CopSkin]);
GivePlayerWeapon(playerid, pInfo[playerid][Melee], 1);
GivePlayerWeapon(playerid, pInfo[playerid][Pistol], 120);
SetPlayerArmour(playerid, pInfo[playerid][Armor]);
return 1;
}
public SpawnPrisoner(playerid)
{
TogglePlayerSpectating(playerid, false);
new RandomInt = random(sizeof(PrisonerBaseSpawn));
SpawnPlayerCorrect(playerid, PrisonerBaseSpawn[RandomInt][0], PrisonerBaseSpawn[RandomInt][1], PrisonerBaseSpawn[RandomInt][2], PrisonerBaseSpawn[RandomInt][3]);
SetPlayerInterior(playerid, 18);
SetPlayerSkin(playerid, pInfo[playerid][PrisonerSkin]);
return 1;
}
public Payday()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerLoggedIn(i))
{
pInfo[i][PaydayTime]++;
pInfo[i][Time]++;
if(pInfo[i][PaydayTime] >= 30)
{
pInfo[i][PaydayTime] = false;
pInfo[i][Upgrade]++;
SendClientMessage(i, -1, "{00AFFF}Du hast soebend einen Payday erhalten! (+1 Upgradepoint)");
SQL_SaveAccount(i);
}
if(pInfo[i][Time] == 60)
{
SendClientMessage(i, -1, "Gratulation! Du hast soebend {FF6768}30{FFFFFF} Spielminuten erreicht!");
SendClientMessage(i, -1, "Nun kannst du beim nächsten Login als {00AFFF}Wärter{FFFFFF} in den Kampf ziehen!");
SendClientMessage(i, -1, "{FFFF00}Als dank dafür, schenken wir dir $15.000!");
pInfo[i][Money] += 15000;
RefreshMoney(i);
}
if(pInfo[i][Upgrade] == pInfo[i][Level] * 2)
{
new Temp[256];
format(Temp, sizeof(Temp), "Spieler {B0FF5B}%s{FFFFFF} hat Level {FF6768}%i{FFFFFF} erreicht!", GetUsername(i), pInfo[i][Level] + 1);
SendClientMessageToAll(-1, Temp);
pInfo[i][Level]++;
pInfo[i][Upgrade] = false;
SetPlayerScore(i, pInfo[i][Level]);
SQL_SaveAccount(i);
}
}
}
return 1;
}
public SpawnInJail(playerid)
{
if(IsPlayerPrisoner(playerid))
{
new RandomInt = random(sizeof(PrisonerSpawnJail));
SpawnPlayerCorrect(playerid, PrisonerSpawnJail[RandomInt][0], PrisonerSpawnJail[RandomInt][1], PrisonerSpawnJail[RandomInt][2], PrisonerSpawnJail[RandomInt][3]);
}
else
{
new RandomInt = random(sizeof(CopSpawnJail));
SpawnPlayerCorrect(playerid, CopSpawnJail[RandomInt][0], CopSpawnJail[RandomInt][1], CopSpawnJail[RandomInt][2], CopSpawnJail[RandomInt][3]);
}
SetPlayerInterior(playerid, 0);
return 1;
}
public OpenJails(playerid)
{
if(IsPlayerLoggedIn(playerid))
{
new Temp[256];
if(JailDoorOpen)
{
format(Temp, sizeof(Temp), "{FF6768}*** Die Türen der Gefängniszellen wurden von {FFFF68}%s{FF6768} geöffnet. ***", GetUsername(playerid));
for(new i = 0; i < sizeof(JailDoor); i++) { MoveObject(JailDoor[i], DoorPos[i][0], DoorPos[i][1], DoorPos[i][2] - 3, 0.5, 0, 0); }
}
else
{
format(Temp, sizeof(Temp), "{FF6768}*** Die Türen der Gefängniszellen wurden von {FFFF68}%s{FF6768} geschlossen! ***", GetUsername(playerid));
for(new i = 0; i < sizeof(JailDoor); i++) { MoveObject(JailDoor[i], DoorPos[i][0], DoorPos[i][1], DoorPos[i][2], 0.5, 0, 0); }
}
JailDoorOpen = !JailDoorOpen;
SendClientMessageToAll(-1, Temp);
}
return 1;
}
public CentralMenu(playerid)
{
if(IsPlayerLoggedIn(playerid) && IsPlayerInRangeOfPoint(playerid, 5.0, 220.5488,-174.4541,5.7925))
{
new Temp[512];
if(JailDoorOpen)
format(Temp, sizeof(Temp), "Türen der Gefängniszellen - {FF6768}Geschlossen!{FFFFFF}\n");
else
format(Temp, sizeof(Temp), "Türen der Gefängniszellen - {00FF00}Geöffnet!{FFFFFF}\n");
format(Temp, sizeof(Temp), "%sTür zum Massenjail - {FF6768}Geschlossen!{FFFFFF}\n", Temp);
format(Temp, sizeof(Temp), "%sTür zur Heilkammer - {FF6768}Geschlossen!{FFFFFF}\n", Temp);
format(Temp, sizeof(Temp), "%sTür zur Waffenkammer - {FF6768}Geschlossen!{FFFFFF}\n", Temp);
ShowPlayerDialog(playerid, DIALOG_CENTRAL, DIALOG_STYLE_TABLIST, "Zentrale", Temp, "Wählen", "Beenden");
}
else
{
SendClientMessage(playerid, -1, "{FF6768}Du bist nicht in der nähe der Zentrale!");
}
return 1;
}