[Hilfe] bei Atmdeposit usw

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Ich habe volgendes Pro. und zwar kann ich diese Befehle nur in der bank einsetzen obwohl ich sie für atms festgelegen habe.



    if(strcmp(cmd, "/atmwithdraw", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (!IsPlayerInRangeOfPoint(playerid, 2.0, 1194.8739,-916.9445,43.1617) || !IsPlayerInRangeOfPoint(playerid, 2.0, 1107.1495,-1745.4132,13.3984)|| !IsPlayerInRangeOfPoint(playerid, 2.0, 1549.6869,-1671.0477,13.5639 )|| !IsPlayerInRangeOfPoint(playerid, 2.0, -2034.9697,-101.3205,35.1641))
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /atmwithdraw [amount]");
    format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new cashdeposit = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /atmwithdraw [amount]");
    format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !");
    return 1;
    }
    ConsumingMoney[playerid] = 1;
    PlayerMoney[playerid] += cashdeposit;
    PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
    format(string, sizeof(string), " You Have Withdrawn $%d from your account Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    return 1;
    }
    return 1;
    }
    if(strcmp(cmd, "/atmbank", true) == 0 || strcmp(cmd, "/atmdeposit", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (!IsPlayerInRangeOfPoint(playerid, 2.0, 1194.8739,-916.9445,43.1617) || !IsPlayerInRangeOfPoint(playerid, 2.0, 1107.1495,-1745.4132,13.3984)|| !IsPlayerInRangeOfPoint(playerid, 2.0, 1549.6869,-1671.0477,13.5639 )|| !IsPlayerInRangeOfPoint(playerid, 2.0, -2034.9697,-101.3205,35.1641))
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /atmdeposit [amount]");
    format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new cashdeposit = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /atmdeposit [amount]");
    format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
    return 1;
    }
    PlayerMoney[playerid] -= cashdeposit;
    new curfunds = PlayerInfo[playerid][pAccount];
    PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
    SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
    format(string, sizeof(string), " Old Balance: $%d", curfunds);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    format(string, sizeof(string), " Deposit: $%d",cashdeposit);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
    format(string, sizeof(string), " New Balance: $%d", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    return 1;
    }
    return 1;
    }
    if(strcmp(cmd, "/atmtransfer", true) == 0 || strcmp(cmd, "/atmwiretransfer", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pLevel] < 3)
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du brauchst Level 3 !");
    return 1;
    }
    if (!IsPlayerInRangeOfPoint(playerid, 2.0, 1194.8739,-916.9445,43.1617) || !IsPlayerInRangeOfPoint(playerid, 2.0, 1107.1495,-1745.4132,13.3984)|| !IsPlayerInRangeOfPoint(playerid, 2.0, 1549.6869,-1671.0477,13.5639 )|| !IsPlayerInRangeOfPoint(playerid, 2.0, -2034.9697,-101.3205,35.1641))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist nicht in einer Bank !");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /transfer [playerid/PartOfName] [amount]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /transfer [playerid/PartOfName] [amount]");
    return 1;
    }
    moneys = strval(tmp);
    if (IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    playermoney = PlayerInfo[playerid][pAccount] ;
    if (moneys > 0 && playermoney >= moneys)
    {
    PlayerInfo[playerid][pAccount] -= moneys;
    PlayerInfo[giveplayerid][pAccount] += moneys;
    format(string, sizeof(string), " Du überweißt $%d zu %s's Konto", moneys, giveplayer,giveplayerid);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    format(string, sizeof(string), " Du bekommst $%d von %s seinem Konto", moneys, sendername, playerid);
    SendClientMessage(giveplayerid, COLOR_GRAD1, string);
    format(string, sizeof(string), "%s überweißt $%d zu %s", sendername, moneys, giveplayer);
    if(moneys >= 500000)
    {
    ABroadCast(COLOR_YELLOW,string,1);
    }
    printf("%s", string);
    PayLog(string);
    PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
    }
    }
    }
    else
    {
    format(string, sizeof(string), " %d is not an active player.", giveplayerid);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    }
    return 1;
    }


    Würde mich freuen wenn einer helfen kann...


    Mfg