Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <YSI\y_ini>
- #include <dini>
- enum spieler_daten
- {
- Fraktion,
- wanted,
- skin,
- Float:lastx,Float:lasty,Float:lastz,
- eingeloggt
- }
- new Spieler[MAX_PLAYERS][spieler_daten];
- new Text:Team;
- //Fraktionsnamen
- #define fraktname1 "LSPD"
- #define fraktname2 "Grove Streat"
- #define fraktname3 "Medic"
- //farben
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIGHTBLUE 0x00BFFFFF
- #define COLOR_NORMAL_PLAYER 0xFFBB7777
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIME 0x10F441AA
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_NAVY 0x000080AA
- #define COLOR_AQUA 0xF0F8FFAA
- #define COLOR_CRIMSON 0xDC143CAA
- #define COLOR_FLBLUE 0x6495EDAA
- #define COLOR_BISQUE 0xFFE4C4AA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_CHARTREUSE 0x7FFF00AA
- #define COLOR_BROWN 0XA52A2AAA
- #define COLOR_CORAL 0xFF7F50AA
- #define COLOR_GOLD 0xB8860BAA
- #define COLOR_GREENYELLOW 0xADFF2FAA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_IVORY 0xFFFF82AA
- #define COLOR_LAWNGREEN 0x7CFC00AA
- #define COLOR_SEAGREEN 0x20B2AAAA
- #define COLOR_LIMEGREEN 0x32CD32AA
- #define COLOR_MIDNIGHTBLUE 0X191970AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OLIVE 0x808000AA
- #define COLOR_ORANGERED 0xFF4500AA
- #define COLOR_PINK 0xFFC0CBAA
- #define COLOR_SPRINGGREEN 0x00FF7FAA
- #define COLOR_TOMATO 0xFF6347AA
- #define COLOR_YELLOWGREEN 0x9ACD32AA
- #define COLOR_MEDIUMAQUA 0x83BFBFAA
- #define COLOR_MEDIUMMAGENTA 0x8B008BAA
- #define DIALOG_LOGIN 3
- #define DIALOG_REG 4
- main()
- {
- print("\n----------------------------------");
- print(" by XtreamRealLife" );
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetGameModeText("Blank Script");
- AddPlayerClass(10, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(12, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(13, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(136, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(14, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(142, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(143, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(144, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(15, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(151, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(156, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(168, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(169, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(17, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(170, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(180, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(182, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(54, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(183, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(184, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(263, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(75, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(185, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(188, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(19, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(216, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(20, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(10, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(10, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- Team = TextDrawCreate(4.0,428.0,"XtreamRealLife wuennscht dir viel spass!");
- TextDrawFont(Team,2);
- TextDrawLetterSize(Team,0.2,1.5);
- TextDrawColor(Team,0xFEFEFEFF);
- TextDrawSetProportional(Team,1);
- TextDrawSetShadow(Team,1);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new pname[MAX_PLAYERS],accFormat[128];
- GetPlayerName(playerid,pname,sizeof pname);
- format(accFormat,sizeof accFormat,"%s.datei",pname);
- if(fexist(accFormat))
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Weiter","Abbrechen");
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Weiter","Abbrechen");
- }
- TextDrawShowForPlayer(playerid,Team);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new pname[MAX_PLAYERS],accFormat[128];
- GetPlayerName(playerid,pname,sizeof pname);
- format(accFormat,sizeof accFormat,"%s.datei",pname);
- if(fexist(accFormat) && Spieler[playerid][eingeloggt])
- {
- dini_IntSet(accFormat,"wanted",Spieler[playerid][wanted]);
- dini_IntSet(accFormat,"Fraktion",Spieler[playerid][Fraktion]);
- dini_IntSet(accFormat,"skin",Spieler[playerid][skin]);
- dini_FloatSet(accFormat,"lastx",Spieler[playerid][lastx]);
- dini_FloatSet(accFormat,"lasty",Spieler[playerid][lasty]);
- dini_FloatSet(accFormat,"lastz",Spieler[playerid][lastz]);
- }
- Spieler[playerid][eingeloggt] = 0;
- Spieler[playerid][wanted] = 0;
- Spieler[playerid][skin] = 0;
- Spieler[playerid][lastx] = (0.0);
- Spieler[playerid][lasty] = (0.0);
- Spieler[playerid][lastz] = (0.0);
- Spieler[playerid][Fraktion] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- new pname[MAX_PLAYERS],accFormat[128];
- GetPlayerName(playerid,pname,sizeof pname);
- format(accFormat,sizeof accFormat,"%s.datei",pname);
- if(dini_Isset(accFormat,"lastx"))
- {
- SetPlayerPos(playerid,Spieler[playerid][lastx],Spieler[playerid][lasty],Spieler[playerid][lastz]);
- }
- 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(IsPlayerAdmin(playerid))
- {
- if (strcmp("/godmode", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid, 10000000);
- return 1;
- }
- }
- if (strcmp("/godmode", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,COLOR_GREEN,"Du bist kein Admin!");
- }
- if (strcmp("/test", cmdtext, true, 10) == 0)
- {
- if(isPlayerInFrakt(playerid,1))
- SendClientMessage(playerid,COLOR_GREEN,"Erfolgreich");
- else
- SendClientMessage(playerid,COLOR_RED,"Du gehörst nicht zum LSPD");
- }
- 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[])
- {
- new pname[MAX_PLAYERS],accFormat[128];
- GetPlayerName(playerid,pname,sizeof pname);
- format(accFormat,sizeof accFormat,"%s.datei",pname);
- if(response)
- {
- switch(dialogid)
- {
- case DIALOG_LOGIN:
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
- return SendClientMessage(playerid,0xFFFFFFFF,"Kein Passwort angegeben!");
- }
- if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
- {
- Spieler[playerid][wanted] = dini_Int(accFormat,"wanted");
- Spieler[playerid][Fraktion] = dini_Int(accFormat,"Fraktion");
- Spieler[playerid][skin] = dini_Int(accFormat,"skin");
- Spieler[playerid][lastx] = dini_Float(accFormat,"lastx");
- Spieler[playerid][lasty] = dini_Float(accFormat,"lasty");
- Spieler[playerid][lastz] = dini_Float(accFormat,"lastz");
- Spieler[playerid][eingeloggt] = 1;
- SendClientMessage(playerid,0xFFFFFFFF,"Du wurdest erfolgreich eingeloggt.");
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Weiter","Abbrechen");
- SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort war Falsch!");
- }
- }
- case DIALOG_REG:
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Weiter","Abbrechen");
- return SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort ist zu kurz!");
- }
- dini_Create(accFormat);
- dini_Set(accFormat,"Passwort",inputtext);
- Spieler[playerid][eingeloggt] = 1;
- SendClientMessage(playerid,0xFFFFFFFF,"Account wurde angelegt und du wurdest eingeloggt.");
- }
- }
- }
- else
- {
- switch(dialogid)
- {
- case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
- case DIALOG_REG:ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- stock isPlayerInFrakt(playerid,fraktid)
- {
- if(GetPVarInt(playerid,"Fraktion")==fraktid)return 1;
- return 0;
- }
Add Comment
Please, Sign In to add comment