Hallo liebe Community...
Anscheinend ist OnPlayerSpawn total verbuggt...
Er zeigt manchmal dinge an, die eigtl. garnicht da sein sollten wie Premium etc...
public OnPlayerSpawn(playerid)
{
switch(GetPVarInt(playerid,"Gang"))
{
case 0:{SetPlayerPos(playerid,ballasspawn);SetPlayerColor(playerid,PINK);}
case 1:{SetPlayerPos(playerid,grovespawn);SetPlayerColor(playerid,GRÜN);}
case 2:{SetPlayerPos(playerid,vagosspawn);SetPlayerColor(playerid,GELB);}
case 3:{SetPlayerPos(playerid,brigadaspawn);SetPlayerColor(playerid,GRAU);}
case 4:{SetPlayerPos(playerid,lcnspawn);SetPlayerColor(playerid,SCHWARZ);}
}
GivePlayerWeapon(playerid,24,250);//Deagle
GivePlayerWeapon(playerid,30,300);//AK
SetPlayerScore(playerid,1);
if(GetPVarInt(playerid, "Premium") == 1)
{
GivePlayerWeapon(playerid,34,100);//Sniper
GivePlayerWeapon(playerid,31,250);//M4
GivePlayerWeapon(playerid,25,250);//Pumpe
SetPlayerScore(playerid,2);
}
if(GetPVarInt(playerid, "Admin") == 1)
{
SetPlayerScore(playerid, 3);
}
if(GetPVarInt(playerid, "Admin") == 2)
{
SetPlayerScore(playerid, 4);
}
if(DM1[playerid]==1)
{
new rand = random(sizeof(DM1Spawns));
SetPlayerPos(playerid,DM1Spawns[rand][0],DM1Spawns[rand][1],DM1Spawns[rand][2]);
SetPlayerFacingAngle(playerid,DM1Spawns[rand][3]);
ResetPlayerWeapons(playerid); // Spieler Waffen entnehmen
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,27,250);
}
if(DM2[playerid]==1)
{
new rand = random(sizeof(DM2Spawns));
SetPlayerPos(playerid,DM2Spawns[rand][0],DM2Spawns[rand][1],DM2Spawns[rand][2]);
SetPlayerFacingAngle(playerid,DM2Spawns[rand][3]);
ResetPlayerWeapons(playerid); // Spieler Waffen entnehmen
GivePlayerWeapon(playerid,28,500);
GivePlayerWeapon(playerid,24,250);
}
if(MINIGUN[playerid]==1)
{
new rand = random(sizeof(MINISpawns));
SetPlayerPos(playerid,MINISpawns[rand][0],MINISpawns[rand][1],MINISpawns[rand][2]);
SetPlayerFacingAngle(playerid,MINISpawns[rand][3]);
ResetPlayerWeapons(playerid); // Spieler Waffen entnehmen
GivePlayerWeapon(playerid,38,5000); //gibt Spieler Minigun
}
if(NORMALSPAWN[playerid]==1)
{
//WIllkommensnachricht
new WelcomeSystem[256];
new string1[256],string2[256],string3[356],string4[256],string5[256],string6[256],string7[256],mstring[1900];
format(string5,sizeof string5,"Willkommen auf National Deathmatch\n___________________________________________________________________");
format(string1, sizeof string1, "\nWir sind ein deutscher Deathmatch Server!.\n");
format(string2, sizeof string2, "Hier kannst du dich austoben oder auch neue Dinge probieren.\n");
format(string3, sizeof string3, "Je Mehr Kills du hast, desto einen besseren Rang bekommst du etc.\n");
format(string4, sizeof string4, "Die Accounts werden gespeichert und man kann immer wieder auf diese zugreifen.");
format(string6, sizeof string6, "\nEs gibt auch einen Donatorrang, den man für einmalige 4,99€ bekommt!");
format(string7, sizeof string7, "\n------------------------------------------------------------------------------------------------");
format(mstring, sizeof mstring, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",string5,string1,string2,string3,string4,string7,string6,string7);
format(WelcomeSystem, sizeof WelcomeSystem, "Willkommen");
ShowPlayerDialog(playerid,DIALOG_WILLKOMMEN,0,WelcomeSystem,mstring,"Spielen","");
}
if(GetPVarInt(playerid, "RegTut") == 1)
{
ShowPlayerDialog(playerid,DIALOG_TUTORIAL,DIALOG_STYLE_MSGBOX,"Tutorial","Möchtest du das Tutorial anschauen?","Ja","Nein");
}
new str_Update[32];
format(str_Update, 32, "Kills: %d", GetPVarInt(playerid, "Kills"));
UpdateTextDraw(playerid, Death_Kills[playerid], str_Update);
format(str_Update, 32, "Deaths: %d", GetPVarInt(playerid, "Deaths"));
UpdateTextDraw(playerid, Death_Deaths[playerid], str_Update);
new Float: Health;
GetPlayerHealth(playerid, Health);
format(str_Update, 32, "Energie: %d", floatround(Health));
UpdateTextDraw(playerid, Death_Energie[playerid], str_Update);
TextDrawShowForPlayer(playerid, Name_Display[playerid]);
return 1;
}
Grüße