//(Wichtige Optionen)(An / Aus)
UsePlayerPedAnims();
DisableInteriorEnterExits();
//(Standart Sachen)
SetGameModeText("Gamemode_2013");
AddPlayerClass(170,1619.5688,-1892.6680,13.5489,357.9517,0,0,0,0,0,0);
AddPlayerClass(169,1619.5688,-1892.6680,13.5489,357.9517,0,0,0,0,0,0);
//(Vehicle)(Spawn)(Löschen)
AddStaticVehicle(468,1612.7875,-1885.5419,13.2160,1.5498,0,1); // SC Sanchez
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,1567.6989,-1891.3413,13.5593);
SetPlayerCameraPos(playerid,1568.2194,-1886.8500,13.5582);
SetPlayerCameraLookAt(playerid,1567.6989,-1891.3413,13.5593);
SetPlayerFacingAngle(playerid,1.4229);
return 1;
}
public OnPlayerConnect(playerid)
{
SetPlayerVirtualWorld(playerid,1);
SendClientMessage(playerid,GELB,"Willkommen auf dem Reallife Server von XextropieX");
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(dini_Exists(Spielerdatei))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde in unserer Datenbank gefunden.\nDu kannst dich jetzt mit deinem Passwort einloggen.\n{00FF28}Das Serverteam wünscht dir viel Spaß auf unserem Server","Login","Abbrechen");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registrierung","Dein Account wurde leider nicht in unserer Datenbank gefunden.\nBitte gib ein gewünschtes Passwort ein, um dich bei uns zu Registrieren.\n{FF000F}Behalte dein Passwort für dich, und gib es nicht weiter!","Registrieren","Abbrechen");
}
Willkommenstext[playerid]=CreatePlayerTextDraw(playerid,240.0,580.0,"Willkommen auf dem Reallife Server von XextropieX");
PlayerTextDrawShow(playerid,Willkommenstext[playerid]);
PlayerTextDrawFont(playerid,Willkommenstext[playerid],2);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
SpielerSpeichern(playerid);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerVirtualWorld(playerid,0);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/mycommand",cmdtext,true,10)==0)
{
return 1;
}
if(!strcmp(cmdtext,"/select_ptd",true))
{
for(new i = 0; i < MAX_PLAYER_TEXT_DRAWS; i++) PlayerTextDrawSetSelectable(playerid, PlayerText:i, 1);
SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Alle Textdraws können nun ausgewählt werden!");
return 1;
}
return 0;
}
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)
{
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==0)
{
SendClientMessage(playerid,ROT,"Du hast die Registration abgebrochen, Du wurdest gekickt");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,ROT,"Bitte gib ein Passwort ein");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registrierung","Dein Account wurde leider nicht in unserer Datenbank gefunden.\nBitte gib ein gewünschtes Passwort ein, um dich bei uns zu Registrieren.\n{FF000F}Behalte dein Passwort für dich, und gib es nicht weiter!","Registrieren","Abbrechen");
return 1;
}
else
{
Register(playerid,inputtext);
return 1;
}
}
}
if(dialogid == DIALOG_LOGIN)
{
if(response==0)
{
SendClientMessage(playerid,ROT,"Du hast die Registration abgebrochen, Du wurdest gekickt");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,ROT,"Bitte gib dein Passwort ein");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde in unserer Datenbank gefunden.\nDu kannst dich jetzt mit deinem Passwort einloggen.\n{00FF28}Das Serverteam wünscht dir viel Spaß auf unserem Server","Login","Abbrechen");
return 1;
}
else
{
Login(playerid,inputtext);
return 1;
}
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
public Tutorial(playerid)
{
if(Tut[playerid] == 1)
{
InterpolateCameraPos(playerid, 1045.702636, -1558.818969, 26.678382, 1504.672729, -1676.471313, 41.072780, 4000);
InterpolateCameraLookAt(playerid, 1040.817260, -1557.961547, 26.047258, 1509.404296, -1676.532958, 39.457740, 4000);
SendClientMessage(playerid,Tutorial,">>_____|<Die Fahrschule>|_____<<");
SetTimerEx("Tutorial",6000,0,"i",playerid);
Tut[playerid] = 2;
return 1;
}
else if(Tut[playerid] == 2)
{
InterpolateCameraPos(playerid, 1504.670166, -1676.470703, 41.072700, 814.499267, -1314.370483, 44.125591, 4000);
InterpolateCameraLookAt(playerid, 1509.459716, -1676.555297, 39.639945, 810.467651, -1317.051391, 42.877220, 4000);
SendClientMessage(playerid,Tutorial,">>_____|<Die Los Santos Polizei Station>|_____<<);
SetTimerEx("Tutorial",6000,0,"i",playerid);
Tut[playerid] = 2;
return 1;
}
return 1;
}
stock Register(playerid,Key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_Create(Spielerdatei);
dini_Set(Spielerdatei,"Passwort",Key);
SendClientMessage(playerid,GRÜN,"Du hast dich erfolgreich Registriert!");
SetPlayerScore(playerid,0);
SetPVarInt(playerid,"Loggedin",1);
PlayerTextDrawShow(playerid,Willkommenstext[playerid]);
InterpolateCameraPos(playerid, 1480.385131, -1714.671875, 24.723699, 1045.694458, -1558.816040, 26.678419, 4000);
InterpolateCameraLookAt(playerid, 1480.357788, -1719.670776, 24.822557, 1040.882568, -1557.944335, 25.636539, 4000);
SendClientMessage(playerid,Tutorial,">>_____|<Das Rathaus>|_____<<");
SetTimerEx("Tutorial",6000,0,"i",playerid);
Tut[playerid] = 1;
return 1;
}
stock Login(playerid,Key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(!strcmp(Key,dini_Get(Spielerdatei,"Passwort"),true))
{
LoadAccount(playerid);
SendClientMessage(playerid,GRÜN,"Erfolgreich Eingeloggt! Viel Spaß!");
}
else
{
SendClientMessage(playerid,ROT,"Du hast das falsche Passwort eingegeben");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde in unserer Datenbank gefunden.\nDu kannst dich jetzt mit deinem Passwort einloggen","Login","Abbrechen");
}
return 1;
}
stock LoadAccount(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
SetPVarInt(playerid,"Loggedin",1);
return 1;
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
}
return 1;
}
stock Spielername(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}