Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================//
- //Dieses Script ist von Mirko97 erstellt wurden//
- //Rechte um das Script zu verändern hat: Jeder//
- //===========================================//
- #include <a_samp>
- #include <dini>
- #include <ocmd>
- #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- #pragma tabsize 0
- #pragma unused strtok
- #pragma unused sscanf
- forward Servernachricht();
- forward Wetter();
- forward SetWetter();
- forward ClearChatbox(playerid, lines);
- forward PolizeiFahrzeug(vehicleid);
- //==== Wetter ==== //
- new Weather[3];
- new WetterRandomLS[] = { 1,2,3,15 };
- new WetterRandomSF[] = { 1,5,6,16 };
- new WetterRandomLV[] = { 1,2,3,4,5,18 };
- //=================//
- //==== TUT =======//
- //new Menu:Geschlecht;
- //new TutTime[MAX_PLAYERS];
- #define DIALOG_SEX 12
- #define DIALOG_TUT 13
- //===============//
- //======= LOCAL ======= //
- new realchat = 1;
- //============//
- //======Fraktionen=======//
- #define MAX_FRACS 2
- new Fracs[MAX_FRACS][20] = {
- "1",//LSPD
- "0"//Zivilist
- };
- //=======FRAK CARS ==========//
- new PolizeiFahrzeuge[18];
- //====================//
- //==========STATS==========//
- #define DIALOG_STATS 11
- //=========================//
- //==============Krankenhaus-System==========//
- new TotenKopf[MAX_PLAYERS];
- new pIstTot[MAX_PLAYERS];
- forward TOTTimer();
- //========================================//
- //===========FRAKTIONEN===========//
- //new lspd;
- //new zivi;
- //==============================//
- //==============PICKUPS================//
- //sh
- new shenter;
- new shexit;
- //lspd
- //new lspdenter;
- //bsn
- //new bsnenter;
- //zip
- new zipenter;
- new zipexit;
- new zipwechsel;
- //Farb Defines
- #define COLOR_RED 0xFF0000FF
- #define COLOR_YELLOW 0xEBFF00FF
- #define COLOR_WHITE 0xFEFEFEFF
- #define COLOR_GREEN 0x00FF14FF
- #define COLOR_DGREEN 0x006300FF
- #define COLOR_DRED 0x4B0000FF
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_GREY 0xAAAAAAAA
- #define COLOR_BLUE 0x0037FFFF
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- //Kleidungswechsel
- #define DIALOG_KWECHSEL 10
- //Register/Login
- enum spieler_daten
- {
- Admin,
- Level,
- wanted,
- skin,
- eingeloggt,
- paydaytime,
- Geld,
- Geschlecht,
- Fraktion
- }
- new Spieler[MAX_PLAYERS][spieler_daten];
- #define DIALOG_LOGIN 2
- #define DIALOG_REG 3
- //========Krankenhaus-System=======//
- enum pInfo
- {
- pTot,
- Float:pTx,
- Float:pTy,
- Float:pTz
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- //===================================//
- //Navi
- #define navimenu 1
- #define guidemenu 9
- main()
- {
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
- print("|-------------------------------------------|");
- print("Dies ist eine Gamemode von Mirko97.");
- print("Die Gamemode ist in der Testphase, und wird noch sehr stark erweitert!");
- print("ToDo List:");
- print("Arbeits-System: [ ] | Fraktionen: [ ] | Anfangs-Tutorial: [ ] | Register/Login System: [X] ... mehr kommt noch");
- print("|-------------------------------------------|");
- }
- public OnGameModeInit()
- {
- AddPlayerClass(73,1475.3842,-1764.7043,18.7958,1.5667,0,0,0,0,0,0); // SHSpawn
- //==============Krankenhaus-System==========//
- SetTimer("TOTTimer",20000,1);
- //===========MAPICONS=========//
- //============CARS===============//
- PolizeiFahrzeuge[0] = AddStaticVehicleEx(497,1563.1877,-1697.8016,28.5718,89.7662,0,1,-1); // LSPD Heli
- PolizeiFahrzeuge[1] = AddStaticVehicleEx(601,1545.0868,-1662.9243,5.6105,89.5806,1,103,-1); // LSPD SWAT
- PolizeiFahrzeuge[2] = AddStaticVehicleEx(601,1545.8368,-1667.6920,5.6120,269.7399,1,103,-1); // LSPD SWAT
- PolizeiFahrzeuge[3] = AddStaticVehicleEx(599,1545.5760,-1659.0538,6.0788,90.0653,1,103,-1); // LSPD Ranger
- PolizeiFahrzeuge[4] = AddStaticVehicleEx(427,1526.6105,-1645.4796,6.0225,180.2911,1,103,-1); // LSPD SWAT Wagen
- PolizeiFahrzeuge[5] = AddStaticVehicleEx(427,1534.9927,-1645.2112,6.0225,181.8307,1,103,-1); // LSPD SWAT Wagen
- PolizeiFahrzeuge[6] = AddStaticVehicleEx(596,1545.8925,-1672.0631,5.6115,266.9928,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[7] = AddStaticVehicleEx(596,1545.2498,-1676.2194,5.6110,90.5304,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[8] = AddStaticVehicleEx(596,1545.1753,-1680.1086,5.6116,91.4516,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[9] = AddStaticVehicleEx(596,1528.5360,-1687.9996,5.6106,270.1189,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[10] = AddStaticVehicleEx(596,1528.6757,-1683.8376,5.6118,271.0575,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[11] = AddStaticVehicleEx(596,1570.2203,-1710.5056,5.6112,179.9747,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[12] = AddStaticVehicleEx(596,1574.4706,-1710.4862,5.6115,179.8576,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[13] = AddStaticVehicleEx(596,1578.3740,-1710.6976,5.6117,178.8336,1,103,-1); // LSPD Streife
- PolizeiFahrzeuge[14] = AddStaticVehicleEx(523,1583.5641,-1710.7074,5.4607,357.5177,1,1,-1); // LSPD Bike
- PolizeiFahrzeuge[15] = AddStaticVehicleEx(523,1587.5754,-1710.7006,5.4565,0.0413,1,1,-1); // LSPD Bike
- PolizeiFahrzeuge[16] = AddStaticVehicleEx(523,1591.6624,-1710.6603,5.4599,0.1885,1,1,-1); // LSPD Bike
- PolizeiFahrzeuge[17] = AddStaticVehicleEx(523,1595.5022,-1710.6985,5.4607,359.9748,1,1,-1); // LSPD Bike
- //====================================//
- //======== Wetter ========================//
- Wetter();
- SetTimer("Wetter",900000, 1);
- SetTimer("SetWetter",1000, 1);
- //=========================================//
- //==========ZIP===========================//
- //======================================//
- //==================PICKUPS=============//
- shenter= CreatePickup(1239,1,1481.1086,-1770.7427,18.7958);//sh
- shexit= CreatePickup(1239,1,390.2787,173.8044,1008.3828);//sh
- zipenter= CreatePickup(1559,1,1457.1194,-1138.5354,24.0019);//zip
- zipexit= CreatePickup(1559,1,161.3015,-97.0596,1001.8047);//zip
- zipwechsel= CreatePickup(1275,1,161.3723,-83.4066,1001.8047);//zip
- CreatePickup(1239,1,1475.6575,-1763.6359,18.7958); //Guide Menu
- //================3D-Textlabels==============//
- Create3DTextLabel("Touristen Guide\n /guide",COLOR_RED,1475.6575,-1763.6359,18.7958,10,0);
- //Objekte//
- //Stadthalle//
- /*CreateObject(1649,1492.19030762,-1751.24121094,16.11105537,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (1)
- CreateObject(1649,1492.18957520,-1751.26916504,19.36106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (5)
- CreateObject(1649,1492.18884277,-1751.26977539,22.61106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (6)
- CreateObject(1649,1492.16381836,-1751.26904297,25.86106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (7)
- CreateObject(1649,1486.64392090,-1751.25500488,16.11105537,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (8)
- CreateObject(1649,1486.64294434,-1751.27990723,19.33606720,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (9)
- CreateObject(1649,1486.64965820,-1751.26464844,22.63606644,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (10)
- CreateObject(1649,1486.60009766,-1751.27124023,25.61106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (11)
- CreateObject(1649,1470.20190430,-1751.31921387,16.08605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (12)
- CreateObject(1649,1470.20324707,-1751.34326172,19.31104851,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (14)
- CreateObject(1649,1470.20312500,-1751.34277344,22.56104851,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (15)
- CreateObject(1649,1470.20312500,-1751.34277344,25.81104851,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (16)
- CreateObject(1649,1475.67883301,-1751.30529785,16.08605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (17)
- CreateObject(1649,1475.67871094,-1751.30468750,19.33605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (18)
- CreateObject(1649,1475.67871094,-1751.30468750,22.58605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (19)
- CreateObject(1649,1475.67871094,-1751.30468750,25.86100578,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (20)*/
- CreateObject(1257,1487.53967285,-1741.34545898,13.82606697,0.00000000,0.00000000,270.00000000); //object(bustopm) (1)
- CreateObject(1257,1482.81359863,-1741.39709473,13.82606697,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
- CreateObject(3578,1488.56921387,-1732.34350586,11.71085262,0.00000000,0.00000000,91.25000000); //object(dockbarr1_la) (1)
- CreateObject(3578,1477.34472656,-1732.28674316,11.71085262,0.00000000,0.00000000,90.74963379); //object(dockbarr1_la) (2)
- CreateObject(640,1480.25097656,-1732.27600098,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (2)
- CreateObject(640,1485.57983398,-1732.27587891,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (3)
- CreateObject(618,1488.02148438,-1732.82836914,11.63282394,0.00000000,0.00000000,353.75000000); //object(veg_treea3) (1)
- CreateObject(618,1478.48974609,-1732.81335449,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (2)
- CreateObject(640,1491.45544434,-1732.24450684,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (4)
- CreateObject(640,1496.70874023,-1732.27258301,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (5)
- CreateObject(640,1501.96020508,-1732.27734375,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (6)
- CreateObject(640,1507.18664551,-1732.28344727,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (7)
- CreateObject(640,1512.38989258,-1732.28942871,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (8)
- CreateObject(640,1474.37402344,-1732.28674316,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (9)
- CreateObject(640,1469.14746094,-1732.29492188,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (10)
- CreateObject(640,1463.81103516,-1732.29345703,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (11)
- CreateObject(640,1458.53247070,-1732.28735352,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (12)
- CreateObject(640,1453.33093262,-1732.28173828,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (13)
- CreateObject(640,1447.97619629,-1732.27917480,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (14)
- CreateObject(640,1442.72546387,-1732.32128906,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (15)
- CreateObject(618,1499.52050781,-1732.83300781,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (4)
- CreateObject(618,1509.82385254,-1732.81848145,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (5)
- CreateObject(618,1504.62219238,-1732.82189941,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (6)
- CreateObject(618,1494.27258301,-1732.70422363,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (7)
- CreateObject(618,1471.91455078,-1732.82910156,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (8)
- CreateObject(618,1466.49157715,-1732.82495117,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (9)
- CreateObject(3578,1515.40051270,-1732.04309082,11.71085262,0.00000000,0.00000000,90.49694824); //object(dockbarr1_la) (3)
- CreateObject(618,1461.26550293,-1732.82641602,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (11)
- CreateObject(618,1455.98962402,-1732.80371094,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (12)
- CreateObject(618,1450.73925781,-1732.80627441,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (13)
- CreateObject(618,1445.46447754,-1732.80834961,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (14)
- CreateObject(3578,1439.82946777,-1732.28723145,11.71085262,0.00000000,0.00000000,90.74707031); //object(dockbarr1_la) (4)
- //Cars
- //Newbie Roller / SH Roller
- SetVehicleNumberPlate(CreateVehicle(462,1467.85852051,-1741.39099121,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- SetVehicleNumberPlate(CreateVehicle(462,1468.68847656,-1741.34179688,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- SetVehicleNumberPlate(CreateVehicle(462,1469.43811035,-1741.36450195,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- SetVehicleNumberPlate(CreateVehicle(462,1470.18713379,-1741.38696289,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- SetVehicleNumberPlate(CreateVehicle(462,1470.93615723,-1741.40942383,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- SetVehicleNumberPlate(CreateVehicle(462,1471.58618164,-1741.42822266,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- SetVehicleNumberPlate(CreateVehicle(462,1472.23657227,-1741.44677734,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- SetVehicleNumberPlate(CreateVehicle(462,1472.98596191,-1741.46899414,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
- //Server-Nachricht
- SetTimer("Servernachricht",1800000,1);
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- SetGameModeText("German Reallife Test");
- //AddPlayerClass(11,1486.3182,-1748.4572,15.4453,1.5433,0,0,0,0,0,0); // SH Spawn
- //AddPlayerClass(55,1486.3182,-1748.4572,15.4453,1.5433,0,0,0,0,0,0); // SH Spawn
- //AddPlayerClass(91,1486.3182,-1748.4572,15.4453,1.5433,0,0,0,0,0,0); // SH Spawn
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- //MapIcons//
- SetPlayerMapIcon(playerid,41,1481.0009,-1770.3896,18.7958,38,COLOR_YELLOW);//Stadthalle
- SetPlayerMapIcon(playerid, 1, 1544.4790,-1673.6595,13.5585, 30, COLOR_YELLOW); // LSPD
- SetPlayerMapIcon(playerid, 2, 1480.9323,-1767.7324,18.7958, 38, COLOR_YELLOW); // Stadthalle
- //=======//
- //========Krankenhaus-System========//
- PlayerInfo[playerid][pTot] = 0;
- PlayerInfo[playerid][pTx] = 0;
- PlayerInfo[playerid][pTy] = 0;
- PlayerInfo[playerid][pTz] = 0;
- pIstTot[playerid] = 0;
- //================================//
- // Clear Text beim Online kommen //
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- SendClientMessage(playerid,COLOR_DGREEN,"");
- // =========================== //
- new pname[MAX_PLAYERS],accFormat[128];
- GetPlayerName(playerid,pname,sizeof pname);
- format(accFormat,sizeof accFormat,"Accounts/%s.datei",pname);
- if(fexist(accFormat))
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
- SendClientMessage(playerid,COLOR_DGREEN,"|___ Willkommen ___|");
- SendClientMessage(playerid,COLOR_WHITE," Dein Account wurde gefunden!");
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte gebe dein gewĂ¼nschtes Passwort ein","Registrieren","Abbrechen");
- SendClientMessage(playerid,COLOR_DGREEN,"|___ Willkommen ___|");
- SendClientMessage(playerid,COLOR_WHITE," Dein Account wurde nicht gefunden!");
- }
- //LoginNachricht
- new pName[MAX_PLAYER_NAME];
- new string[48];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s hat den Server Betreten.", pName);
- SendClientMessageToAll(0xAAAAAAAA, string);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- //=======Krankenhaus-System======//
- DestroyPickup(TotenKopf[playerid]);
- //================================//
- new pname[MAX_PLAYERS],accFormat[128];
- GetPlayerName(playerid,pname,sizeof pname);
- format(accFormat,sizeof accFormat,"Accounts/%s.datei",pname);
- if(fexist(accFormat) && Spieler[playerid][eingeloggt])
- {
- dini_IntSet(accFormat,"Admin",Spieler[playerid][Admin]);
- dini_IntSet(accFormat,"Geschlecht",Spieler[playerid][Geschlecht]);
- dini_IntSet(accFormat,"paydaytime",Spieler[playerid][paydaytime]);
- dini_IntSet(accFormat,"wanted",Spieler[playerid][wanted]);
- dini_IntSet(accFormat,"skin",GetPlayerSkin(playerid));
- dini_IntSet(accFormat,"Geld",GetPlayerMoney(playerid));
- dini_IntSet(accFormat,"Level",GetPlayerScore(playerid));
- dini_IntSet(accFormat,"Fraktion",Spieler[playerid][Fraktion]);
- }
- Spieler[playerid][eingeloggt] = 0;
- Spieler[playerid][wanted] = 0;
- //Haus System
- //inHaus[playerid] = -1;
- //Logout Nachricht
- new pName[MAX_PLAYER_NAME];
- new string[56];
- GetPlayerName(playerid, pName, sizeof(pName));
- switch(reason)
- {
- case 0: format(string, sizeof(string),"%s hat den Server verlassen. (Error)", pName);
- case 1: format(string, sizeof(string),"%s hat den Server verlassen. (Normal)", pName);
- case 2: format(string, sizeof(string),"%s hat den Server verlassen. (Kick/Ban)", pName);
- }
- SendClientMessageToAll(0xAAAAAAAA, string);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- //==========Spawn-Nachricht========//
- new PlayerName[24], string[128];
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "~b~Willkommen~n~~w~%s", PlayerName);
- GameTextForPlayer(playerid, string,1000,1);
- //=================================//
- if(Spieler[playerid][Fraktion] == 0)
- {
- SetPlayerColor(playerid, COLOR_WHITE);
- }
- if(Spieler[playerid][Fraktion] == 1)
- {
- SetPlayerColor(playerid, COLOR_BLUE);
- }
- //=========Krankenhaus-System========//
- if(PlayerInfo[playerid][pTot] == 1)
- {
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DGREEN," ");
- SendClientMessage(playerid,COLOR_DRED,"Du bist schwer verletzt ins Krankenhaus gebracht wurden!");
- SendClientMessage(playerid,COLOR_DRED,"Deine Behandlung kostet dich $200.");
- SendClientMessage(playerid,COLOR_DRED,"Du liegst fĂ¼r 20 Sekunden im Krankenhaus!");
- GameTextForPlayer(playerid,"~w~-----------~n~~g~Krankenhaus~n~~r~200$~n~~w~-----------",10000,3);
- ResetPlayerWeapons(playerid);
- TogglePlayerControllable(playerid, 0);
- GivePlayerMoney(playerid,-200);
- ResetPlayerWeapons(playerid);
- SetPlayerPos(playerid,1149.4829,-1344.2615,13.2547);
- SetPlayerCameraPos(playerid,1215.9624,-1323.9651,13.5669);
- SetPlayerCameraLookAt(playerid,1172.1309,-1323.5834,31.4652);
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- //====================================//
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- //==========Krankenhaus-System========//
- PlayerInfo[playerid][pTot] = 1;
- new Float:pX,Float:pY,Float:pZ;
- GetPlayerPos(playerid, pX, pY, pZ);
- TotenKopf[playerid] = CreatePickup(1254,1, pX, pY, pZ);
- PlayerInfo[playerid][pTx] = pX;
- PlayerInfo[playerid][pTy] = pY;
- PlayerInfo[playerid][pTz] = pZ;
- //===================================//
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(realchat == 1)
- {
- new sendername[MAX_PLAYER_NAME], string[180];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "%s sagt: %s", sendername, text);
- ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(setstat,7,cmdtext); // in den Puplic OnPlayerCommandText
- //========PAYCOMMAND=========//
- /*if(strcmp(strget(cmdtext, 0), "/pay", true) == 0)
- {
- new pname[128];
- new name[128];
- new targetid = strval(strget(cmdtext, 1));
- new amount = strval(strget(cmdtext, 2));
- GetPlayerName(playerid, pname, sizeof(pname));
- GetPlayerName(targetid, name, sizeof(name));
- if(!strlen(strget(cmdtext, 1)) || strval(strget(cmdtext, 2))) { SendClientMessage(playerid, COLOR_GREY, "Benutzung: /pay [Playerid/PartOfName] [Money]"); return 1; }
- if(amount > GetPlayerMoney(playerid)) { SendClientMessage(playerid, COLOR_GREY, "So viel Geld hast du nicht bei dir!"); return 1; }
- if(IsPlayerConnected(targetid))
- {
- if(targetid != playerid)
- {
- GivePlayerMoney(playerid, -amount);
- GivePlayerMoney(targetid, amount);
- format(str1, sizeof(str1), " Du hast %s $%d gegeben", name, amount);
- SendClientMessage(playerid, COLOR_BLUE, str1);
- format(str1, sizeof(str1), " %s hat dir $%d gegeben", pname, amount);
- SendClientMessage(targetid, COLOR_BLUE, str1);
- return 1;
- }
- else { SendClientMessage(playerid, COLOR_GREY, "Du kannst dir nicht selber Geld geben!"); return 1; }
- }
- else { SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist nicht Online!"); return 1; }
- }*/
- /*if(strcmp(cmd, "/pay", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new tmp[256]
- new cmd[256]
- new idx;
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "NUTZUNG: /pay [playerid/PartOfName] [amount]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "NUTZUNG: /pay [playerid/PartOfName] [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Du musst mindestens Level 3 sein, um Ă¼ber $1000 abgeben zu können.");
- return 1;
- }
- if(moneys < 1 || moneys > 99999)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Der Betrag muss zwischen $1 und $90000 sein!");
- return 1;
- }
- if (IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[giveplayerid][pLocal] == 106)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Der Befehl ist in dieser Lage nicht erlaubt.");
- return 1;
- }
- if (ProxDetectorS(5.0, playerid, giveplayerid))
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- playermoney = GetPlayerMoney(playerid);
- if (moneys > 0 && playermoney >= moneys)
- {
- ConsumingMoney[giveplayerid] = 1;
- GivePlayerMoney(playerid, (0 - moneys));
- GivePlayerMoney(giveplayerid, moneys);
- format(string, sizeof(string), " Du hast %s(player: %d), $%d gegeben.", giveplayer,giveplayerid, moneys);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), " Du hast $%d von %s(player: %d) bekommen.", moneys, sendername, playerid);
- SendClientMessage(giveplayerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "%s hat $%d dem Spieler %s gegeben.", sendername, moneys, giveplayer);
- PayLog(string);
- if(moneys >= 1000000)
- {
- ABroadCast(COLOR_YELLOW,string,1);
- }
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "* %s nimmt Geld aus seiner Tasche und gibt es %s.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " UngĂ¼ltiger Betrag.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Du musst näher an dem Spieler sein!");
- }
- }//invalid id
- }
- else
- {
- format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- return 1;
- }*/
- //===========================//
- //=======MAKELEADER========//
- //======================//
- //============Teleports=========//
- //==========ADMIN-Befehle========//
- if(strcmp("/ah",cmdtext, true, 10) == 0)
- {
- if(Spieler[playerid][Admin] >=1)
- {
- SendClientMessage(playerid,COLOR_YELLOW,"|-------|Admin-Befehle|--------|");
- SendClientMessage(playerid,COLOR_WHITE,"/gotols - Teleportiert dich nach Los Santos");
- SendClientMessage(playerid,COLOR_WHITE,"/givegun [playerid] [gunid] [ammo] - Gibt dir Waffen");
- SendClientMessage(playerid,COLOR_WHITE,"123");
- SendClientMessage(playerid,COLOR_WHITE,"Hier werden Befehle aufgelistet!");
- SendClientMessage(playerid,COLOR_WHITE,"Das GTA-Great Team!");
- }
- else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
- return 1;
- }
- //============TV===================//
- //================================//
- //=========OOC==============//
- if(strcmp("/o",cmdtext,true,10) == 0)
- {
- new sendername[MAX_PLAYER_NAME], string[180];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "(( %s: %s ))", sendername, cmdtext);
- return 0;
- }
- /*if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pTot] == 1)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Tote können nicht sprechen!");
- return 0;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext, idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) -1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- printf("%s", string);
- }
- return 1;
- }*/
- //==========================//
- //============ADMIN-TELEPORTS============//
- if(strcmp("/gotols",cmdtext, true, 10) == 0)
- {
- if(Spieler[playerid][Admin] >=1)
- {
- SetPlayerPos(playerid,1475.0231,-1749.5789,15.4453);
- SendClientMessage(playerid,COLOR_DGREEN,"Erfolgreich nach LS teleportiert!");
- }
- else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
- return 1;
- }
- /*if(strcmp("/gotosf",cmdtext, true, 10) == 0)
- {
- if(Spieler[playerid][Admin] >=1)
- {
- SetPlayerPos(playerid,x,y,z);
- SendClientMessage(playerid,COLOR_DGREEN,"Erfolgreich nach SF teleportiert!");
- }
- else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
- return 1;
- }*/
- //=====================================//
- //============ADMINON==================//
- if(strcmp("/adminon",cmdtext, true, 10) == 0)
- {
- if(Spieler[playerid][Admin] >=1)
- {
- new pName[MAX_PLAYER_NAME];
- new string[72];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s hat sich als Admin angemeldet! Er darf nicht attackiert werden!", pName);
- SendClientMessageToAll(COLOR_RED, string);
- SetPlayerHealth(playerid,9999999);
- }
- else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
- return 1;
- }
- //=====================================//
- //================ADMINOFF===========//
- if(strcmp("/adminoff",cmdtext, true, 10) == 0)
- {
- if(Spieler[playerid][Admin] >=1)
- {
- new pName[MAX_PLAYER_NAME];
- new string[72];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s hat sich als Admin abgemeldet! Er darf wieder attackiert werden!", pName);
- SendClientMessageToAll(COLOR_RED, string);
- SetPlayerHealth(playerid, 100);
- }
- else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
- return 1;
- }
- //========================================//
- //============GIVEGUN=============//
- if(!strcmp(strget(cmdtext, 0), "/givegun"))
- {
- if(Spieler[playerid][Admin] >= 2)
- {
- new spieleridwaffen = strval(strget(cmdtext, 1));
- new waffe = strval(strget(cmdtext, 2));
- new munni = strval(strget(cmdtext, 3));
- GivePlayerWeapon(spieleridwaffen, waffe, munni);
- return 1;
- }
- else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
- return 1;
- {
- }
- }
- //==============================//
- //=============SETPLAYERHEALTH==========//
- //=======================================//
- /*//============SETSTAT=====================//
- if(strcmp("/setstat", cmdtext, true, 10) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
- SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
- SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
- return 1;
- }
- new stat;
- stat = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
- SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
- return 1;
- }
- new amount;
- amount = strval(tmp)
- if(Spieler[playerid][Admin] >= 1);
- {
- switch (stat)
- {
- case 1:
- {
- Spieler[giveplayerid][Level] = amount;
- format(string, sizeof(string), " Der Spieler wurde auf Level %d gesetzt", amount);
- //SendClientMessage(playerid,COLOR_RED,"Das Level wurde neu gesetzt");
- }
- case 2:
- {
- Spieler[giveplayerid][Admin] = amount;
- format(string, sizeof(string), " Der Spieler wurde auf Admin Level %d gesetzt", amount);
- //SendClientMessage(playerid,COLOR_RED,"Das Admin-Level wurde neu gesetzt");
- }
- case 3:
- {
- Spieler[giveplayerid][Geld] = amount;
- format(string, sizeof(string), " Das Geld des Spielers wurde auf %d gesetzt", amount);
- //SendClientMessage(playerid,COLOR_RED,"Das Geld wurde neu gesetzt");
- }
- default:
- {
- format(string, sizeof(string), "FEHLER: UngĂ¼ltiger Stat-Code", amount);
- //SendClientMessage(playerid,COLOR_WHITE,"FEHLER: UngĂ¼ltiger Stat-Code");
- }
- }
- SendClientMessage(playerid, COLOR_BLUE, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, " Du bist kein Administrator!");
- }
- }
- }
- }
- return 1;
- }*/
- //=====================================//
- //=============================//
- //============STATS===============//
- if(strcmp("/stats", cmdtext, true, 10) == 0)
- {
- new name[MAX_PLAYER_NAME], string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string,sizeof(string),"Name: %s\nLevel: %d\nGeld: %s",name,GetPlayerScore(playerid),GetPlayerMoney(playerid));
- SendClientMessage(playerid,COLOR_WHITE);
- return 1;
- }
- //================================//
- //==================================//
- //==========TouristenHilfe-SH===============//
- if(strcmp("/guide", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid,2.0,1475.6575,-1763.6359,18.7958))
- {
- SendClientMessage(playerid,COLOR_DGREEN,"Das ist der Touristen-Guide!");
- SendClientMessage(playerid,COLOR_DGREEN,"Hier sind alle wichtigen Orte aufgelistet!");
- SendClientMessage(playerid,COLOR_DGREEN,"Wenn du mehr Hilfe brauchst und die Befehle wissen willst");
- SendClientMessage(playerid,COLOR_DGREEN,"Dann benutze /help oder wende dich an einen Admin!");
- ShowPlayerDialog(playerid,guidemenu,DIALOG_STYLE_LIST,"Wichtige Orte","Stadthalle\nBank","Anzeigen","Abbrechen");
- return 1;
- }
- else SendClientMessage(playerid,COLOR_WHITE,"Kein Guide in der Nähe!");
- return 1;
- }
- //============================================//
- if(strcmp("/gps", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid,navimenu,DIALOG_STYLE_LIST,"GPS-System","Stadthalle\nBank","Anzeigen","Abbrechen");
- return 1;
- }
- if(strcmp("/help", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,COLOR_YELLOW,"|-------|Server-Befehle|-------|");
- SendClientMessage(playerid,COLOR_WHITE,"/gps - Ruft das Navigations Menu auf");
- SendClientMessage(playerid,COLOR_WHITE,"/gpsaus - Löscht einen Marker auf der Karte");
- SendClientMessage(playerid,COLOR_WHITE,"/gotols - Teleportiert dich nach Los Santos");
- SendClientMessage(playerid,COLOR_WHITE,"/rules - Zählt alle bekannten Regeln auf");
- SendClientMessage(playerid,COLOR_WHITE,"/guide - Geht nur vor der Stadthalle - Wichtige Orte");
- SendClientMessage(playerid,COLOR_RED,"Mehr Befehle sind in Arbeit!!");
- SendClientMessage(playerid,COLOR_RED,"Euer GTA-Great Team");
- return 1;
- }
- if(strcmp("/gpsaus", cmdtext, true, 10) == 0)
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid,COLOR_DGREEN,"GPS Erfolgreich ausgeschaltet");
- return 1;
- }
- if(strcmp("/rules", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,COLOR_YELLOW,"|-------|Die Server-Regeln|-------|");
- SendClientMessage(playerid,COLOR_WHITE,"Cheaten & Bug-Usen ist strengstens verboten!!");
- SendClientMessage(playerid,COLOR_WHITE,"Wer dabei erwischt wird, kriegt einen Permanenten Bann!");
- SendClientMessage(playerid,COLOR_WHITE,"Es werden keine Zivilisten Grundlos getötet!");
- SendClientMessage(playerid,COLOR_WHITE,"Das bekämpfen unter Gangs und Mafien ist erlaubt!");
- SendClientMessage(playerid,COLOR_WHITE,"Das Grundlose fesseln der Spieler ist ebenfalls verboten");
- SendClientMessage(playerid,COLOR_WHITE,"Und wird mit 30 Minuten Prison bestraft!");
- return 1;
- }
- if(strcmp("/kill", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- if(strcmp("/serverinfo", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "===================|SERVER_INFO|===================");
- SendClientMessage(playerid, COLOR_WHITE, "SERVER BESITZER: Mirko97");
- SendClientMessage(playerid, COLOR_WHITE, "SCRIPTER: Mirko97");
- SendClientMessage(playerid, COLOR_WHITE, "SCRIPT VERSION: 0.1 Closed-Beta");//sversion
- SendClientMessage(playerid, COLOR_WHITE, "FORUM: www.gta-great.forumprofi.de");
- SendClientMessage(playerid, COLOR_YELLOW, "===================================================");
- return 1;
- }
- //=============ZIP-System===========//
- if(strcmp("/clothes", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid,2.0,161.3723,-83.4066,1001.8047))
- {
- SendClientMessage(playerid,COLOR_WHITE,"Wähle bitte eine Kleidungsart aus!");
- ShowPlayerDialog(playerid,DIALOG_KWECHSEL,DIALOG_STYLE_LIST,"ZIP - Kleidung kaufen","Billige Kleidung\nBillige Kleidung 2\nBillige Kleidung 3\nBillige Kleidung 4\nTeure Kleidung\nTeure Kleidung 2\nTeure Kleidung 3\nTeure Kleidung 4","Kaufen","Abbrechen");
- }
- else SendClientMessage(playerid,COLOR_DRED,"Du bist in keinem Kleidungsgeschäft!");
- return 1;
- }
- //===================================//
- if(strcmp("/exit", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- UnFreezePlayer(playerid);
- RemovePlayerFromVehicle(playerid);
- return 1;
- }
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(PolizeiFahrzeug(vehicleid) && !ispassenger)
- {
- if(Spieler[playerid][Fraktion] == 0)
- {
- SendClientMessage(playerid,COLOR_FADE2,"Du hast keine SchlĂ¼ssel fĂ¼r das Fahrzeug!");
- FreezePlayer(playerid);
- UnFreezePlayer(playerid);
- }
- if(Spieler[playerid][Fraktion] == 1)
- {
- SendClientMessage(playerid,COLOR_FADE2,"Du hast den richtigen SchlĂ¼ssel eingesteckt!");
- }
- }
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- DisablePlayerCheckpoint(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)
- {
- //==========PICKUPS=========//
- if(pickupid==shenter)
- {
- SetPlayerPos(playerid,383.9335,173.9228,1008.3828);
- SetPlayerInterior(playerid,3);
- GameTextForPlayer(playerid,"~w~----------~n~~w~Stadthalle~n~~w~----------",3000,5);
- }
- if(pickupid==shexit)
- {
- SetPlayerPos(playerid,1480.9241,-1766.4032,18.7958);
- SetPlayerInterior(playerid,0);
- GameTextForPlayer(playerid,"~w~----------~n~~w~Los Santos~n~~w~----------",3000,5);
- }
- if(pickupid==zipenter)
- {
- SetPlayerPos(playerid,161.391006,-93.159156,1001.804687);
- SetPlayerInterior(playerid,18);
- GameTextForPlayer(playerid,"~w~----------~n~~w~ZIP~n~~w~----------",3000,5);
- SendClientMessage(playerid,COLOR_WHITE,"Willkommen im Kleidungsgeschäft ZIP.");
- }
- if(pickupid==zipexit)
- {
- SetPlayerPos(playerid,1459.3125,-1141.5485,24.0700);
- SetPlayerInterior(playerid,0);
- GameTextForPlayer(playerid,"~w~----------~n~~w~Los Santos~n~~w~----------",3000,5);
- }
- if(pickupid==zipwechsel)
- {
- if(IsPlayerInRangeOfPoint(playerid,2.0,161.3723,-83.4066,1001.8047))
- {
- GameTextForPlayer(playerid,"~w~----------~n~~w~/clothes~n~~w~----------",3000,5);
- }
- else SendClientMessage(playerid,COLOR_DRED,"Du bist in keinem Kleidungsgeschäft!");
- return 1;
- }
- 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[])
- {
- //Register/Login
- new pname[MAX_PLAYERS],accFormat[128];
- GetPlayerName(playerid,pname,sizeof pname);
- format(accFormat,sizeof accFormat,"Accounts/%s.datei",pname);
- if(response)
- {
- switch(dialogid)
- {
- case DIALOG_LOGIN:
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
- return SendClientMessage(playerid,COLOR_RED,"Kein Passwort eingegeben!");
- }
- if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
- {
- Spieler[playerid][Admin] = dini_Int(accFormat,"Admin");
- Spieler[playerid][paydaytime] = dini_Int(accFormat,"paydaytime");
- Spieler[playerid][wanted] = dini_Int(accFormat,"wanted");
- Spieler[playerid][Fraktion] = dini_Int(accFormat,"Fraktion");
- Spieler[playerid][skin] = dini_Int(accFormat,"skin");
- Spieler[playerid][Geschlecht] = dini_Int(accFormat,"Geschlecht");
- GivePlayerMoney(playerid,dini_Int(accFormat,"Geld"));
- SetPlayerScore(playerid,dini_Int(accFormat,"Level"));
- Spieler[playerid][eingeloggt] = 1;
- SendClientMessage(playerid,COLOR_DGREEN,"Erfolgreich eingeloggt!");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
- GameTextForPlayer(playerid,"~r~Falsches Passwort~w~!!",3000,1);
- }
- }
- case DIALOG_REG:
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte gebe dein gewĂ¼nschtes Passwort ein","Registrieren","Abbrechen");
- return SendClientMessage(playerid,COLOR_RED,"Das Passwort ist zu kurz!");
- }
- dini_Create(accFormat);
- dini_Set(accFormat,"Passwort",inputtext);
- Spieler[playerid][eingeloggt] = 1;
- SendClientMessage(playerid,COLOR_RED,"Account erfolgreich erstellt!");
- GameTextForPlayer(playerid,"~b~Automatisch~n~~w~eingeloggt!",3000,1);
- SpawnPlayer(playerid);
- //====Register-Einstellungen====//
- GivePlayerMoney(playerid,10000);
- SetPlayerScore(playerid,1);
- dini_IntSet(accFormat, "Admin", 0);
- dini_IntSet(accFormat, "Geld", 10000);
- dini_IntSet(accFormat, "Level", 1);
- dini_IntSet(accFormat, "wanted", 0);
- dini_IntSet(accFormat, "paydaytime", 0);
- dini_IntSet(accFormat, "Fraktion", 0);
- //===============================//
- ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_MSGBOX,"Geschlecht","Bitte wähle dein Geschlecht aus!","Männlich","Weiblich");
- //ShowPlayerDialog(playerid,DIALOG_TUT,DIALOG_STYLE_MSGBOX,"Das Tutorial","Dies ist ein Reallife Server!\nBitte verhalte dich hier wie im echten Leben!\nWenn du gegen eine Regel verstĂ¶ĂŸt, und es jemand sieht\nKann er es melden!\nDie Regeln kannst du auf\nwww.gta-great.forumprofi.de\nnachlesen!\nAuf dem Server herrscht Rechtsfahr-Gebot!\nAn der Stadthalle wird kein DM betrieben!\nVielen Dank fĂ¼r die Aufmerksamkeit\nDas GTA-Great Team wĂ¼nscht euch viel SpaĂŸ!","SCHLIEĂŸEN","");
- SpawnPlayer(playerid);
- //=========TUTORIAL==============//
- /*if(TutTime[playerid] >= 1)
- {
- TutTime[playerid] += 1;
- if(TutTime[playerid] == 6)
- {
- ClearChatbox(playerid, 10);
- }
- if(TutTime[playerid] == 8)
- {
- SetPlayerPos(playerid,1466.2625,-1672.3363,14.0469);
- SetPlayerCameraPos(playerid, 1477.1622,-1675.8163,14.0469);
- SetPlayerCameraLookAt(playerid,1480.7998,-1764.6787,18.7958);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SendClientMessage(playerid, COLOR_YELLOW, "|----------|GTA-Great|----------|");
- SendClientMessage(playerid, COLOR_WHITE, "Das ist der GTA-Great Server!");
- SendClientMessage(playerid, COLOR_WHITE, "Hier wird das echte Leben nachgespielt!");
- SendClientMessage(playerid, COLOR_WHITE, "Bitte halte dich an die Regeln. /rules");
- SendClientMessage(playerid, COLOR_WHITE, "Auf dem Server herrscht Rechtsfahr-Gebot!");
- SendClientMessage(playerid, COLOR_WHITE, "Dir wird jetzt Schritt fĂ¼r Schritt erklärt");
- SendClientMessage(playerid, COLOR_WHITE, "Wo was ist.");
- }
- else if(TutTime[playerid] == 20)
- {
- ClearChatbox(playerid, 10);
- SetPlayerPos(playerid, 1466.2625,-1672.3363,14.0469); //Stadthalle
- SetPlayerCameraPos(playerid, 1477.1622,-1675.8163,14.0469);
- SetPlayerCameraLookAt(playerid, 1480.7998,-1764.6787,18.7958);
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, COLOR_YELLOW, "|----------|Die Stadthalle|----------|");
- SendClientMessage(playerid, COLOR_WHITE, "Hier in der Stadthalle kannst du dir");
- SendClientMessage(playerid, COLOR_WHITE, "Deinen Personalausweis beantragen und");
- SendClientMessage(playerid, COLOR_WHITE, "Deinen Job abholen!");
- SendClientMessage(playerid, COLOR_WHITE, "Zugleich ist es der Noob-Spawn");
- SendClientMessage(playerid, COLOR_WHITE, "Das DM vor der Stadthalle ist verboten!");
- }
- else if(TutTime[playerid] == 20)
- {
- ClearChatbox(playerid, 10);
- SetPlayerPos(playerid, 1466.2625,-1672.3363,14.0469); //LSPD
- SetPlayerCameraPos(playerid, 1511.6055,-1675.3424,14.0469);
- SetPlayerCameraLookAt(playerid, 1554.1162,-1675.8849,16.1953);
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, COLOR_YELLOW,"|----------|Die Polizei|----------|");
- SendClientMessage(playerid, COLOR_WHITE,"Dies ist die Polizei von Los Santos!");
- SendClientMessage(playerid, COLOR_WHITE,"Die Polizei sorgt dafĂ¼r, dass die Verbrecher");
- SendClientMessage(playerid, COLOR_WHITE,"In das Gefängnis gelangen, und sorgen ebenfalls");
- SendClientMessage(playerid, COLOR_WHITE,"DafĂ¼r, dass die StraĂŸe sauber bleibt und falls gedealt");
- SendClientMessage(playerid, COLOR_WHITE,"Wird, trifft die Polizei auch sofort vor Ort ein!");
- }
- else if(TutTime[playerid] == 60)
- {
- ClearChatbox(playerid, 10);
- SetPlayerPos(playerid,1468.3828,-1181.8523,23.8213);
- SetPlayerCameraPos(playerid,1476.2017,-1168.5448,24.1063);
- SetPlayerCameraLookAt(playerid,1458.6361,-1140.4772,24.0658);
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, COLOR_YELLOW, "|----------|ZIP|----------|");
- SendClientMessage(playerid, COLOR_WHITE, "Das ZIP ist ein Kleidungsgeschäft");
- SendClientMessage(playerid, COLOR_WHITE, "Es ist in der Nähe der Bank in Los Santos");
- SendClientMessage(playerid, COLOR_WHITE, "Aufzufinden! Dort kannst du dir neue Kleidung kaufen!");
- }
- else if(TutTime[playerid] == 80)
- {
- ClearChatbox(playerid, 10);
- SetPlayerPos(playerid, 1492.0797,-1059.7053,25.9922);
- SetPlayerCameraPos(playerid, 1492.3223,-1047.1898,25.9922);
- SetPlayerCameraLookAt(playerid, 1461.9125,-1012.6401,26.8438);
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, COLOR_YELLOW, "|----------|Die Bank|----------|");
- SendClientMessage(playerid, COLOR_WHITE, "Dies ist die Bank in Los Santos!");
- SendClientMessage(playerid, COLOR_WHITE, "Hier kannst du Geld Ă¼berweisen");
- SendClientMessage(playerid, COLOR_WHITE, "Abheben oder anlegen!");
- SendClientMessage(playerid, COLOR_WHITE, "Die Bank kannst du auĂŸerdem auch ausrauben!");
- }
- else if(TutTime[playerid] == 100)
- {
- ClearChatbox(playerid, 10);
- SetPlayerPos(playerid, 1466.2625,-1672.3363,14.0469); //Stadthalle
- SetPlayerCameraPos(playerid, 1477.1622,-1675.8163,14.0469);
- SetPlayerCameraLookAt(playerid, 1480.7998,-1764.6787,18.7958);
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, COLOR_YELLOW, "|----------|Das Ende|----------|");
- SendClientMessage(playerid, COLOR_WHITE, "Dies ist das Ende des Tutorials!");
- SendClientMessage(playerid, COLOR_WHITE, "Wichtige Tipps & Infos findest du unter");
- SendClientMessage(playerid, COLOR_WHITE, "www.gta-great.forumprofi.de");
- SendClientMessage(playerid, COLOR_WHITE, "Wenn du Hilfe brauchst, schreibe einen Report");
- SendClientMessage(playerid, COLOR_WHITE, "Per /report. Oder frag jemanden im OOC Chat /o");
- }
- //===============================//
- }*/
- }
- }
- }
- else
- {
- switch(dialogid)
- {
- case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
- case DIALOG_REG:ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte gebe dein gewĂ¼nschtes Passwort ein","Registrieren","Abbrechen");
- }
- }
- //Navi
- if(dialogid==navimenu)
- {
- if(response)
- {
- if(listitem==0) //Stadthalle
- {
- SetPlayerCheckpoint(playerid,1481.6975,-1735.3652,13.3828,3.0);
- }
- if(listitem==1) //Bank
- {
- SetPlayerCheckpoint(playerid,1462.5588,-1030.8309,23.6563,3.0);
- }
- }
- }
- if(dialogid==guidemenu)
- {
- if(response)
- {
- if(listitem==0) //Stadthalle
- {
- SetPlayerCheckpoint(playerid,1481.6975,-1735.3652,13.3828,3.0);
- }
- if(listitem==1) //Bank
- {
- SetPlayerCheckpoint(playerid,1462.5588,-1030.8309,23.6563,3.0);
- }
- }
- }
- if(dialogid==DIALOG_SEX)
- {
- if(response==1)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Du bist also Männlich!");
- SetPlayerSkin(playerid,19);
- dini_IntSet(accFormat, "Geschlecht", 1);
- }
- if(response==0)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Du bist also Weiblich!");
- SetPlayerSkin(playerid, 12);
- dini_IntSet(accFormat, "Geschlecht", 0);
- }
- }
- if(dialogid==zipwechsel)
- {
- if(response)
- {
- if(listitem == 0) //Billige Kleidung 1 Mann
- {
- SetPlayerSkin(playerid,7);
- }
- if(listitem == 1) //Billige Kleidung 2 Mann
- {
- SetPlayerSkin(playerid,22);
- }
- if(listitem == 2) //Billige Kleidung 3 Frau
- {
- SetPlayerSkin(playerid,13);
- }
- if(listitem == 3) //Billige Kleidung 4 Frau
- {
- SetPlayerSkin(playerid,11);
- }
- if(listitem == 4) //Teure Kleidung 1 Mann
- {
- SetPlayerSkin(playerid,98);
- }
- if(listitem == 5) //Teure Kleidung 2 Mann
- {
- SetPlayerSkin(playerid,46);
- }
- if(listitem == 6) //Teure Kleidung 3 Frau
- {
- SetPlayerSkin(playerid,55);
- }
- if(listitem == 7) // Teure Kleidung 4 Frau
- {
- SetPlayerSkin(playerid,12);
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public Servernachricht()
- {
- new rand = random(2);
- switch(rand)
- {
- case 0:
- {
- SendClientMessageToAll(COLOR_YELLOW,"|-------|Server-Nachricht|-------|");
- SendClientMessageToAll(COLOR_WHITE,"Auf diesem Server wird nicht gehackt!!");
- SendClientMessageToAll(COLOR_WHITE,"Wenn ein Hacker erwischt wird, gibt es einen Permanenten Bann!");
- SendClientMessageToAll(COLOR_WHITE,"Also lest euch bitte die Regeln durch. /rules");
- SendClientMessageToAll(COLOR_WHITE,"Euer GTA-Great Team");
- SendClientMessageToAll(COLOR_YELLOW,"|--------------------------------|");
- }
- case 1:
- {
- SendClientMessageToAll(COLOR_YELLOW,"|-------|Server-Nachricht|-------|");
- SendClientMessageToAll(COLOR_WHITE,"Wenn du eine Frage an einen Admin hast, dann benutze /report");
- SendClientMessageToAll(COLOR_WHITE,"Oder besuche unser Forum unter");
- SendClientMessageToAll(COLOR_WHITE,"www.forum-adresse.de");
- SendClientMessageToAll(COLOR_WHITE,"Wir haben auch einen TeamSpeak Server.");
- SendClientMessageToAll(COLOR_WHITE,"teamspeakip:port");
- SendClientMessageToAll(COLOR_YELLOW,"|--------------------------------|");
- }
- case 2:
- {
- SendClientMessageToAll(COLOR_YELLOW,"|-------|Server-Nachricht|-------|");
- SendClientMessageToAll(COLOR_WHITE,"Dies ist ein Reallife Server, Sinnloses DM ist verboten!");
- SendClientMessageToAll(COLOR_WHITE,"Wenn du auf DM aus bist, kannst du auf einen DM Server gehen!");
- SendClientMessageToAll(COLOR_WHITE,"Wenn du jemanden siehst, der Sinnloses DM begeht, dann melde es einem Admin!");
- SendClientMessageToAll(COLOR_YELLOW,"|--------------------------------|");
- }
- }
- return 1;
- }
- public SetPlayerSpawn(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pTot] == 1)
- {
- SendClientMessage(playerid,COLOR_DRED,"Du bist schwer verletzt ins Krankenhaus gebracht wurden!");
- SendClientMessage(playerid,COLOR_DRED,"Du hast $200 verloren");
- GameTextForPlayer(playerid,"-----------~n~~g~Krankenhaus~n~~r~200$\n-----------",4000,3);
- TogglePlayerControllable(playerid, 0);
- GivePlayerMoney(playerid,-200);
- ResetPlayerWeapons(playerid);
- SetPlayerPos(playerid,1149.4829,-1344.2615,13.2547);
- SetPlayerCameraPos(playerid,1149.4829,-1344.2615,13.2547);
- SetPlayerCameraLookAt(playerid,1172.1309,-1323.5834,31.4652);
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- }
- return 1;
- }
- public TOTTimer()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pTot] == 1)
- {
- pIstTot[i] += 1;
- }
- if(PlayerInfo[i][pTot] == 1 && pIstTot[i] == 2)//die 8 ändern in die anzahl der minuten die ihr im KH sein wollt
- {
- PlayerInfo[i][pTot] = 0;
- pIstTot[i] = 0;
- SetPlayerVirtualWorld(i,0);
- SetPlayerSpawn(i);
- SpawnPlayer(i);
- SendClientMessage(i, COLOR_DRED, "Du bist aus dem Krankenhaus entlassen!");
- DestroyPickup(TotenKopf[i]);
- }
- }
- }
- }
- //-----------------strget---------------
- stock strget(strx[], pos, search = ' ') {
- new arg, ret[128], idxx;
- for (new i = 0; i < strlen(strx); i++) {
- if(strx[i] == search || i == strlen(strx) || strx[i + 1] == 10) {
- arg++;
- if (arg == pos + 1){
- ret[i-idxx] = EOS;
- return ret;
- } else if (arg == pos)
- idxx= i+1;
- }
- else if (arg == pos)
- ret[i - idxx] = strx[i];
- }
- return ret;
- }
- //------------------strtok------------
- stock strtok(const string[], &index,seperator=' ') {
- new length = strlen(string);
- new offset = index;
- new result[255];
- while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- if ((index < length) && (string[index] == seperator))
- {
- index++;
- }
- return result;
- }
- /*stock ProxDetector(Float:radi, playerid, string[],color)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- for(new player;player<MAX_PLAYERS;player++)
- {
- if(!IsPlayerConnected(playerid))continue;
- if(IsPlayerInRangeOfPoint(playerid,radi,x,y,z))SendClientMessage(player,color,string);
- }
- }*/
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- }
- return 1;
- }
- ReturnUser(string[])
- {
- new IsNumerical=1;
- new tmpstring[MAX_PLAYER_NAME];
- for(new cell; cell < strlen(string); cell++) if((string[cell]<='0') || (string[cell]>='9'))IsNumerical=0;
- if(IsNumerical)return strval(string);
- else
- {
- for(new players; players < MAX_PLAYERS; players++)
- {
- GetPlayerName(players,tmpstring,sizeof(tmpstring));
- if(strfind(tmpstring,string,true)>-1)return players;
- }
- }
- return INVALID_PLAYER_ID;
- }
- public Wetter()
- {
- //Wetter 0 = LS, Wetter 1 = SF, Wetter 2 = LV
- Weather[0] = WetterRandomLS[random(sizeof(WetterRandomLS))];
- Weather[1] = WetterRandomSF[random(sizeof(WetterRandomSF))];
- Weather[2] = WetterRandomLV[random(sizeof(WetterRandomLV))];
- }
- public SetWetter()
- {
- new Float:xx, Float:yy, Float:zz;
- for(new i=0; i< GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, xx, yy, zz);
- if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000)) //Los Santos
- {
- SetPlayerWeather(i, Weather[0]);
- //Los Santos
- }
- if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000)) //San Fierro
- {
- SetPlayerWeather(i, Weather[1]);
- //San Fierro
- }
- if((xx > -992.5172 && xx< 4000.0000) && (yy < 4000.0000 && yy > 528.0000)) //Las Venturas
- {
- SetPlayerWeather(i, Weather[2]);
- //Las Venturas
- }
- }
- }
- return 1;
- }
- dcmd_setstat(playerid, params[])
- {
- if(Spieler[playerid][Admin] < 3) return SendClientMessage(playerid,COLOR_GREY,"Du bist kein Admin!");
- new pID,stat,amount;
- if(sscanf(params,"uii",pID,stat,amount))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
- SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
- return 1;
- }
- new name[30],ziel[30],string[128];
- GetPlayerName(playerid, name, sizeof name);
- GetPlayerName(pID, ziel, sizeof ziel);
- if(!IsPlayerConnected(pID) || pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Diesen Spieler gibt es nicht!");
- switch(stat)
- {
- case 1:
- {
- Spieler[pID][Level] = amount;
- format(string, sizeof(string), "Der Spieler wurde auf Level %d gesetzt", amount);
- SendClientMessage(playerid, COLOR_GREY, string);
- }
- case 2:
- {
- Spieler[pID][Admin] = amount;
- format(string, sizeof(string), " Der Spieler wurde auf Admin Level %d gesetzt", amount);
- SendClientMessage(playerid, COLOR_GREY, string);
- }
- case 3:
- {
- Spieler[pID][Geld] = amount;
- format(string, sizeof(string), " Das Geld des Spielers wurde auf %d gesetzt", amount);
- SendClientMessage(playerid, COLOR_GREY, string);
- }
- default:
- {
- SendClientMessage(playerid,COLOR_GREY,"FEHLER: UngĂ¼ltiger Statcode!");
- }
- }
- return 1;
- }
- /*----------------------------------------------------------------------------*-
- Function:
- sscanf
- Params:
- string[] - String to extract parameters from.
- format[] - Parameter types to get.
- {Float,_}:... - Data return variables.
- Return:
- 0 - Successful, not 0 - fail.
- Notes:
- A fail is either insufficient variables to store the data or insufficient
- data for the format string - excess data is disgarded.
- A string in the middle of the input data is extracted as a single word, a
- string at the end of the data collects all remaining text.
- The format codes are:
- c - A character.
- d, i - An integer.
- h, x - A hex number (e.g. a colour).
- f - A float.
- s - A string.
- z - An optional string.
- pX - An additional delimiter where X is another character.
- '' - Encloses a litteral string to locate.
- u - User, takes a name, part of a name or an id and returns the id if they're connected.
- Now has IsNumeric integrated into the code.
- Added additional delimiters in the form of all whitespace and an
- optioanlly specified one in the format string.
- -*----------------------------------------------------------------------------*/
- stock sscanf(string[], format[], {Float,_}:...)
- {
- #if defined isnull
- if (isnull(string))
- #else
- if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
- #endif
- {
- return format[0];
- }
- #pragma tabsize 4
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs(),
- delim = ' ';
- while (string[stringPos] && string[stringPos] <= ' ')
- {
- stringPos++;
- }
- while (paramPos < paramCount && string[stringPos])
- {
- switch (format[formatPos++])
- {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-')
- {
- neg = -1;
- ch = string[++stringPos];
- }
- do
- {
- stringPos++;
- if ('0' <= ch <= '9')
- {
- num = (num * 10) + (ch - '0');
- }
- else
- {
- return -1;
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- num = 0,
- ch = string[stringPos];
- do
- {
- stringPos++;
- switch (ch)
- {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- default:
- {
- return -1;
- }
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- new changestr[16], changepos = 0, strpos = stringPos;
- while(changepos < 16 && string[strpos] && string[strpos] != delim)
- {
- changestr[changepos++] = string[strpos++];
- }
- changestr[changepos] = '\0';
- setarg(paramPos,0,_:floatstr(changestr));
- }
- case 'p':
- {
- delim = format[formatPos++];
- continue;
- }
- case '\'':
- {
- new
- end = formatPos - 1,
- ch;
- while ((ch = format[++end]) && ch != '\'') {}
- if (!ch)
- {
- return -1;
- }
- format[end] = '\0';
- if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
- {
- if (format[end + 1])
- {
- return -1;
- }
- return 0;
- }
- format[end] = '\'';
- stringPos = ch + (end - formatPos);
- formatPos = end + 1;
- }
- case 'u':
- {
- new
- end = stringPos - 1,
- id = 0,
- bool:num = true,
- ch;
- while ((ch = string[++end]) && ch != delim)
- {
- if (num)
- {
- if ('0' <= ch <= '9')
- {
- id = (id * 10) + (ch - '0');
- }
- else
- {
- num = false;
- }
- }
- }
- if (num && IsPlayerConnected(id))
- {
- setarg(paramPos, 0, id);
- }
- else
- {
- #if !defined foreach
- #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
- #define __SSCANF_FOREACH__
- #endif
- string[end] = '\0';
- num = false;
- new
- name[MAX_PLAYER_NAME];
- id = end - stringPos;
- foreach (Player, playerid)
- {
- GetPlayerName(playerid, name, sizeof (name));
- if (!strcmp(name, string[stringPos], true, id))
- {
- setarg(paramPos, 0, playerid);
- num = true;
- break;
- }
- }
- if (!num)
- {
- setarg(paramPos, 0, INVALID_PLAYER_ID);
- }
- string[end] = ch;
- #if defined __SSCANF_FOREACH__
- #undef foreach
- #undef __SSCANF_FOREACH__
- #endif
- }
- stringPos = end;
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos])
- {
- while ((ch = string[stringPos++]) && ch != delim)
- {
- setarg(paramPos, i++, ch);
- }
- if (!i)
- {
- return -1;
- }
- }
- else
- {
- while ((ch = string[stringPos++]))
- {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
- {
- stringPos++;
- }
- while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
- {
- stringPos++;
- }
- paramPos++;
- }
- do
- {
- if ((delim = format[formatPos++]) > ' ')
- {
- if (delim == '\'')
- {
- while ((delim = format[formatPos++]) && delim != '\'') {}
- }
- else if (delim != 'z')
- {
- return delim;
- }
- }
- }
- while (delim > ' ');
- return 0;
- }
- public ClearChatbox(playerid, lines)
- {
- if (IsPlayerConnected(playerid))
- {
- for (new i=0; i<MAX_PLAYERS; i++)
- {
- SendClientMessage(playerid, COLOR_FADE1, " ");
- }
- }
- return 1;
- }
- public PolizeiFahrzeug(vehicleid)
- {
- for (new i = 0; i < sizeof(PolizeiFahrzeuge); i++)
- {
- if(vehicleid== PolizeiFahrzeuge[i])
- {
- return 1;
- }
- }
- return 0;
- }
- stock UnFreezePlayer(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- }
- stock FreezePlayer(playerid)
- {
- TogglePlayerControllable(playerid, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement