Beiträge von Silverdark

    Mit welchem Programm konnte man eig. 2 Betriebsysteme haben. Also ich meine so eine Art Virtual PC . Wenn du das Programm beendest wird dort alles gelöscht...

    Joe es geht einfacher


    format(opunkto,25,"%2d:%2d",stunde,minute)


    also so
    public uhrzeitladen()
    {
    new stunde,minute,opunkto[32];
    gettime(stunde,minute);
    format(opunkto,25,"%2d:%2d",stunde,minute);}
    TextDrawSetString(uhr,opunkto);
    return 1;
    }

    if(strcmp(cmd, "/bankautomat", true) == 0)
    {
    if(PlayerToPoint(2.0, playerid,1537.4069,-1648.9375,13.5469 )) {
    SendClientMessage(playerid, COLOR_LIGHTBLUE,"******-----------Ban Automat Hilfe-----------******");
    SendClientMessage(playerid, COLOR_GREEN,"Befehle: /bawithdraw /babank /babalance /batransfer");
    SendClientMessage(playerid, COLOR_GREEN,"******----Bankautomat system by [AM]-Alex----******"); }
    else { SendClientMessage(playerid, COLOR_RED, "Du bist nicht am Bankautomat!"); }
    return 1;
    }
    //------------------Info Ende---------------------------------
    if(strcmp(cmd, "/bawithdraw", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(!PlayerToPoint(2.0, playerid,1537.4069,-1648.9375,13.5469 ))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist nicht am Bankautomat!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /bawithdraw [amount]");
    format(string, sizeof(string), " Du hast $%d in deinem Account.", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new cashdeposit = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /bawithdraw [amount]");
    format(string, sizeof(string), " Du hast $%d in deinem 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, "/babank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(!PlayerToPoint(2.0, playerid,1537.4069,-1648.9375,13.5469 ))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist nicht am Bankautomat!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /babank [amount]");
    format(string, sizeof(string), " Du hast $%d iin deinem Account.", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new cashdeposit = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /babank [amount]");
    format(string, sizeof(string), " Du hast $%d in deinem 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), " Alter Kontostand: $%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), " Neuer Kontostand: $%d", PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    return 1;
    }
    return 1;
    }
    if(strcmp(cmd, "/babalance", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(!PlayerToPoint(2.0, playerid,1537.4069,-1648.9375,13.5469 ))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist nicht am Bankautomat!");
    return 1;
    }
    format(string, sizeof(string), " Du $%d in deinem Account.",PlayerInfo[playerid][pAccount]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    }
    return 1;
    }
    if(strcmp(cmd, "/badice", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new dice = random(6)+1;
    if (gDice[playerid] == 1)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* %s Throws a Dice that lands on %d", sendername,dice);
    ProxDetector(5.0, playerid, string, TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You Don't Have A Dice");
    return 1;
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/batransfer", true) == 0 || strcmp(cmd, "/bawiretransfer", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pLevel] < 3)
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du brauchst level 3 !");
    return 1;
    }
    if(!PlayerToPoint(2.0, playerid,1537.4069,-1648.9375,13.5469 ))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist nicht am Bankautomat!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /batransfer [playerid/PartOfName] [amount]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /batransfer [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), " You have transferd $%d to %s's account", moneys, giveplayer,giveplayerid);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    format(string, sizeof(string), " You have recieved $%d to into your account from %s", moneys, sendername, playerid);
    SendClientMessage(giveplayerid, COLOR_GRAD1, string);
    format(string, sizeof(string), "%s transferd $%d to %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 ist nicht im Spiel!", giveplayerid);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    }
    return 1;
    }

    Beispiel:


    eigenes Callback:
    dcmd_give(playerid,params[])
    {
    new player;
    if(sscanf(params,"i",player))
    {
    return 1;/* hast keine Id gegeben*/
    }
    if(IsPlayerConnected(player))
    {
    new fuehrerschein[MAX_PLAYERS];
    fuehrerschein[player] = 1;
    // Du hast X einen Führerschein gegeben
    return 1;
    }
    #pragma unused playerid
    return 1;
    }


    OnPlayerCommandTExt
    dcmd(give,4,cmdtext);

    new OldSkin[MAX_PLAYERS];



    if (strcmp("/copls", cmdtext, true) == 0)
    {
    OldSKin[playerid] = GetPlayerSkin(playerid);
    gTeam[playerid] = TEAM_COPS;
    GameTextForPlayer(playerid,"~b~Du bist nun LSPD Cop",10000,1);
    SendClientMessage(playerid,BLAU, "Willkommen im Dienst");
    SendClientMessage(playerid,BLAU, "Für Hilfe gebe /jobpd ein.");
    SetPlayerPos(playerid,256.7657,79.7133,1003.6406);
    SetPlayerInterior(playerid,0);
    SetPlayerSkin(playerid,280);
    SetTimerEx("SAPD",900000,1,"i",playerid);
    GameTextForAll("~b~ %d ist nun LSPD-Cop",10000,3);
    }


    im Timer dann
    public notmorecop(playerid);
    {
    gTeam[playerid] = TEAM_..; // ... mit deinen Team Zivilist auswächseln
    SetPlayerPos(playerid, x , y, z ); // deine cords
    SetPlayerSkin(playerid, OldSkin[playerid]);
    }