Beiträge von [TGS]AlmaN

    geht immer noch nicht warum ?
    if(InArena[playerid] == 1 && strcmp(cmdtext ,"/exit", false)) return SendClientMessage(playerid,-1,"Du kannst in der Arena keine Befehle verwenden, außer /exit");
    if (strcmp("/dm", cmdtext, true, 10) == 0)
    {
    InArena[playerid] = 1; //Arena Eintritt
    new rand = random(sizeof(RandomSpawn));
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,24,99999);
    GivePlayerWeapon(playerid,31,99999);
    GivePlayerWeapon(playerid,16,5);
    GivePlayerWeapon(playerid,34,100);
    SetPlayerArmour(playerid,100);
    SendClientMessage(playerid,-1,"Du hast die Deathmatch Arena betreten.");
    minigun[playerid] = 1;
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    SetPlayerHealth(playerid,99.5);
    return 1;
    }
    if(InArena[playerid] == 1 && strcmp("/exit", cmdtext ,true)== 0)
    {
    ResetPlayerWeapons(playerid);
    SendClientMessage(playerid,-1,"Du hast die Deathmatch Arena verlassen.");
    minigun[playerid] = 0;
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    SpawnPlayer(playerid);
    InArena[playerid] = 0; //Arena Austritt
    return 1;
    }

    exit geht nicht
    if(strcmp("/exit",cmdtext,true,15) == 0)
    {
    ResetPlayerWeapons(playerid);
    SendClientMessage(playerid,-1,"Du hast die Deathmatch Arena verlassen.");
    minigun[playerid] = 0;
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    SpawnPlayer(playerid);
    InArena[playerid] = 0; //Arena Austritt
    return 1;
    }

    ocmd:ban(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,weiß,"Keine Befugnisse.");
    new pID, grund[128] ,string[128];
    new IDRang=GetPVarInt(playerid,"Adminlevel");
    new pIDRang=GetPVarInt(pID,"Adminlevel");
    if(pIDRang>IDRang)return SendClientMessage(playerid,grau,"Du kannst keinen ranghöheren Admin bannen.");
    if(sscanf(params,"us",pID,grund))return SendClientMessage(playerid,grau,"INFO: /ban [ID] [Grund]");
    if(IsPlayerNPC(pID))return SendClientMessage(playerid,grau,"Spieler ist nicht online.");
    if(IsPlayerConnected(pID))
    {
    format(string,sizeof(string),"AdmCmd: %s wurde von %s gebannt. Grund: %s ",SpielerName(pID),SpielerName(playerid),grund);
    SendClientMessageToAll(drot,string);
    SetPVarInt(pID,"Baned",1);
    Kick(pID);
    }
    return 1;
    }


    INGAME kommt You are not an Admin

    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(InArena[playerid] == 1 && strcmp("/exit", cmdtext , false) == 0) return SendClientMessage(playerid,-1,"Du kannst in der Arena keine Befehle verwenden, außer /exit");
    if (strcmp("/dm", cmdtext, true, 10) == 0)
    {
    InArena[playerid] = 1; //Arena Eintritt
    new rand = random(sizeof(RandomSpawn));
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,24,99999);
    GivePlayerWeapon(playerid,31,99999);
    GivePlayerWeapon(playerid,16,5);
    GivePlayerWeapon(playerid,34,100);
    SetPlayerArmour(playerid,100);
    SendClientMessage(playerid,-1,"Du hast die Deathmatch Arena betreten.");
    minigun[playerid] = 1;
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    SetPlayerHealth(playerid,99.5);
    return 1;
    }
    if(strcmp("/exit",cmdtext,true,15) == 0)
    {
    InArena[playerid] = 0; //Arena Austritt
    ResetPlayerWeapons(playerid);
    SendClientMessage(playerid,-1,"Du hast die Deathmatch Arena verlassen.");
    minigun[playerid] = 0;
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    SpawnPlayer(playerid);
    return 1;
    }
    return 0;
    }


    ingame funktioniert es nicht :((

    Speichern Stock wie mache ich da jetzt einen Spielstunden zähler


    stock SpielerSpeichern(playerid)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    new tag,monat,jahr;
    new string[20];
    getdate(jahr,monat,tag);
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"%02d/%02d/%d",tag,monat,jahr);
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
    dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
    dini_IntSet(Spielerdatei,"Premiumlevel",GetPVarInt(playerid,"Premiumlevel"));
    dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
    dini_IntSet(Spielerdatei,"Baned",GetPVarInt(playerid,"Baned"));
    dini_IntSet(Spielerdatei,"timeban",GetPVarInt(playerid,"timeban"));
    dini_Set(Spielerdatei,"lastlogin",string);
    }
    return 1;
    }


    Laden Stock


    stock LoadAccount(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
    GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
    SetPVarInt(playerid,"Adminlevel",dini_Int(Spielerdatei,"Adminlevel"));
    SetPVarInt(playerid,"Premiumlevel",dini_Int(Spielerdatei,"Premiumlevel"));
    SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
    SetPVarInt(playerid,"Baned",dini_Int(Spielerdatei,"Baned"));
    if(GetPVarInt(playerid,"Baned")==1)
    {
    SendClientMessage(playerid,ROT,"Du bist vom Server gebannt.");
    Kick(playerid);
    }
    SetPVarInt(playerid,"loggedin",1);
    return 1;
    }