Ya Halli Hallo ich habe ein kleinen Level Bug bei meinem Edit.. Naja da gibt es halt ca 16 bots und ein bot system bei der version 1.5b ging alles ich möchte nur wissen was falsch ist
Level Bug
forward BotStats(playerid);
public BotStats(playerid)
{
PlayerInfo[playerid][pBank] = 59273528;
PlayerInfo[playerid][pNummer] = 16;
PlayerInfo[playerid][pCash] = 59263;
PlayerInfo[playerid][pLevel] = 15;
return 1;
}
public SavePlayers()
{
ForAllPlayers(i){
if(IsPlayerConnected(i) && gPlayerLogged[i] && !IsPlayerNPC(i)){
if(strcmp(PlayerInfo[i][pForceName], "Niemand", true) != 0)
{
SetPlayerName(i,PlayerInfo[i][pForceName]);
SetPlayerScore(i, PlayerInfo[i][pLevel]);
}
PlayerUpdate(i);
PlayerCarUpdate(i);
}
}
return 1;
}
das bei onplayerlogin
self_mysql_get_field("Level", val); PlayerInfo[playerid][pLevel] = strval( val );
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
OnPlayerRegister
format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
PlayerUpdate
format(var, sizeof(var), "`Level`='%d', ", PlayerInfo[playerid][pLevel]);
strcat(endstring, var, sizeof(endstring));
sollte reichen
ocmd:startbonus(playerid)
{
if(PlayerInfo[playerid][pTut] == 0) return SendClientMessage(playerid,COLOR_ERRORTEXT,"Du musst erstmal das Tutorial machen.");
if(PlayerInfo[playerid][pStartbonus] == 1) return SendClientMessage(playerid,COLOR_ERRORTEXT,"Du hast bereits den Startbonus eingelößt.");
PlayerInfo[playerid][pStartbonus] = 1;
PlayerInfo[playerid][pLevel] += 2;
GivePlayerMoneys(playerid,250000);
PlayerInfo[playerid][pLKWLic] = 1;
PlayerInfo[playerid][pDetSkill] = 402;
PlayerInfo[playerid][pAnwaltSkill] = 402;
PlayerInfo[playerid][pSexSkill] = 402;
PlayerInfo[playerid][pDrugsSkill] = 402;
PlayerInfo[playerid][pJackSkill] = 402;
PlayerInfo[playerid][pNewsSkill] = 402;
PlayerInfo[playerid][pFishSkill] = 402;
PlayerInfo[playerid][pDetSkill] = 402;
PlayerInfo[playerid][pAnwaltSkill] = 402;
PlayerInfo[playerid][pSexSkill] = 402;
PlayerInfo[playerid][pDrugsSkill] = 402;
PlayerInfo[playerid][pJackSkill] = 402;
PlayerInfo[playerid][pNewsSkill] = 402;
PlayerInfo[playerid][pFishSkill] = 1000;
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
SendClientMessage(playerid,COLOR_YELLOW,"Du hast den Startbonus erfolgreich eingelößt. Du hast folgendes erhalten:");
SendClientMessage(playerid,COLOR_YELLOW,"[Startbonus]: 250.000$, einen LKW Schein, 2 Level Ups und Alle Skills auf 5.");
SendClientMessage(playerid,COLOR_YELLOW,"Wir wünschen dir Viel Spaß auf Los Santos Roleplay. Bei Probleme -> /sup");
return 1;
}