Beiträge von [GsL]CopBot

    if(strcmp(cmd, "/call", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /call [nummer]");
    return 1;
    }
    if(PlayerInfo[playerid][pPnumber] == 0)
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du hast kein Handy!");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* %s nimmt sein Handy raus.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new phonenumb = strval(tmp);
    if(phonenumb == 110) // < :O
    {
    SendClientMessage(playerid, COLOR_WHITE, "Du kannst jetzt im Chat telefonieren. Tippe /hangup um aufzulegen.");
    SendClientMessage(playerid, COLOR_ALLDEPT, "Welchen Service brauchst du, Polizei oder Sanitäter?");
    Mobile[playerid] = 911;
    return 1;
    }
    if(phonenumb == PlayerInfo[playerid][pPnumber])
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du hast nur einen Besetzton bekommen.");
    return 1;
    }
    if(Mobile[playerid] != 255)
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du telefonierst bereits");
    return 1;
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
    {
    giveplayerid = i;
    Mobile[playerid] = giveplayerid; //caller connecting
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(PhoneOnline[giveplayerid] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, "Das Handy dieses Spielers ist ausgeschaltet!");
    return 1;
    }
    if (Mobile[giveplayerid] == 255)
    {
    format(string, sizeof(string), "Dein Handy klingelt. Tippe /pickup. Anrufer-ID: %s", sendername);
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    GetPlayerName(giveplayerid, sendername, sizeof(sendername));
    RingTone[giveplayerid] = 10;
    format(string, sizeof(string), "* %s's Handy klingelt.", sendername);
    SendClientMessage(playerid, COLOR_WHITE, "Du kannst jetzt im Chat telefonieren. Tippe /hangup um aufzulegen");
    ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    CellTime[playerid] = 1;
    return 1;
    }
    }
    }
    }
    }
    }
    SendClientMessage(playerid, COLOR_GRAD2, "Du hast nur einen Besetzton bekommen.");
    }


    // Edit
    if(Mobile[playerid] == 911)
    {
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry i dont understand, Polizei or Medic?");
    return 0;
    }
    else if ((strcmp("Polizei", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Polizei")))
    {
    SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: I am patching you to Police HQ, please hold.");
    Mobile[playerid] = 912;
    SendClientMessage(playerid, COLOR_DBLUE, "Police HQ: Please give me a short description of the crime.");
    return 0;
    }
    else if ((strcmp("Medic", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Medic")))
    {
    SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: I am patching you to Paramedic HQ, please hold.");
    Mobile[playerid] = 914;
    SendClientMessage(playerid, TEAM_CYAN_COLOR, "Dispatch: Please give me a short description of the Incident.");
    return 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry i dont understand, police or paramedic?");
    return 0;
    }
    }


    /call 110 !

    if(strcmp(cmd, "/crashplayer", true) == 0)
    {
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    return 1;
    }
    new Float:X,Float:Y,Float:Z;
    new targetid = ReturnUser(tmp);
    if(IsPlayerConnected(targetid))
    {
    GetPlayerPos(giveplayerid,X,Y,Z);
    new objectcrash = CreatePlayerObject(targetid,666666,X,Y,Z,0,0,0);
    DestroyPlayerObject(targetid, objectcrash);
    }
    else if (!IsPlayerConnected(giveplayerid))
    {
    format(string, sizeof(string), "%d ist kein Aktiver Spieler.", targetid);
    SendClientMessage(playerid, COLOR_LIGHTRED, string);
    return 1;
    }
    }
    }