#include <a_samp>
#include <dini>
// GameTextForPlayer(playerid,"Sie haben den ~g~BSN betreten :)",3000,3); //IngameText 3000 = 3 Sek
//Farben//
#define GRÜN 0x37C800FF
#define ROT 0xD70000FF
#define GELB 0xE1FF00FF
#define BLAU 0x000FFFFF
#define ORANGE 0xFFAA00FF
#define SCHWARZ 0x000000FF
#define WEIß 0xFAFAFAFF
//Dialoge//
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#pragma tabsize 0
new bsnenter;
new bsnexit;
new spawnenter;
new spawnexit;
new shenter;
new shexit;
new SpawnAufDemFriedhof[MAX_PLAYERS];
new ammuenter;
new ammuexit;
new deagle;
new m4;
new kantana;
new tec9;
//Tore
forward Servernachricht();
main()
{
print("\n----------------------------------");
print("NeroSports V 1.0");
print("----------------------------------\n");
}
public OnGameModeInit()
{
UsePlayerPedAnims();
bsnexit=CreatePickup(1559,1,362.8960,-75.1942,1001.5078);
bsnenter=CreatePickup(1559,1,1199.2592,-918.1434,43.1232);
//////////////////////////BSN/////////////////////////////////////////////////////////
spawnenter=CreatePickup(1318,1,498.7711,-1536.2207,18.9034);
spawnexit=CreatePickup(1318,1,-25.8568,-141.5579,1003.5469);
////////////////////////Spawn-24/7///////////////////////////////////////////////////
shenter=CreatePickup(1318,1,1481.0620,-1772.3140,18.7958);
shexit=CreatePickup(1318,1,390.7682,173.6702,1008.3828);
/////////////////////////Stadthalle//////////////////////////////////////////////////
ammuenter=CreatePickup(1318,1,1368.9159,-1279.7977,13.5469);
ammuexit=CreatePickup(1318,1,315.7705,-143.6648,999.6016);
////////////////////////Ammu Nation LS//////////////////////////////////////////////
deagle=CreatePickup(1274,1,308.4566,-138.9540,999.6016);
m4=CreatePickup(1274,1,310.0890,-138.9529,999.6016);
kantana=CreatePickup(1274,1,308.6350,-137.2699,999.6016);
tec9=CreatePickup(1274,1,309.9517,-137.2699,999.6016);
////////////////////////////////////////////////////////////////////////////////////
DisableInteriorEnterExits();
SetGameModeText("NeroSports V 1.0");
AddPlayerClass(0,479.0461,-1533.4230,19.7015,290.7127,0,0,0,0,0,0); // SpawnNew
//Fahrzeuge//
AddStaticVehicle(481,486.5259,-1541.0374,18.3139,253.2513,8,8); // SpawnCar1
AddStaticVehicle(481,486.5806,-1540.1333,18.3796,253.4115,8,8); // SpawnCar2
AddStaticVehicle(481,486.1603,-1539.0277,18.4809,253.5368,8,8); // SpawnCar3
AddStaticVehicle(481,486.6382,-1538.4436,18.5109,268.8268,8,8); // SpawnCar4
AddStaticVehicle(481,481.6515,-1524.6646,19.4907,330.0468,8,8); // SpawnCar1a
AddStaticVehicle(481,481.3392,-1523.5636,19.5570,331.8015,8,8); // SpawnCar2a
AddStaticVehicle(481,480.4261,-1522.8466,19.6117,337.0299,8,8); // SpawnCar3a
AddStaticVehicle(481,479.8712,-1521.7148,19.6697,348.3644,8,8); // SpawnCar4a
//Objekte//
CreateObject(16061, 1475, -1732.1999511719, 12.5, 0, 0, 270);////////////////////
CreateObject(1215, 1505.1999511719, -1732.3000488281, 12.89999961853, 0, 0, 0);//
CreateObject(2990, 1546, -1627.1999511719, 8.5, 0, 0, 272); //
CreateObject(2990, 1546, -1627.19921875, 16.5, 0, 0, 271.99951171875); //
CreateObject(2990, 1546.3000488281, -1634.4000244141, 16.5, 0, 0, 272); //
CreateObject(2990, 1545.8000488281, -1622.6999511719, 16.5, 0, 0, 271.99951171875);//
CreateObject(4100, 1552.4000244141, -1609.5999755859, 14.10000038147, 0, 0, 228);////
CreateObject(983, 1539.8000488281, -1608.3000488281, 16.60000038147, 0, 0, 0);//////////
CreateObject(983, 1539.7998046875, -1608.2998046875, 16.60000038147, 0, 0, 0);//////////
CreateObject(983, 1539.7998046875, -1608.2998046875, 16.60000038147, 0, 0, 0);/////////LSPD
CreateObject(983, 1543, -1617.8000488281, 16.60000038147, 0, 0, 90);//////////////////LSPD
CreateObject(983, 1539.8994140625, -1614.69921875, 16.60000038147, 0, 0, 0);///////////LSPD
CreateObject(983, 1539.6999511719, -1606.6999511719, 16.60000038147, 0, 0, 0);/////////
CreateObject(983, 1539.6999511719, -1606.6999511719, 16.60000038147, 0, 0, 0);//////////
CreateObject(982, 1552.4000244141, -1602.4000244141, 16.60000038147, 0, 0, 270);///////
CreateObject(982, 1594, -1602.4000244141, 16.60000038147, 0, 0, 270);///////////////////
CreateObject(982, 1578, -1602.3994140625, 16.60000038147, 0, 0, 270);//////////////////
CreateObject(983, 1604.9000244141, -1602.4000244141, 16.60000038147, 0, 0, 270);//////
CreateObject(982, 1608.0999755859, -1615.1999511719, 16.60000038147, 0, 0, 0);////////
CreateObject(983, 1608.0999755859, -1631.1999511719, 16.60000038147, 0, 0, 0);//////////
CreateObject(983, 1608.0999755859, -1634.4000244141, 16.60000038147, 0, 0, 0);//////////
CreateObject(984, 1601.6999511719, -1637.9000244141, 16.60000038147, 0, 0, 270);////////////
//Timer//
SetTimer("Servernachricht",600000,1);
SetTimer("payday",600000000,1);
SetTimer("Servernachricht",600000,true);
//3D-Texte//
Create3DTextLabel("Willkommen am Spawn !\nNero Sports V.1",ROT,479.0461,-1533.4230,19.7015+0.5,40.0,0);
Create3DTextLabel("Desert Eagle\n9000$ - 200 Schuss ",ROT,308.4566,-138.9540,999.6016+0.5,40.0,0);
Create3DTextLabel("M4\n25000$ - 200 Schuss ",ROT,310.0890,-138.9529,999.6016+0.5,40.0,0);
Create3DTextLabel("Kantana\n250$",ROT,308.6350,-137.2699,999.6016+0.5,40.0,0);
Create3DTextLabel("Tec9\n15000$",ROT,309.9517,-137.2699,999.6016+0.5,40.0,0);
//Bots//
ConnectNPC("Peter","peterrec");
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
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_INPUT,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
}
SendClientMessage(playerid,GRÜN,"Herzlich Willkommen auf Nero Sports V 1.0 ! Viel Spaß !");
SendClientMessage(playerid,GRÜN,"Server ist noch im Aufbau ! 30 Prozent");
SendClientMessage(playerid,ROT,"Server ist noch im Aufbau ! Accountverwaltung 0 %Prozent !!");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte dein gewünschtes Passwort ein:","Register","Abbrechen");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessage(playerid,ORANGE,"Tschau & Schönen Tag Noch ! Bis bald.");
return 1;
}
public OnPlayerSpawn(playerid)
{
if(SpawnAufDemFriedhof[playerid] == 1)
{
SetPlayerHealth(playerid,40);
SetPlayerVirtualWorld(playerid,4);
SetPlayerPos(playerid,831.9689,-1101.7942,24.2969);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(playerid,ROT,"Du bist gestorben ! Und spawnst somit am Friedhof !");
SpawnAufDemFriedhof[playerid] = 1;
SetPlayerWorldBounds(playerid, 952.3615,806.5042,-1130.6952,-1072.4276);
ResetPlayerWeapons(playerid);
SetTimerEx("TodTimer",60000,0,"i",playerid);
SendClientMessage(playerid,ROT,"Du bist 3 Minuten am Friedhof !");
SetPlayerVirtualWorld(playerid,9+playerid);
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(cmdtext,"/help",true)==0)
{
SendClientMessage(playerid,ORANGE,"-> Allgemein <-");
SendClientMessage(playerid,ROT,"/quit -> Zum Beenden des Spieles");
SendClientMessage(playerid,ROT,"/help -> Zum aufrufen des Hilfe-Menüs");
SendClientMessage(playerid,ROT,"/status -> Status des Servers ansehen");
return 1;
}
if(strcmp(cmdtext,"/status",true)==0)
{
SendClientMessage(playerid,ORANGE,"-> Serverstatus <-");
SendClientMessage(playerid,ROT,"Fraktionen - 0");
SendClientMessage(playerid,ROT,"Haussystem - 0");
SendClientMessage(playerid,ROT,"Jobsystem - 0");
SendClientMessage(playerid,ROT,"Allgemein - 35");
SendClientMessage(playerid,ROT,"Login/Register - 0");
return 1;
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid,GRÜN,"Mit E startest du deinen Motor !");
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)
{
if(pickupid==bsnenter)
{
SetPlayerPos(playerid,375.962463,-65.816848,1001.507812);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"Willkommen im ~g~Burger Shot North :)",6000,3); //IngameText
}
if(pickupid==bsnexit)
{
SetPlayerPos(playerid,1199.2709,-920.3264,43.1134);
SetPlayerFacingAngle(playerid,187.8819);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Vielen Dank fuer Ihren Besuch ! :)",6000,3);
}
if(pickupid==spawnenter)
{
SetPlayerPos(playerid,-25.132598,-139.066986,1003.546875);
SetPlayerInterior(playerid,16);
GameTextForPlayer(playerid,"Willkommen im ~g~24/7 am Spawn :)",6000,3);
}
if(pickupid==spawnexit)
{
SetPlayerPos(playerid,495.6943,-1537.8698,18.8896);
SetPlayerFacingAngle(playerid,114.3280);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Vielen Dank fuer Ihren Besuch ! :)",6000,3);
}
if(pickupid==shenter)
{
SetPlayerPos(playerid,384.808624,173.804992,1008.382812);
SetPlayerInterior(playerid,3);
GameTextForPlayer(playerid,"Willkommen in ~g~der Stadthalle :)",6000,3);
}
if(pickupid==shexit)
{
SetPlayerPos(playerid,1481.1628,-1769.4895,18.7958);
SetPlayerFacingAngle(playerid,355.7119);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Vielen Dank fuer Ihren Besuch ! :)",6000,3);
}
if(pickupid==ammuenter)
{
SetPlayerPos(playerid,314.820983,-141.431991,999.601562);
SetPlayerInterior(playerid,7);
GameTextForPlayer(playerid,"Willkommen im ~g~Ammu-Nation Los Santos :)",6000,3);
}
if(pickupid==ammuexit)
{
SetPlayerPos(playerid,1365.1454,-1280.1664,13.5469);
SetPlayerFacingAngle(playerid,85.7677);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Vielen Dank fuer Ihren Besuch ! :)",6000,3);
}
/////WAFFEN AMMU NATION/////
////Eagle////
if(pickupid==deagle)
{
if(GetPlayerMoney(playerid)>8999)
{
GivePlayerMoney(playerid,-9000);
SendClientMessage(playerid,BLAU,"Danke für den Kauf von der Waffe ''Desert Eagle - 200 Schuss'' !");
GivePlayerWeapon(playerid,24,200);
}
else
{
SendClientMessage(playerid,ROT,"Du hast nicht genung Geld für die Desert Eagle !");
}
}
//////m4/////
if(pickupid==m4)
{
if(GetPlayerMoney(playerid)>25000)
{
GivePlayerMoney(playerid,-25000);
SendClientMessage(playerid,BLAU,"Danke für den Kauf von der Waffe ''M4 - 200 Schuss'' !");
GivePlayerWeapon(playerid,31,200);
}
else
{
SendClientMessage(playerid,ROT,"Du hast nicht genung Geld für die M4 !");
}
}
///kantana///
if(pickupid==kantana)
{
if(GetPlayerMoney(playerid)>250)
{
GivePlayerMoney(playerid,-250);
SendClientMessage(playerid,BLAU,"Danke für den Kauf von der Waffe ''Kantana'' !");
GivePlayerWeapon(playerid,8,200);
}
else
{
SendClientMessage(playerid,ROT,"Du hast nicht genung Geld für die Kantana !");
}
}
///tec9//
if(pickupid==tec9)
{
if(GetPlayerMoney(playerid)>15000)
{
GivePlayerMoney(playerid,-15000);
SendClientMessage(playerid,BLAU,"Danke für den Kauf von der Waffe ''Tec9'' !");
GivePlayerWeapon(playerid,32,200);
}
else
{
SendClientMessage(playerid,ROT,"Du hast nicht genung Geld für die Tec9 !");
}
}
//////////////////////////////////
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_LOGIN)
{
if(response==0)
{
SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen !");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,ROT," -> Du hast kein Passwort angegeben oder dein Passwort ist zu kurz ! <-");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden\nGib bitte dein Passwort ein.","Login","Abbrechen");
return 1;
}
else
{
Login(playerid,inputtext);
return 1;
}
}
}
if(dialogid==DIALOG_REGISTER)
{
if(response==0)
{
SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen !");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,ROT," -> Du hast kein Passwort angegeben oder dein Passwort ist zu kurz ! <-");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte dein gewünschtes Passwort ein:","Register","Abbrechen");
return 1;
}
else
{
Register(playerid,inputtext);
return 1;
}
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
/////////////////////////TIMER///////////
public Servernachricht()
{
SendClientMessageToAll(BLAU,"Server ist noch im Aufbau ! ");
return 1;
}
stock SpielerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
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.");
dini_IntSet(Spielerdatei,"Level",0);
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"),false))
{
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
SendClientMessage(playerid,BLAU,"Erfolgreich eingeloggt.");
return 1;
}
else
{
SendClientMessage(playerid,BLAU,"Falsches Passwort.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden\nGib bitte dein Passwort ein.","Login","Abbrechen");
return 1;
}
}
Bittesehr