Beiträge von Shoxx

    Hier mein Command:


    //======== ORTEN ==========//
    if(strcmp(cmd, "/orten", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(!IsACop(playerid))
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist kein Polizist!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutzung: /orten [Spieler ID]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(giveplayerid, X,Y,Z);
    SetPlayerCheckpoint(playerid, X,Y,Z, 6);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Falsche ID!");
    }
    }
    return 1;
    }
    Bitte um Hilfe :)

    Irgendwie bleibt die Handschelle trotzdem am Arm..


    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 cuffen!");
    return 1;
    }
    if(PlayerCuffed[giveplayerid] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, "Spieler ist schon gecufft!");
    return 1;
    }
    if (ProxDetectorS(8.0, playerid, giveplayerid))
    {
    if(giveplayerid == playerid)
    {
    SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selber fesseln!");
    return 1;
    }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "Officer %s hat dir Handschellen angelegt.", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du legst %s Handschellen an.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "Officer %s hat %s Handschellen angelegt.", sendername,giveplayer,giveplayer);
    // TogglePlayerControllable(giveplayerid,0);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GameTextForPlayer(giveplayerid, "~r~Festgenommen", 2500, 3);
    SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED);
    SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
    FreezePlayer(giveplayerid);
    PlayerCuffed[giveplayerid] = 2;
    PlayerCuffedTime[giveplayerid] = 180;
    }
    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), "* Officer %s hat dir die Handschellen abgenommen.", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du nimmst %s die Handschellen ab.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    GameTextForPlayer(giveplayerid, "~g~Entfesselt", 2500, 3);
    RemovePlayerAttachedObject(giveplayerid,19418);
    SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_NONE);
    UnFreezePlayer(giveplayerid);
    PlayerCuffed[giveplayerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht gecufft!");
    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(cmdtext,"/invade",true)==0){
    if(IsAFightFaction(GetPlayerFaction(playerid))){
    for(new fs;fs<sizeof(FightSystem);fs++){
    if((FightSystem[fs][fsOwnerFaction] == GetPlayerFaction(playerid) && FightSystem[fs][fsFightTime]) || FightSystem[fs][fsAttackFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Deine Gang / Mafia ist bereits in einem Fight.");
    }
    new TempZone = GetPlayerFightzone(playerid);
    if(TempZone != -255){
    if(!IsAFightFaction(FightSystem[TempZone][fsOwnerFaction]))
    return SendClientMessage(playerid,FS_COL_GREY,"Gebiet wurde ausgeschaltet.");
    if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Man greift nicht seine eigenen Leute an.");
    if(FightSystem[TempZone][fsFightTime] || FightSystem[TempZone][fsAttackFaction] != -255)
    return SendClientMessage(playerid,FS_COL_GREY,"** In diesem Gebiet wird bereits geschossen.");
    if(FightSystem[TempZone][fsLastFight]){
    new fsText[178];
    format(fsText,sizeof(fsText),"Ganggebiet: Dieses Ganggebiet wurde bereits Angegriffen, wartet noch: '%d' Minuten.",FightSystem[TempZone][fsLastFight]);
    SendClientMessage(playerid,FS_COL_GREY,fsText);
    return 1;
    }
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsOwnerFaction] == FightSystem[TempZone][fsOwnerFaction] && (FightSystem[fs][fsFightTime] || FightSystem[fs][fsAttackFaction] != -255))
    return SendClientMessage(playerid,FS_COL_GREY,"Ganggebiet: Die Gang / Mafia der das Ganggebiet gehört hat bereits ein Kampf.");
    }
    new fsTextToOwner[255];
    format(fsTextToOwner,sizeof(fsTextToOwner),">>> Fight <<< | Ihr werden von: %s angegriffen, setzt euch zur wehr!",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    new fsName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
    new fsTextToAttack[255];
    format(fsTextToAttack,sizeof(fsTextToAttack),">>> Fight <<< | %s hat ein Kampf mit: %s begonnen, macht sie Platt!",fsName,GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    new fsText[64];
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsWinKills],"~y~00 Kills");
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsLoseKills],"~y~00 Kills");
    TextDrawSetString(FightSystem[TempZone][fsTime],"Verbl. Zeit: 30 Minuten");//ZEIT
    for(new i;i<MAX_PLAYERS;i++){
    if(IsPlayerConnected(i)){
    GangZoneFlashForPlayer(i,FightSystem[TempZone][fsZoneID],GetZoneColorOfFaction(GetPlayerFaction(playerid)));
    if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction]){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToOwner);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    if(GetPlayerFaction(i) == GetPlayerFaction(playerid)){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToAttack);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    }
    }
    FightSystem[TempZone][fsAttackFaction] = GetPlayerFaction(playerid);
    FightSystem[TempZone][fsKillsOfOwner] = 0;
    FightSystem[TempZone][fsKillsOfAttack] = 0;
    FightSystem[TempZone][fsFightTime] = 30;//ZEIT
    FightSystem[TempZone][fsCTF][0] = -255;
    FightSystem[TempZone][fsCTF][1] = 0;
    FightSystem[TempZone][fsCTF][2] = 0;
    return 1;
    }return SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keinem Gebiet!");
    }else SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keiner Gang / Mafia.");
    return 1;
    }