Hallo, wieso spawnt der Spieler direkt beim Spawnen? Ich will dass mes eine Camerafahrt während dem Einloggen gibt. Aber es spawmt direkt am Spawn.
OnPlayerConnect:
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Login[0]);
TextDrawShowForPlayer(playerid, Login[1]);
TextDrawShowForPlayer(playerid, Login[2]);
TextDrawShowForPlayer(playerid, Login[3]);
SetTimer("Connect",4235,false);
return 1;
}
public Connect(playerid)
{
TextDrawHideForPlayer(playerid,Login[0]);
TextDrawHideForPlayer(playerid,Login[1]);
TextDrawHideForPlayer(playerid,Login[2]);
TextDrawHideForPlayer(playerid, Hintergrund);
TextDrawHideForPlayer(playerid, Ueberschrift);
TextDrawHideForPlayer(playerid, Verdichtung);
TextDrawHideForPlayer(playerid, Ticket);
TextDrawHideForPlayer(playerid, Strich);
if(!IsPlayerNPC(playerid))
{
if(mysql_CheckAccount(playerid) == 1)
{
new timestamp = gettime();
new bisgebannt = mysql_GetInt("accounts", "TBan", "Name", SpielerName(playerid));
if(timestamp > bisgebannt)
{
if(mysql_GetInt("accounts", "Banned", "Name", SpielerName(playerid)) == 2)
{
mysql_SetInt("accounts", "TBan", 0, "Name", SpielerName(playerid));
mysql_SetInt("accounts", "Banned", 0, "Name", SpielerName(playerid));
}
else
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(playerid, SpielerInfo[playerid][pName], MAX_PLAYER_NAME);
SpielerInfo[playerid][pBanned] = mysql_GetInt("accounts", "Banned", "Name", SpielerInfo[playerid][pName]);
if(SpielerInfo[playerid][pBanned] != 0)
{
new outputstring[128], outputstring2[128], string[128], string2[128], tsstring[128], hpstring[128], artstring[128], artname[10];
switch(SpielerInfo[playerid][pBanned])
{
case 1:{artname="Permanent";}
case 2:{artname="Temporär";}
}
outputstring = mysql_GetString("accounts", "Banner", "Name", SpielerName(playerid));
outputstring2 = mysql_GetString("accounts", "Grund", "Name", SpielerName(playerid));
Echo(playerid, cRot, "Dein Account wurde gesperrt! Du kannst nicht mit ihm spielen!");
format(string, sizeof(string), "Ausführender Admin: %s", outputstring);
format(artstring, sizeof(artstring), "Bannart: %s", artname);
Echo(playerid, cRot, artstring);
format(string2, sizeof(string2), "Grund: %s", outputstring2);
Echo(playerid, cRot, string);
Echo(playerid, cRot, string2);
format(hpstring, sizeof(hpstring), "Falls du Einwände oder Fragen hast, melde dich im Forum: %s", Homepage);
Echo(playerid, cRot, hpstring);
format(tsstring, sizeof(tsstring), "oder im Teamspeak: %s", Teamspeak);
Echo(playerid, cRot, tsstring);
Kick(playerid);
return 1;
}
}
}
if(timestamp < bisgebannt)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(playerid, SpielerInfo[playerid][pName], MAX_PLAYER_NAME);
SpielerInfo[playerid][pBanned] = mysql_GetInt("accounts", "Banned", "Name", SpielerInfo[playerid][pName]);
if(SpielerInfo[playerid][pBanned] != 0)
{
new outputstring[128], outputstring2[128], string[128], string2[128], tsstring[128], hpstring[128], artstring[128], artname[10];
switch(SpielerInfo[playerid][pBanned])
{
case 1:{artname="Permanent";}
case 2:{artname="Temporär";}
}
outputstring = mysql_GetString("accounts", "Banner", "Name", SpielerName(playerid));
outputstring2 = mysql_GetString("accounts", "Grund", "Name", SpielerName(playerid));
Echo(playerid, cRot, "Dein Account wurde gesperrt! Du kannst nicht mit ihm spielen!");
format(string, sizeof(string), "Ausführender Admin: %s", outputstring);
format(artstring, sizeof(artstring), "Bannart: %s", artname);
Echo(playerid, cRot, artstring);
format(string2, sizeof(string2), "Grund: %s", outputstring2);
Echo(playerid, cRot, string);
Echo(playerid, cRot, string2);
format(hpstring, sizeof(hpstring), "Falls du Einwände oder Fragen hast, melde dich im Forum: %s", Homepage);
Echo(playerid, cRot, hpstring);
format(tsstring, sizeof(tsstring), "oder im Teamspeak: %s", Teamspeak);
Echo(playerid, cRot, tsstring);
Kick(playerid);
return 1;
}
}
}
}
if(IsPlayerNPC(playerid))
{
RemoveBuildingForPlayer(playerid, 1226, -1814.3359, 191.9766, 17.9844, 0.25);
RemoveBuildingForPlayer(playerid, 1226, -1707.1094, 681.4453, 27.7422, 0.25);
RemoveBuildingForPlayer(playerid, 10248, -1680.9922, 683.2344, 19.0469, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2573.2344, 487.3750, 46.7813, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2559.6094, 487.3750, 46.7813, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2542.3828, 506.9219, 46.7813, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2708.2188, 544.4141, 46.7813, 0.25);
return 1;
}
//MAPICONS
SetPlayerMapIcon(playerid,1,1555.2219,-1675.5614,28.3955,30,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,2,2038.1378,-1401.6710,17.3296,22,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,3,1198.3420,-908.7811,48.0625,10,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,4,478.9133,-1538.7943,19.3824,45,0,MAPICON_LOCAL);
Desktop_Check[playerid] = 0;
Desktop_Timer_Started[playerid] = 0;
Desktop_Status[playerid] = 0;
TicketZeile[playerid] = 0;
SupportTicket[playerid] = 0;
TicketAngenommen[playerid] = 0;
DeinSupport[playerid] = 0;
RemoveBuildingForPlayer(playerid, 1226, -1814.3359, 191.9766, 17.9844, 0.25);
RemoveBuildingForPlayer(playerid, 1226, -1707.1094, 681.4453, 27.7422, 0.25);
RemoveBuildingForPlayer(playerid, 10248, -1680.9922, 683.2344, 19.0469, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2573.2344, 487.3750, 46.7813, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2559.6094, 487.3750, 46.7813, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2542.3828, 506.9219, 46.7813, 0.25);
RemoveBuildingForPlayer(playerid, 3876, -2708.2188, 544.4141, 46.7813, 0.25);
if(mysql_CheckAccount(playerid) == 1)
{
new string[200], string2[50], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string2,sizeof(string2),"{FF8A05}Login");
format(string,sizeof(string),"{FFFFFF}Willkommen zurück!\n\nDein Name ist {FF8A05}%s{FFFFFF}.\nGib bitte dein Passwort ein, um den Server zu betreten.\nBitte passe auf, dass nur du dein Passwort kennst!",name);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,string2, string,"Einloggen","Abbrechen");
HideLoginTextdraw(playerid);
}
else if(mysql_CheckAccount(playerid) == 0)
{
new string[200], string2[50], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string2,sizeof(string2),"{FF8A05}Registrierung");
format(string,sizeof(string),"{FFFFFF}Hallo, {FF8A05}%s{FFFFFF}\nDu bist also neu hier.\nGib bitte dein Passwort ein, um dich kostenlos zu registrieren.\nBitte passe auf, dass nur du dein Passwort kennst!",name);
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,string2,string,"Registrieren","Abbrechen");
HideLoginTextdraw(playerid);
}
else
{
new string[128];
SendClientMessage(playerid, 0x004BFFFF, "[Fehler] {e13333}Es ist ein Fehler mit der Datenbank unterlaufen. Bitte wende dich an einen Administrator.");
format(string, sizeof(string), "%s hatte einen Fehler mit der Datenbank und wurde deshalb gekickt.", SpielerName(playerid));
print(string);
Kick(playerid);
}
return 1;
}
Danke im Vorraus
MfG Exon