Hier das Ganze Script da ich jetzt nicht weiß was ich euch am besten poste xD
/*************************************************************************** Dies ist ein Selfmade Reallife Script von Ronny ****************************************************************************/
#include <a_samp>#include <ocmd>#include <dini>
//DEFINE#define DIALOG_REGISTER 1#define DIALOG_LOGIN 2//FARBEN#define BLAU 0x0087FFFF#define ROT 0xE10000FF#define LIGHTGREEN 0x9ACD32AA#define COLOR_RED 0xAA3333AA#define COLOR_LIGHTRED 0xFF6347AA#define COLOR_GFR_BLUE 629657343#define BLUE_NEW 0x0000CAF6#define COLOR_ORANGE 0xFF9933FF#define COLOR_GOLD 0xB8860BAA#define COLOR_GRAD1 0xB4B5B7FF#define COLOR_GRAD2 0xBFC0C2FF#define COLOR_GRAD3 0xCBCCCEFF#define COLOR_GRAD4 0xD8D8D8FF#define COLOR_GRAD5 0xE3E3E3FF#define COLOR_GRAD6 0xF0F0F0FF#define COLOR_GREY 0xAFAFAFAA#define COLOR_GREEN 0x33AA33AA#define COLOR_RED 0xAA3333AA#define COLOR_BLUE 0x000080AA#define COLOR_BLACK 0x000000AA#define COLOR_LIGHTRED 0xFF6347AA#define COLOR_LIGHTBLUE 0x33CCFFAA#define COLOR_LIGHTGREEN 0x9ACD32AA#define COLOR_YELLOW 0xFFFF00AA#define COLOR_YELLOW2 0xF5DEB3AA#define COLOR_YELLOW3 0xC1C10EAA#define COLOR_WHITE 0xFFFFFFAA#define COLOR_FADE1 0xE6E6E6E6#define COLOR_FADE2 0xC8C8C8C8#define COLOR_FADE3 0xAAAAAAAA#define COLOR_FADE4 0x8C8C8C8C#define COLOR_FADE5 0x6E6E6E6E#define COLOR_PURPLE 0xC2A2DAAA#define COLOR_DBLUE 0x2641FEAA#define COLOR_ALLDEPT 0xFF8282AA#define COLOR_NEWS 0xFFA500AA#define COLOR_OOC 0xF97804FF#define HELLBLAU 0x00FFFFFF#define GOLD 0xB8860BAA
#define LIGHT_KEY KEY_CROUCH // Welche Taste für Licht?//Fahrzeugenew NoobRoller[6];//Textenew Text3D:Noob[MAX_PLAYERS];//Weiteresnew ZeigeBild[MAX_PLAYERS];new Motor[MAX_VEHICLES];new bool:licht[MAX_VEHICLES];new Noobi[MAX_PLAYERS];new gPlayerLogged[MAX_PLAYERS];
enum Info{Adminlevel,Fraktion,Job,Geld,Level,Baned,Bank}new pInfo[MAX_PLAYERS][Info];
//Forwardsforward ZeigePlayerClass(playerid);forward WenndudasFahrzeugbetretest(carid);
main(){ print("\n*******************************"); print(" Streets Of German is Loadet"); print("*********************************\n");}
public OnGameModeInit(){ SetGameModeText("German Reallife"); SendRconCommand("mapname Los Santos"); ShowPlayerMarkers(0); EnableStuntBonusForAll(false); ManualVehicleEngineAndLights(); DisableInteriorEnterExits(); UsePlayerPedAnims(); //==========[3DTexte]============// Create3DTextLabel("Willkommen auf dem Server", 0xEBFF00FF, -72.5555,-1578.6207,2.6172,20.0,0); //==========[Zivispawn]==========// AddPlayerClass(2,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(7,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(12,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(20,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(21,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(22,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(23,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(26,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(29,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(56,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(93,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(184,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(185,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn AddPlayerClass(291,-75.6163,-1581.0917,3.4375,313.9403,0,0,0,0,0,0); // Spielerspawn //===================[Fahrzeuge]=============================////Noobroller NoobRoller[0] = AddStaticVehicleEx(462,-55.9065,-1586.0073,2.3866,58.3175,1,1,-1); // NoobRoller[1] NoobRoller[1] = AddStaticVehicleEx(462,-55.1020,-1584.7417,2.3876,53.4595,10,2,-2); // NoobRoller[2] NoobRoller[2] = AddStaticVehicleEx(462,-54.3502,-1583.5621,2.3778,53.5681,13,3,-3); // NoobRoller[3] NoobRoller[3] = AddStaticVehicleEx(462,-53.6000,-1582.1808,2.3583,52.6057,1,4,-4); // NoobRoller[4] NoobRoller[4] = AddStaticVehicleEx(462,-52.6986,-1580.6750,2.3514,50.7503,1,5,-5); // NoobRoller[5] NoobRoller[5] = AddStaticVehicleEx(462,-51.6951,-1579.5240,2.3730,47.1733,10,6,-6); // NoobRoller[6] return 1;}
public OnGameModeExit(){ return 1;}
public OnPlayerRequestClass(playerid, classid){ ZeigePlayerClass(playerid); new pName[MAX_PLAYER_NAME]; new Spielerdatei[64]; new name[MAX_PLAYER_NAME]; new string[48]; GetPlayerName(playerid,name,sizeof(name)); format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name); GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "%s hat den Server Betreten.", pName); SendClientMessageToAll(0xAAAAAAAA, string); if(IsPlayerNPC(playerid))return 1; if(dini_Exists(Spielerdatei)) { SendClientMessage(playerid,0xAFFF00FF,">>>>>>>>>>>>>>>>>>>>>>German-Reallife>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); SendClientMessage(playerid,0xFAFAFAFF,"Herzlich willkommen Zurück Schön das sie wieder da sind"); SendClientMessage(playerid,0xFAFAFAFF,"Wen du Spielen möchtest gieb bitte dein Passwort ein und Klicke auf Login"); SendClientMessage(playerid,0xFAFAFAFF,"Viel Spaß beim Spielen wünscht dir das German Reallife Team"); SendClientMessage(playerid,0xAFFF00FF,">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.\nAber Gieb Nimanden Dein Passwort Weiter\nAus Sicherheits Gründen\nMit Freundlichen Grüßen das Admin Team","Login","Abbrechen"); } else { SendClientMessage(playerid,0xAFFF00FF,">>>>>>>>>>>>>>>>>>>>>>German-Reallife>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); SendClientMessage(playerid,0xFAFAFAFF,"Herzlich willkommen auf German Reallife Oh Wie Schön wie ich sehe"); SendClientMessage(playerid,0xFAFAFAFF,"Sind Sie neu Auf dem Server Wen sie Spielen wollen Registieren sie sich"); SendClientMessage(playerid,0xAFFF00FF,">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"{23FF00}Erstellen{FAFAFA}","{FAFAFA}Du hast noch keinen {FF3200}Account{FAFAFA}!\nSuche dir ein sicheres Passwort aus.\nUnd Erstelle dir einen {FF3200}Account{FAFAFA}","Erstellen","Abbrechen"); } PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); return 1;}
public OnPlayerConnect(playerid){ gPlayerLogged[playerid] = 0; return 1;}
public OnPlayerDisconnect(playerid, reason){ SpielerSpeichern(playerid); return 1;}
public OnPlayerSpawn(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[]){ return 1;}
public OnPlayerCommandText(playerid, cmdtext[]){ if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0;}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ if(!WenndudasFahrzeugbetretest(vehicleid) && ispassenger != 1) { SendClientMessage(playerid, 0xFFFFFFFF, "{E6E6E6}Um den {FF3200}Motor{E6E6E6} zu Starten drücke die Taste {23FF00}N{E6E6E6}"); } return 1;}
public OnPlayerExitVehicle(playerid, vehicleid){ SendClientMessage(playerid,0xFAFAFAFF,"Du hast das Fahrzeug verlassen"); 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(newkeys & LIGHT_KEY) { if(IsPlayerInAnyVehicle(playerid)) { new engine,lights,alarm,doors,bonnet,boot,objective; new vid = GetPlayerVehicleID(playerid); if(licht[vid] == false) { GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective); licht[vid] = true; } else if(licht[vid] == true) { GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective); licht[vid] = false; } } } if((newkeys & KEY_NO) && !(oldkeys & KEY_NO)) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new engine,light,alarm,doors,bonnet,boot,objective; new veh = GetPlayerVehicleID(playerid); GetVehicleParamsEx(veh,engine,light,alarm,doors,bonnet,boot,objective); if(Motor[veh] == 0) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,light,alarm,doors,bonnet,boot,objective); SendClientMessage(playerid,0xFFFF00AA,"Motor angeschaltet!"); Motor[veh] = 1; } else { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,light,alarm,doors,bonnet,boot,objective); SendClientMessage(playerid,0xFFFF00AA,"Motor ausgeschaltet!"); Motor[veh] = 0; } } } 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_LOGIN) { if(response==0) { SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen."); Kick(playerid); return 1; } if(response==1) { if(!strlen(inputtext)) { SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug."); ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen"); return 1; } else { Login(playerid,inputtext); return 1; } } } if(dialogid==DIALOG_REGISTER) { if(response==0) { SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen."); Kick(playerid); return 1; } if(response==1) { if(!strlen(inputtext)) { SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug."); ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen"); return 1; } else { Register(playerid,inputtext); return 1; } } } return 1;}
public OnPlayerClickPlayer(playerid, clickedplayerid, source){ return 1;}
public ZeigePlayerClass(playerid){ if(ZeigeBild[playerid] == 0) { switch(random(3)) { case 0: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,161.5957,-1869.1290,3.7734); SetPlayerFacingAngle(playerid,54.6536); SetPlayerCameraPos(playerid,151.6509,-1862.2980,3.7734); SetPlayerCameraLookAt(playerid,161.5957,-1869.1290,3.7734); } case 1: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,161.5957,-1869.1290,3.7734); SetPlayerFacingAngle(playerid,54.6536); SetPlayerCameraPos(playerid,151.6509,-1862.2980,3.7734); SetPlayerCameraLookAt(playerid,161.5957,-1869.1290,3.7734); } default: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,161.5957,-1869.1290,3.7734); SetPlayerFacingAngle(playerid,54.6536); SetPlayerCameraPos(playerid,151.6509,-1862.2980,3.7734); SetPlayerCameraLookAt(playerid,161.5957,-1869.1290,3.7734); } } } else { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,161.5957,-1869.1290,3.7734); SetPlayerFacingAngle(playerid,54.6536); SetPlayerCameraPos(playerid,151.6509,-1862.2980,3.7734); SetPlayerCameraLookAt(playerid,161.5957,-1869.1290,3.7734); }}
public WenndudasFahrzeugbetretest(carid){ new model = GetVehicleModel(carid); { if(model == 481 || model == 509 || model == 510) { return 1; } } return 0;}
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"),false)) { LoadAccount(playerid); SendClientMessage(playerid,BLAU,"Erfolgreich eingeloggt Viel Spaß beim spielen."); SpawnPlayer(playerid); if(pInfo[playerid][Level] <= 1) { Noob[playerid] = Create3DTextLabel("{FFFFFF}*Neuling*",0xFAFAFAFF,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(Noob[playerid], playerid, 0.0, 0.0, 0.4); Noobi[playerid] = 1; } return 1; } else { SendClientMessage(playerid,BLAU,"Falsches Passwort."); SendClientMessage(playerid,BLAU,"Denk an Groß und klein Schreibung."); ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","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")); GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld")); pInfo[playerid][Adminlevel] = dini_Int(Spielerdatei, "Adminlevel"); pInfo[playerid][Fraktion] = dini_Int(Spielerdatei, "Fraktion"); pInfo[playerid][Job] = dini_Int(Spielerdatei, "Job"); pInfo[playerid][Baned] = dini_Int(Spielerdatei, "Baned"); if(pInfo[playerid][Baned] == 1) { SendClientMessage(playerid,ROT,"Du bist vom Server gebannt."); SendClientMessage(playerid,ROT,"mach dir mal Gedanken Wiso."); SendClientMessage(playerid,ROT,"Kläre dies im Forum."); SendClientMessage(playerid,ROT,"FORUM: RonnyVampir....."); Kick(playerid); } 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, "Adminlevel", pInfo[playerid][Adminlevel]); dini_IntSet(Spielerdatei, "Fraktion", pInfo[playerid][Fraktion]); dini_IntSet(Spielerdatei, "Job", pInfo[playerid][Job]); dini_IntSet(Spielerdatei, "Baned", pInfo[playerid][Baned]); dini_IntSet(Spielerdatei, "Geld",GetPlayerMoney(playerid)); dini_IntSet(Spielerdatei, "Level", GetPlayerScore(playerid)); } 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,BLAU,"Erfolgreich registriert Viel Spaß beim Spielen."); SetPVarInt(playerid,"loggedin",1); return 1;}