Beiträge von Halo

    dcmd_mute(playerid,params[])
    {
    new giveplayerid;
    if(sscanf(params, "u", giveplayerid))
    return SendClientMessage(playerid,rot,"Fehler: /mute [ID/Name]");
    else if(!IsPlayerConnected(giveplayerid))
    return SendClientMessage(playerid,rot,"Fehler: Kein aktiver Spieler!");
    SetPVarInt(giveplayerid, "Mute", 1);
    return 1;
    }


    if(GetPVarInt(playerid, "Mute") == 1)
    {
    SendClientMessage(playerid, hellrot, "Du hast Chatverbot");
    return 0;
    }


    und /unmute einfach nochmal ein command und die variable auf 0 setzten

    ganz oben
    new hunter[MAX_PLAYERS];
    forward delethunter(playerid);


    if (strcmp(cmdtext, "/hunter", true)==0)
    {
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid,x,y,z);;
    hunter[playerid] == CreateVehicle(ID vom Hunter,x,y,z,za,0,0,-1)
    SetTimerEx("delethunter",600000,0,"d",playerid);
    return 1;
    }


    public delethunter(playerid)
    {
    DestroyVehicle(hunter[playerid]);
    return 1;
    }

    if(strcmp(cmd, "/kick", true) == 0)
    {
    if(IsPlayerConnected(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]");
    return 1;
    }
    new year, month,day;
    getdate(year, month, day);
    format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
    KickLog(string);
    Kick(giveplayerid);
    format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", giveplayer, sendername, (result));
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    return 1;
    }
    }
    else
    {
    format(string, sizeof(string), " %d is not an active player.", giveplayerid);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    }
    return 1;
    }


    so müsste es gehen, mach das bei den anderen commands auch


    //Edit:
    äh Sorry das war falsch
    hab IsPlayerConnected(playerid) mit isplayeradmin verwechselt

    suchb bei dir im script das


    public OnPlayerCommandText(playerid,cmdtext[])
    {
    //hier dein cod einfügen
    return 0;
    }


    wenn es bei dir nicht vorhanden ist onplayercommand text dan kopier es einfach zu dir rein

    hier wird er gekickt bevor der text gesendet wird, allso taucht er bei ihm nicht auf
    Kick(giveplayerid);
    format(string, sizeof(string), "AdmCmd: %s wurde von %s gekickt, Grund: %s", giveplayer, sendername, (result));
    SendClientMessageToAll(COLOR_LIGHTRED, string);



    jetzt wird erst der text gesendet, danach wird er gekickt, allso kann er ihn noch sehen
    format(string, sizeof(string), "AdmCmd: %s wurde von %s gekickt, Grund: %s", giveplayer, sendername, (result));
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    Kick(giveplayerid);

    das ist mal der anfang, so müsste es gehen



    forward StartDerby();
    new PlayersInDerby;
    new DerbyAuto[MAX_PLAYERS];
    new InDerby[MAX_PLAYERS];


    new Float:DerbySpawn[3][4] = {
    {1600.3428,769.5858,18.7532,180.6960},
    {1613.4515,769.4227,18.5338,182.9499},
    {1662.5034,770.4509,19.5113,180.4631}
    };



    if (strcmp("/derby", cmdtext, true, 10) == 0)
    {
    SetPlayerCameraLookAt(playerid, auf die derby arena);
    SetPlayerCameraPos(playerid, auf die derby arena);
    SetPlayerPos(playerid, irgendwo hin);
    PlayersInDerby ++;
    TogglePlayerControllable(playerid, 0);
    return 1;
    }


    if (strcmp("/start", cmdtext, true, 10) == 0)
    {
    if(PlayersInDerby == 1) return SendClientMessage(playerid, hellrot, "für start werden 2 spieler benötigt");
    SetTimer("StartDerby",20000, 0);
    SendClientMessageToAll(gelb, "das derby wird in 20 sekunden gestartet");
    PlayersInDerby = 0;
    return 1;
    }


    public StartDerby()
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(InDerby[playerid] == 1)
    {
    DerbyAuto[i] = CreateVehicle(carid, DerbySpawn[PlayersInDerby][0], DerbySpawn[PlayersInDerby][1], DerbySpawn[PlayersInDerby][2], DerbySpawn[PlayersInDerby][3],-1,-1,-1));
    PutPlayerInVehicle(i, DerbyAuto[i]);
    SetCameraBehindPlayer(i);
    TogglePlayerControllable(i, 1);
    PlayersInDerby ++;
    }
    }
    return 1;
    }


    if(strcmp("/drivein", cmdtext, true, 6) == 0)
    {
    if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1212.4885253906,-905.68707275391,42.925273895264)) return NotBuy(playerid);
    if(!IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid)) return SendClientMessage(playerid,0x9ACD32AA,"das geht nur in einem auto.");
    SendClientMessage(playerid,0x9ACD32AA,"Willkommen beim Burger Shot.");
    SendClientMessage(playerid,COLOR_WHITE,"Dein Essen wird zubereitet!");
    SetTimerEx("Drivein",7000,0,"i",playerid);
    TogglePlayerControllable(playerid, 0);
    SetPlayerHealth(playerid,100);
    return 1;
    }

    ganz oben
    forward Tele();



    bei modeinit
    SetTimer("Tele",1000, 1);



    public Tele()
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsPlayerInRangeOfPoint(i,3.0,-181.5448,1056.9391,19.7422)) SetPlayerPos(i,-60.1202,3831.4360,6.9958);
    else if(IsPlayerInRangeOfPoint(i,3.0,-66.5487,3798.1465,6.7437)) SetPlayerPos(i,-66.5487,3798.1465,6.7437);
    }
    }
    return 1;
    }

    forward SpielZeit();
    new KillsTeam1;
    new Kills Team2;


    ein timer bei ongamemodeinit
    SetTimer("SpielZeit",600000, 0);


    public SpielZeit()
    {
    GameModeExit();
    return 1;
    }


    bei onplayerdeath
    if(killerid == team1) KillsTeam1 ++;
    else if(killerid == team2) KillsTeam2 ++;


    und die anzeigen musst du noch mit einem Textdraw machen

    if (strcmp("/admins", cmdtext, true) == 0)
    {
    SendClientMessage(playerid,COLOR_BLUE,"|___Admins___|");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && pInfo[i][admin] > 1)
    {
    new name[128], string[100];
    GetPlayerName(i,name,128);
    format(string,sizeof(string), "%s(%d)[%d]", name,i,pInfo[i][admin]);
    SendClientMessage(playerid,COLOR_BLUE,string);
    }
    }
    return 1;
    }


    allso das müsste gehen, das ist das selbe wie die afkliste

    machs halt so


    if (strcmp("/admins", cmdtext, true) == 0)
    {
    SendClientMessage(playerid,COLOR_BLUE,"|___Admins___|");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && pInfo[i][admin] > 1)
    {
    new name[128], string[100];
    GetPlayerName(i,name,128);
    format(string,sizeof(string), "%s(%d)[%d]", name,i,pInfo[i][admin]);
    SendClientMessage(playerid,COLOR_BLUE,string);
    }
    }
    return 1;
    }

    if (strcmp("/afklist", cmdtext, true) == 0)
    {
    SendClientMessage(playerid,COLOR_BLUE,"|___AFKLISTE___|");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && AFK[i] == 1)
    {
    new name[128], string[100];
    GetPlayerName(i,name,128);
    format(string, 256, "%s", name);
    SendClientMessage(playerid,COLOR_YELLOW,string);
    }
    }
    return 1;
    }

    if (strcmp("/start",cmdtext,true,5) == 0)
    {
    if (IsPlayerAdmin(playerid))
    {
    for (new i;i < MAX_PLAYERS;i++)
    {
    new pcolor = GetPlayerColor(i);
    if (pcolor == RED)
    {
    SetPlayerPos(i,-2040.1464,-106.3116,35.1976);
    }
    if (pcolor == BLUE)
    {
    SetPlayerPos(i,-2016.2776,-275.5080,35.3203);
    }
    GameTextForPlayer(i,"~r~Das Match beginnt!",3000,3);
    }
    }
    return 1;
    }