mach das mit playertopoint und deine neuen punkte mal alles unter einnander und bei den neuen die du hinzugefügt hast vor diesem if immer ein else also so else if(PlayerToPoint
also so
if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLocal] != 103))
else if (PlayerToPoint(8.0, playerid, 1495.8094,-1749.6765,15.4453)
else if (PlayerToPoint(3.0, playerid, 1210.5420,-915.5986,43.0301)
else if (PlayerToPoint(3.0, playerid, 552.7684,-1293.7339,17.2482)
else if (PlayerToPoint(3.0, playerid, -1980.8738,145.6721,27.6875)
{
SendClientMessage(playerid, COLOR_GREY, "Du bist nicht in der Bank !");
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZE: /bank [amount]");
format(string, sizeof(string), "Du hast $%d auf deinem Konto.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZE: /bank [amount]");
format(string, sizeof(string), "Du hast $%d auf deinem Konto.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht so viel");
return 1;
}
GivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
format(string, sizeof(string), " Alter Kontostand: $%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), " Eingezahlt: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
format(string, sizeof(string), " Neuer Kontostand: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
return 1;
}