Beiträge von Crocky

    Habs im meinem Alten Gf So :D Ca.
    if(strcmp(cmdtext, "/afk", true) == 0)
    {
    TogglePlayerControllable(playerid,0);
    SendClientMessageToAll(0xFFA500FF,"%s ist in den AFK-Modus gegangen.",sendername);
    return 1;
    }
    if(strcmp(cmdtext, "/back", true) == 0)
    {
    TogglePlayerControllable(playerid,1);
    SendClientMessageToAll(0xFFA500FF,"%s ist aus dem AFK-Modus zurück.",sendername);
    return 1;
    }

    Aus einem Ganz altem GF :D



    Klick ->

    Spoiler anzeigen
    if(strcmp(cmd,"/frisk",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /frisk [playerid/PartOfName]");
    return 1;
    }
    if(!IsACop(playerid))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du kannst keine anderen Leute durchsuchen!");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if (ProxDetectorS(8.0, playerid, giveplayerid))
    {
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selber durchsuchen/You can not search yourself yourself!"); return 1; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new text1[20], text2[20], text3[20], text4[20], text5[20], text6[30], text7[20];
    if(PlayerInfo[giveplayerid][pDrugs] > 0) { text1 = "| Drogen."; } else { text1 = "| -"; }
    if(PlayerInfo[giveplayerid][pMats] > 0) { text2 = "| Materialien."; } else { text2 = "| -"; }
    if(Fishes[giveplayerid][pWeight1] > 0 || Fishes[giveplayerid][pWeight2] > 0 || Fishes[giveplayerid][pWeight3] > 0 || Fishes[giveplayerid][pWeight4] > 0 || Fishes[giveplayerid][pWeight5] > 0) { text3 = "| Fisch."; } else { text3 = "| -."; }
    if(PlayerInfo[giveplayerid][pPhoneBook] > 0) { text4 = "| Telefonbuch."; } else { text4 = "| -"; }
    if(PlayerInfo[giveplayerid][pCDPlayer] > 0) { text5 = "| CD-Player."; } else { text5 = "| -"; }
    if(PlayerInfo[giveplayerid][pInvMats] > 0) { text6 = "| Taschen-Materialien."; } else { text6 = "| -"; }
    if(PlayerInfo[giveplayerid][pInvDrugs] > 0) { text7 = "| Tasche-Drogen."; } else { text7 = "| -"; }
    format(string, sizeof(string), "|__________ Gegenstände von %s __________|", giveplayer);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "%s.", text1);
    SendClientMessage(playerid, COLOR_GREY, string);
    format(string, sizeof(string), "%s.", text2);
    SendClientMessage(playerid, COLOR_GREY, string);
    format(string, sizeof(string), "%s.", text3);
    SendClientMessage(playerid, COLOR_GREY, string);
    format(string, sizeof(string), "%s.", text4);
    SendClientMessage(playerid, COLOR_GREY, string);
    format(string, sizeof(string), "%s.", text5);
    SendClientMessage(playerid, COLOR_GREY, string);
    format(string, sizeof(string), "%s.", text6);
    SendClientMessage(playerid, COLOR_GREY, string);
    format(string, sizeof(string), "%s.", text7);
    SendClientMessage(playerid, COLOR_GREY, string);
    format(string, sizeof(string), "* %s hat %s nach illegalen Gegenständen durchsucht.", sendername ,giveplayer);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht in deiner Nähe!");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist Offline !");
    return 1;
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/tazer", true) ==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 7)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SendClientMessage(playerid, COLOR_GREY, " In einem Auto kann der Befehl nicht benutzt werden!");
    return 1;
    }
    new suspect = GetClosestPlayer(playerid);
    if(IsPlayerConnected(suspect))
    {
    if(PlayerCuffed[suspect] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Spieler ist schon gefesselt !");
    return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
    {
    if(gTeam[suspect] == 2)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du kannst keinen Beamten Tazern! !");
    return 1;
    }
    if(IsPlayerInAnyVehicle(suspect))
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Betroffene ist in einem Fahrzeug !");
    return 1;
    }
    if(TazerBereit[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dein Tazer ist noch nicht aufgeladen! (ca. 30 Sekunden)");
    return 1;
    }
    if(random(3) == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du hast ihn nicht getroffen!");
    return 1;
    }
    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* %s hat dich mit einem Stromschocker niedergestreckt.", sendername);
    SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "Du hast %s mit einem Stromschocker niedergestreckt.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s holt seinen Stromschocker raus und streckt %s nieder.", sendername ,giveplayer);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GameTextForPlayer(suspect, "~r~Geschockt", 2500, 3);
    LoopingAnim(suspect, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    FreezePlayer(suspect);
    PlayerCuffed[suspect] = 1;
    PlayerCuffedTime[suspect] = 20 + random(10);
    TazerBereit[playerid] = 0;
    SetTimerEx("TazerBereitForPlayer",30000,0,"i",playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Spieler ist nicht in deiner Nähe!");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein Beamter !");
    }
    }//not connected
    return 1;
    }
    if(strcmp(cmd, "/testcuff", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    FreezePlayer(playerid);
    PlayerCuffed[playerid] = 2;
    PlayerCuffedTime[playerid] = 180;
    return 1;
    }
    }
    if(strcmp(cmd, "/cuff", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gTeam[playerid] == 2 || IsACop(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) {
    SendClientMessage(playerid, COLOR_WHITE, "FEHLER: /cuff [playerid]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du kannst keine Polizisten fesseln !");
    return 1;
    }
    if(PlayerCuffed[giveplayerid] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Spieler ist schon gefesselt !");
    return 1;
    }
    if (ProxDetectorS(8.0, playerid, giveplayerid))
    {
    new car = GetPlayerVehicleID(playerid);
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selber fesseln!"); return 1; }
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Dir wurden von %s Handschellen angelegt.", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du hast %s Handschellen angelegt.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s hat %s Handschellen angelegt.", sendername ,giveplayer);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GameTextForPlayer(giveplayerid, "~r~In Handschellen", 2500, 3);
    FreezePlayer(giveplayerid);
    PlayerCuffed[giveplayerid] = 2;
    PlayerCuffedTime[giveplayerid] = 600;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Spieler ist nicht in deinem Auto, oder du bist nicht in einem Auto!");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht in deiner nähe!");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist Offline!");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein Polizist !");
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/uncuff", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gTeam[playerid] == 2 || IsACop(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "FEHLER: /uncuff [playerid]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if (ProxDetectorS(8.0, playerid, giveplayerid))
    {
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du hast dich selbst entfesselt!"); return 1; }
    if(PlayerCuffed[giveplayerid])
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du wurdest von %s entfesselt.", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du entfesselst %s.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    GameTextForPlayer(giveplayerid, "~g~Entfesselt", 2500, 3);
    UnFreezePlayer(giveplayerid);
    PlayerCuffed[giveplayerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht gefesselt!");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht in deiner Nähe !");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist Offline !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein Polizist !");
    }
    }//not connected
    return 1;
    }
    if(strcmp(cmd, "/find", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pJob] != 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein Dedektiv !");
    return 1;
    }
    if(UsedFind[playerid] != 0 && PlayerInfo[playerid][pDetSkill] < 401)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du hast schon nach jemanden gesucht, daher musst du noch 2 Minuten warten!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /find [playerid]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selbst finden!"); return 1; }
    new points;
    new level = PlayerInfo[playerid][pDetSkill];
    if(level >= 0 && level <= 50)
    { points = 4; }
    else if(level >= 51 && level <= 100)
    { points = 6; }
    else if(level >= 101 && level <= 200)
    { points = 8; }
    else if(level >= 201 && level <= 400)
    { points = 10; }
    else if(level >= 401)
    { points = 12; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(giveplayerid, X,Y,Z);
    SetPlayerCheckpoint(playerid, X,Y,Z, 6);
    FindTime[playerid] = 1;
    FindTimePoints[playerid] = points;
    PlayerInfo[playerid][pDetSkill] ++;
    UsedFind[playerid] = 1;
    if(PlayerInfo[playerid][pDetSkill] == 50)
    { SendClientMessage(playerid, COLOR_YELLOW, "* Dedektiv Skill ist nun auf 2.Du kannst jetzt öfters Leute finden."); }
    else if(PlayerInfo[playerid][pDetSkill] == 100)
    { SendClientMessage(playerid, COLOR_YELLOW, "* Dedektiv Skill ist nun auf 3.Du kannst jetzt öfters Leute finden."); }
    else if(PlayerInfo[playerid][pDetSkill] == 200)
    { SendClientMessage(playerid, COLOR_YELLOW, "* Dedektiv Skill ist nun auf 4.Du kannst jetzt öfters Leute finden."); }
    else if(PlayerInfo[playerid][pDetSkill] == 400)
    { SendClientMessage(playerid, COLOR_YELLOW, "* Dedektiv Skill ist nun auf 5.Du kannst jetzt öfters Leute finden."); }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Falsche ID !");
    }
    }
    return 1;
    } if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist nicht im Dienst!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutzung: /su [Spieler ID/ Name] [Anzahl] [Verbrechen]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /su [Spieler ID] [Anzahl] [Verbrechen]");
    return 1;
    }
    new WantedAnzahl;
    WantedAnzahl = strval(tmp);
    if (gTeam[playerid] == 2 || IsACop(playerid))
    {
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[giveplayerid][pJailed] > 0)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Der Spieler ist im Gefängnis!");
    return 1;
    }
    if (gTeam[giveplayerid] != 2 && !IsACop(giveplayerid))
    {
    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, "Benutzung: /su [Spieler ID / Name] [Anzahl] [Verbrechen]");
    return 1;
    }
    WantedLevel[giveplayerid] += WantedAnzahl;
    format(string, sizeof(string), "Du hast ein Verbrechen begangen ( %s ). Zeuge: %s.",result,sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
    format(string, sizeof(string), "Vergebene Wanteds: %d. Neues Wantedlevel: %d", WantedAnzahl, WantedLevel[giveplayerid]);
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsACop(i))
    {
    format(string, sizeof(string), "HQ: Alle Einheiten: Reporter: %s, Vergebene Wanteds: %d",sendername, WantedAnzahl);
    SendClientMessage(i, TEAM_BLUE_COLOR, string);
    format(string, sizeof(string), "HQ: Verbrechen: %s, Gesuchter: %s, Aktuelle Wanteds: %d",result,giveplayer, WantedLevel[giveplayerid]);
    SendClientMessage(i, TEAM_BLUE_COLOR, string);
    }
    }
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du kannst keinen Polizisten anklagen!");
    }
    }
    }
    else
    {
    format(string, sizeof(string), "%d ist kein aktiver Spieler.", giveplayerid);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du bist kein Polizist!");
    }
    }
    return 1;
    }

    ocmd:cbizz(playerid,params[])
    {
    new name[32],preis2,level;
    if(sscanf(params,"sii",name,preis,level)) return SendClientMessage(playerid,0xffff0000,"Benutzung: /cbizz [Name] [Preis] [Level(score)]");
    if(preis == 0 || level == 0) return SendClientMessage(playerid,0xffff0000,"Benutzung: /cbizz [Name] [Preis] [Level(score)]"); // Die fehlerhafte Zeile.
    if(!IsPlayerAdmin(playerid)) return 1;
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    CB(x,y,z,name,level,preis2);
    return 1;
    }

    Ich habe alles Aber ich möchte ein Befehl bauen also Wenn jemand tot ist jeder Medic-Member wird Alamiert und müssen dorthin gehen und mit einem / Befehl wiederbeleben

    Frag mal Kaliber er
    ist scriptlehrer er kann dir Bestimmt Helfen :DD