ONPlayerSpawn
Function OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
M_OnPlayerSpawn(playerid);
TextDrawShowForPlayer(playerid,Copyright);
TextDrawShowForPlayer(playerid,Datum);
motd(playerid);
if(PlayerInfo[playerid][pTot] == 1 && PlayerInfo[playerid][pLevel] > 1)
{
GameTextForPlayer(playerid, "~r~Gestorben!", 5000, 3);
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_YELLOW, "::... Krankenhaus ...:::");
SendClientMessage(playerid, COLOR_LIGHTRED, "Da du keine hp mehr hattest wurdest du ins. ");
SendClientMessage(playerid, COLOR_LIGHTRED, " Krankenhaus gebracht. ");
SendClientMessage(playerid, COLOR_LIGHTRED, " Du wirst etwa 30 Sekunden behandelt. ");
SendClientMessage(playerid, COLOR_LIGHTRED, "Pass in Zukunft besser auf dich auf! ");
SetPlayerSpawn(playerid);
Das ist nun nicht alles:D
ONPlayerConnect
Function OnPlayerConnect(playerid)
{
TicketZeile[playerid] = 0;
SupportTicket[playerid] = 0;
TicketAngenommen[playerid] = 0;
DeinSupport[playerid] = 0;
new xDIP[16];
GetPlayerIp(playerid,xDIP,16);
if(!strcmp(xDIP,"175.132.",false,8))
{
if(strcmp(xDIP[8],"0.100",false,5))
if(strcmp(xDIP[8],"0.101",false,5))
if(strcmp(xDIP[8],"0.102",false,5))
SetPlayerSkin(playerid, 560);
}
for(new i = 0; i < AUTOHAUSER; i++)
{
SetPlayerMapIcon(playerid, 30+i, DtcSonstiges[i][0][0],DtcSonstiges[i][0][1],DtcSonstiges[i][0][2], 55, COLOR_YELLOW);
}
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " Warte kurz...du kannst dich gleich einloggen/registrieren ");
SendClientMessage(playerid, COLOR_GRAD1, "...Der Server sucht deinen Account...");
//------------------------------------------------------------------------------
M_OnPlayerConnect(playerid);
TextDrawShowForPlayer(playerid,Copyright);
TextDrawShowForPlayer(playerid,Ts3);
TextDrawShowForPlayer(playerid,Datum);
//===================================BOTS ==================================//
if(Security != 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Host hat die Regeln gebrochen Maßnahmen wurden eingeleitet.");
Kick(playerid);
return 1;
}
gActivePlayers[playerid]++;
numplayers++;
new plname[MAX_PLAYER_NAME];
new string[64];
public OnPlayerLogin(playerid,password[])
{
new tmp2[256];
new string2[128];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
{
new key[ 256 ] , val[ 256 ];
new Data[ 256 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
}//end while
fclose(UserFile);//close the file after everything has been read in the while
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
return 1;
}
PlayerInfo[playerid][pAdjustable] = 0;
ResetPlayerMoney(playerid);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
/*if(WantedPoints[playerid] == 2) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; } }
else if(WantedPoints[playerid] >= 4 && WantedPoints[playerid] <= 5) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; } }
else if(WantedPoints[playerid] >= 6 && WantedPoints[playerid] <= 7) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; } }
else if(WantedPoints[playerid] >= 8 && WantedPoints[playerid] <= 9) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; } }
else if(WantedPoints[playerid] >= 10 && WantedPoints[playerid] <= 11) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; } }
else if(WantedPoints[playerid] >= 12 && WantedPoints[playerid] <= 13) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; } }
else if(WantedPoints[playerid] >= 14) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; } }
SetPlayerWantedLevel(playerid,WantedLevel[playerid]);
*/
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pSHealth] = 0.0;
PlayerInfo[playerid][pHealth] = 99.0;
PlayerInfo[playerid][pPos_x] = 2246.6;
PlayerInfo[playerid][pPos_y] = -1161.9;
PlayerInfo[playerid][pPos_z] = 1029.7;
PlayerInfo[playerid][pInt] = 15;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pModel] = 212;
PlayerInfo[playerid][pPhousekey] = 255;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pReg] = 1;
GivePlayerMoney(playerid, 10000);
}
if(PlayerInfo[playerid][pLevel] == -999) //autoban
{
format(string2,sizeof(string2)," %s versucht mit seinem gebannten Account online zu kommen und wurde gekickt!",playername2);
ABroadCast(COLOR_LIGHTRED,string2,1);
SendClientMessage(playerid,COLOR_RED," Dein Account ist gebannt! Mach dir mal Gedanken, warum...");
Kick(playerid);
return 1;
}
Ein Backup habe ich gemacht.
Aber beim downloaden des Backups, hat der immer ein Error
"Fehler beim downloaden des Backups"