Zeig uns mal deinen OnPlayerConnect, OnPlayerSpawn Callback
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "{65FF5B}%s {FFFFFF}ist dem Server beigetreten.",pname);
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Spieler/%s.txt",name);
if(dini_Exists(Spielerdatei))
{
new IP[512],iptext[512];
GetPlayerIp(playerid,IP,512);
format(iptext,sizeof(iptext),"{FFFFFF}Dein Account wurde in der Datenbank gefunden.\n{FF0000}Supporter & Admins, werden nie nach deinem Passwort fragen!\n\n{09E565}IP-Adresse: %s\n{FFFFFF}Du kannst dich mit deinem Passwort hier Einloggen:",IP);
ShowPlayerDialog(playerid,DIALOG_LOGIN,3,"DeltaOne Deathmatch Login",iptext,"Login","Abbrechen");
}
else
{
new IP[512],iptext[512];
GetPlayerIp(playerid,IP,512);
format(iptext,sizeof(iptext),"{FFFFFF}Herzlich Wilkommen auf dem Deutschen Deathmatch Server: \n{5BFF00}DeltaOne Deathmatch\n{FFFFFF}\nDein Account wurde in der Datenbank {FF0000}nicht gefunden{FFFFFF}!\n\n{0089FF}IP-Adresse: {00FF00}%s\n{FFFFFF}Lege dir einen {00FF00}neuen Account an {FFFFFF}und gebe {00FF00}dein Passwort hier ein:",IP);
ShowPlayerDialog(playerid,DIALOG_REGISTER,1,"DeltaOne Deathmatch Registration",iptext,"Anmelden","Abbrechen");
}
SetPVarInt(playerid,"Duellieren",0);
SetPVarInt(playerid,"DeagleDuel",0);
SetPVarInt(playerid,"MP5Duel",0);
SetPVarInt(playerid,"AK47Duel",0);
SetPVarInt(playerid,"M4A1Duel",0);
SetPVarInt(playerid,"MinigunDuel",0);
SetPVarInt(playerid,"MolotovDuel",0);
SetPVarInt(playerid,"DurbyArena",0);
SetPVarInt(playerid,"DurbyArena2",0);
SetPVarInt(playerid,"DurbyArena3",0);
SetPVarInt(playerid,"Killstreak",0);
SetPVarInt(playerid, "LastHP", 0);
SetPVarInt(playerid, "LastHP1", 0);
SetPVarInt(playerid, "last_anim", 0);
Desktop_Check[playerid] = 0;
Desktop_Timer_Started[playerid] = 0;
Desktop_Status[playerid] = 0;
PlayerPressedJump[playerid] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid,"SkinWahl")==1)
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
SetPVarInt(playerid,"SkinWahl",0);
}
if(GetPVarInt(playerid,"DeagleDuel")==1)
{
new rand = random(sizeof(DeagleRandomSpawn));
SetPlayerPos(playerid,DeagleRandomSpawn[rand][0],DeagleRandomSpawn[rand][1],DeagleRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, DeagleRandomSpawn[rand][3]);
GivePlayerWeapon(playerid,24,1000);
SetPlayerHealth(playerid,100);
return 1;
}
else if(GetPVarInt(playerid,"MP5Duel")==1)
{
new rand = random(sizeof(MP5RandomSpawn));
SetPlayerPos(playerid,MP5RandomSpawn[rand][0],MP5RandomSpawn[rand][1],MP5RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, MP5RandomSpawn[rand][3]);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,29,1000);
SetPlayerHealth(playerid,100);
}
else if(GetPVarInt(playerid,"AK47Duel")==1)
{
new rand = random(sizeof(AK47RandomSpawn));
SetPlayerPos(playerid,AK47RandomSpawn[rand][0],AK47RandomSpawn[rand][1],AK47RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, AK47RandomSpawn[rand][3]);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,30,1000);
GivePlayerWeapon(playerid,24,1000);
SetPlayerHealth(playerid,100);
}
else if(GetPVarInt(playerid,"M4A1Duel")==1)
{
new rand = random(sizeof(M4A1RandomSpawn));
SetPlayerPos(playerid,M4A1RandomSpawn[rand][0],M4A1RandomSpawn[rand][1],M4A1RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, M4A1RandomSpawn[rand][3]);
GivePlayerWeapon(playerid,31,1000);
GivePlayerWeapon(playerid,38,5000);
SetPlayerHealth(playerid,100);
}
else if(GetPVarInt(playerid,"MinigunDuel")==1)
{
new rand = random(sizeof(MinigunRandomSpawn));
SetPlayerPos(playerid,MinigunRandomSpawn[rand][0],MinigunRandomSpawn[rand][1],MinigunRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, MinigunRandomSpawn[rand][3]);
GivePlayerWeapon(playerid,38,50000);
SetPlayerHealth(playerid,100);
}
else if(GetPVarInt(playerid,"MolotovDuel")==1)
{
new rand = random(sizeof(MolotovRandomSpawn));
SetPlayerPos(playerid,MolotovRandomSpawn[rand][0],MolotovRandomSpawn[rand][1],MolotovRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, MolotovRandomSpawn[rand][3]);
GivePlayerWeapon(playerid,18,777);
SetPlayerHealth(playerid,100);
}
else if(GetPVarInt(playerid,"DurbyArena")==1)
{
SetPlayerPos(playerid,-1702.2137,17.7829,3.5547);
ResetPlayerWeapons(playerid);
}
else if(GetPVarInt(playerid,"DurbyArena2")==1)
{
SetPlayerPos(playerid,-1398.103515,937.631164,1036.479125);
SetPlayerInterior(playerid,15);
ResetPlayerWeapons(playerid);
}
else if(GetPVarInt(playerid,"DurbyArena3")==1)
{
SetPlayerPos(playerid,-1464.9073,1557.1515,1052.5313);
SetPlayerInterior(playerid,14);
ResetPlayerWeapons(playerid);
}
SetPlayerColor(playerid,WEISS);
TextDrawShowForPlayer(playerid,Uhr);
TextDrawShowForPlayer(playerid,Datum);
TextDrawShowForPlayer(playerid,Leiste);
TextDrawShowForPlayer(playerid,Leiste1);
TextDrawShowForPlayer(playerid,Kills[playerid]);
TextDrawShowForPlayer(playerid,Tode[playerid]);
TextDrawShowForPlayer(playerid,KDRATE[playerid]);
TextDrawShowForPlayer(playerid,Pres[playerid]);
SetPVarInt(playerid,"Killstreak",0);
return 1;
}