Hey ich kämpfe heute schon den ganzen tag...
aber ich schaffe es einfach nicht...
eigentlich müsste es funktionieren..
//Spieler Enum
Float:LogX,
Float:LogY,
Float:LogZ,
Float:LogA
//OnPlayerSpawn
new Float:X = PlayerInfo[playerid][LogX];
new Float:Y = PlayerInfo[playerid][LogY];
new Float:Z = PlayerInfo[playerid][LogZ];
new Float:A = PlayerInfo[playerid][LogA];
new ftext[20];
if(PlayerInfo[playerid][pMember] == 0){ ftext = "Zivilist"; }
else if(PlayerInfo[playerid][pMember] == 1){ ftext = "LSPD"; }
else if(PlayerInfo[playerid][pMember] == 2){ ftext = "LSFD"; }
else if(PlayerInfo[playerid][pMember] == 3){ ftext = "Medic"; }
else if(PlayerInfo[playerid][pMember] == 4){ ftext = "Ordnungsamt"; }
else if(PlayerInfo[playerid][pMember] == 5){ ftext = "Spedition"; }
else if(PlayerInfo[playerid][pMember] == 6){ ftext = "Termis Bratwa"; }
else if(PlayerInfo[playerid][pMember] == 7){ ftext = "West Coast Customs"; }
else if(PlayerInfo[playerid][pMember] == 8){ ftext = "Dillimore Devils"; }
else if(PlayerInfo[playerid][pMember] == 9){ ftext = "Gourillas"; }
new string[128],string2[128],string3[128];
SetPlayerPos(playerid,X,Y,Z);
SetPlayerFacingAngle(playerid,A);
format(string,sizeof(string),"Du wurdest als %d Administrator gespawnt.",PlayerInfo[playerid][pAdmin]);
format(string2,sizeof(string2),"Du wurdest als %d Supporter gespawnt.",PlayerInfo[playerid][pSupporter]);
format(string3,sizeof(string3),"Du wurdest mit der Fraktion %s gespawnt.",ftext);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid,Türkis,string);
}
if(PlayerInfo[playerid][pSupporter] >= 1)
{
SendClientMessage(playerid,Türkis,string2);
}
if(PlayerInfo[playerid][pLeader] == 0||PlayerInfo[playerid][pMember] == 0)
{
SendClientMessage(playerid,Türkis,string3);
}
//OnPlayerDisconnect
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
PlayerInfo[playerid][LogX] = X;
PlayerInfo[playerid][LogY] = Y;
PlayerInfo[playerid][LogZ] = Z;
PlayerInfo[playerid][LogA] = A;
SavePlayer(playerid);
//SpielerSpeichern
mysql_SetFloat("accounts", "LastX", PlayerInfo[playerid][LogX], "Name", PlayerInfo[playerid][pName]);
mysql_SetFloat("accounts", "LastY", PlayerInfo[playerid][LogY], "Name", PlayerInfo[playerid][pName]);
mysql_SetFloat("accounts", "LastZ", PlayerInfo[playerid][LogZ], "Name", PlayerInfo[playerid][pName]);
mysql_SetFloat("accounts", "LastA", PlayerInfo[playerid][LogA], "Name", PlayerInfo[playerid][pName]);
//SpielerLaden
PlayerInfo[playerid][LogX] = mysql_GetFloat("accounts", "LastX", "Name", PlayerInfo[playerid][pName]);
PlayerInfo[playerid][LogY] = mysql_GetFloat("accounts", "LastY", "Name", PlayerInfo[playerid][pName]);
PlayerInfo[playerid][LogZ] = mysql_GetFloat("accounts", "LastZ", "Name", PlayerInfo[playerid][pName]);
PlayerInfo[playerid][LogA] = mysql_GetFloat("accounts", "LastA", "Name", PlayerInfo[playerid][pName]);