Probleme mit tasten eingang

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo ich habe für Fragtions basen es so gemacht das man mit der Enter oder F taste rein kann nun wollte ich es auch für Häuser machen und für bizz aber leider geht es nicht.


    if (newkeys==KEY_SECONDARY_ATTACK)
    {
    if(IsPlayerConnected(playerid))
    {
    for(new i = 0; i < sizeof(HouseInfo); i++)
    {
    if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
    {
    //printf("Found House :%d",i);
    if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
    {
    SetPlayerInterior(playerid,HouseInfo[i][hInt]);
    SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
    GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
    PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
    PlayerInfo[playerid][pLocal] = i;
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
    }
    }
    }
    for(new i = 0; i < sizeof(BizzInfo); i++)
    {
    if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
    {
    //printf("Found House :%d",i);
    if(!IsACop(playerid) && i == 3)
    {
    SendClientMessage(playerid, COLOR_GREY, " Cops only !");
    return 1;
    }
    if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
    {
    if(PlayerInfo[playerid][pPbiskey] != i)
    {
    if(BizzInfo[i][bLocked] == 1)
    {
    GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
    return 1;
    }
    if(BizzInfo[i][bProducts] == 0)
    {
    GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
    return 1;
    }
    GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
    new string[128];
    format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]);
    BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
    ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
    BizzInfo[i][bProducts]--;
    OnPropUpdate();
    GameTextForPlayer(playerid, string, 5000, 3);
    }
    SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
    SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
    PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
    PlayerInfo[playerid][pLocal] = i+99;
    new dood[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dood, sizeof(dood));
    new string[128];
    format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
    printf("%s", string);
    PayLog(string);
    //PlayerInfo[playerid][pLocal] = i;
    }
    else
    {
    GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
    }
    }
    }
    for(new i = 0; i < sizeof(SBizzInfo); i++)
    {
    if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
    {
    if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
    {
    if(PlayerInfo[playerid][pPbiskey] != i)
    {
    if(SBizzInfo[i][sbLocked] == 1)
    {
    GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
    return 1;
    }
    if(SBizzInfo[i][sbProducts] == 0)
    {
    GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
    return 1;
    }
    if(i == 10)
    {
    PaintballPlayers ++;
    PlayerPaintballing[playerid] = 1;
    new rand = random(sizeof(PaintballSpawns));
    SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
    TogglePlayerControllable(playerid, 0);
    }
    else if(i == 11)
    {
    PlayerKarting[playerid] = 1;
    SendClientMessage(playerid, TEAM_GROVE_COLOR, "You can now parcipitate in a Karting Race, grab a Kart.");
    }
    else
    {
    return 1;
    }
    GivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
    gSpentCash[playerid] = GetPlayerMoney(playerid);
    SBizzInfo[i][sbProducts]--;
    SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
    ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
    new dood[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dood, sizeof(dood));
    new string[128];
    format(string, sizeof(string), "%s payed $%d to enter sbiz %d", dood, SBizzInfo[i][sbEntranceCost], i);
    printf("%s", string);
    PayLog(string);
    OnPropUpdate();
    }
    }
    else
    {
    GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
    }
    }
    }
    if (PlayerToPoint(3.0, playerid,1480.63,-1767.43,18.79))
    {
    SetPlayerInterior(playerid,3);
    SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
    GameTextForPlayer(playerid, "~w~Welcome to the City Hall", 5000, 1);
    PlayerInfo[playerid][pInt] = 3;
    PlayerInfo[playerid][pLocal] = 241;
    }
    else if (PlayerToPoint(3.0, playerid,1073.0619,-344.5148,73.9922))
    {
    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
    {
    SetPlayerInterior(playerid,2);
    SetPlayerPos(playerid,1205.0947,-10.1685,1000.9219);
    PlayerInfo[playerid][pInt] = 2;
    PlayerInfo[playerid][pLocal] = 242;
    }
    }
    else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
    {
    GameTextForPlayer(playerid, "~w~Welcome to the 8ball Track", 5000, 1);
    SetPlayerInterior(playerid,7);
    SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
    }
    else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
    {
    GameTextForPlayer(playerid, "~w~Welcome to the Dirt Track", 5000, 1);
    SetPlayerInterior(playerid,4);
    SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
    }
    else if (PlayerToPoint(3.0, playerid,250.1685,86.8758,1002.9263))
    {
    SetPlayerInterior(playerid,6);
    SetPlayerPos(playerid,259.5410,90.6571,1002.3848);
    GameTextForPlayer(playerid, "~w~ Welcome to ~b~~h~LSPD ~r~~h~Jail", 5000, 1);
    PlayerInfo[playerid][pInt] = 6;
    }
    else if (PlayerToPoint(3.0, playerid,1525.1530,-1677.6992,5.8906))
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3)
    {
    SetPlayerInterior(playerid,6);
    SetPlayerPos(playerid,268.0514,75.9009,1001.0391);
    GameTextForPlayer(playerid, "~w~ Welcome to ~b~~h~LSPD ~r~~h~Jail", 5000, 1);
    PlayerInfo[playerid][pInt] = 6;
    }
    }
    else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
    {
    GameTextForPlayer(playerid, "~w~Welcome to the Stunting Track", 5000, 1);
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
    }
    }
    return 1;
    }


    Was mache ich Fahlsch??

    WEGEN MEINER RECHTSCHREIBUNG MÖCHTE ICH MICH ENDSCHULDIGEN ICH BIN LEGASTENIGER!!!!!!!!!!!!!