Beiträge von smaxzz


    #include <ocmd>
    #define Grün 0xFFFF00AD




    if(strcmp(cmd, "/money", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutzung: /money [Spieler ID] [Geldbetrag]");
    return 1;
    }
    new playa;
    new money;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    money = strval(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 1338) //Dein AdminLevel
    {
    if(IsPlayerConnected(playa))
    {
    if(playa != INVALID_PLAYER_ID)
    {
    ResetPlayerMoney(playa);
    ConsumingMoney[playa] = 1;
    GivePlayerMoney(playa, money);
    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: %s hat %s's Geld auf %d$ gesettet!",sendername,giveplayer,money);
    ABroadCast(COLOR_LIGHTRED,string,4);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Das darfst du nicht tun!");
    }
    }
    return 1;
    }


    LG
    smaxzz


    Viel spaß damit

    Teste das mal so



    stock [color=#8b0000]Register[/color](playerid,key[])
    {
    [color=blue]new[/color] [size=10]Playerdatei[/size][size=10][[/size][size=10][color=#ff8c00]128[/color][/size][size=10]];[/size]
    [color=blue]new[/color] name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,[color=blue]sizeof[/color](name));
    format(Playerdatei,[color=blue]sizeof[/color](Playerdatei),[color=red]"/Accounts/%s.ini"[/color],name);
    dini_Create(Playerdatei);
    dini_Set(Playerdatei,[color=red]"Passwort"[/color],key);
    dini_Set(Playerdatei,[color=red]"Admin"[/color],[color=#ff8c00]0[/color]);
    SetPlayerScore(playerid,[color=#ff8c00]0[/color]);
    SetPVarInt(playerid,[color=#ff8c00]0[/color]);
    [color=blue]return[/color] [color=#ff8c00]1[/color];
    }