Tasten funkt nicht

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 Leute, wenn ich ingame bin und mir ein autokaufen will, funkt. die tasten nicht
    kann mir einer dabei helfen?


    forward Dtdc_HandleLiveView(playerid);
    public Dtdc_HandleLiveView(playerid)
    {
    if( (GetTickCount() - Dtdc_Player[playerid][LastTick]) < 500 ) return;
    new string[200];
    new Keys,ud,lr;
    GetPlayerKeys(playerid,Keys,ud,lr);
    //KEYS
    if(Keys & KEY_FIRE) {
    new Float:px,Float:py,Float:pa;
    px = Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconPosX];
    py = Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconPosY];
    pa = Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconRot];
    GetXYInFrontOf(pa,px,py,2.5);
    SetPlayerPos(playerid,px,py,Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconPosZ]);
    SetPlayerFacingAngle(playerid,Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconRot]);
    SetPlayerInterior(playerid,0);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid,1);
    SetPlayerVirtualWorld(playerid, 0);
    Dtdc_Player[playerid][IsInSeller] = (MaxSeller+1);
    CallRemoteFunction("PlayerDTDCSellerStateChange","dd",playerid,0);
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    for(new i=0;i<4;i++){TextDrawHideForPlayer(playerid,Dtdc_BuyTexte[i]);}
    //CAR SHOW
    if(Dtdc_Player[playerid][CarShow] !=0){DestroyVehicle(Dtdc_Player[playerid][CarShow]);Dtdc_Player[playerid][CarShow] = 0;}
    Dtdc_Player[playerid][LastTick] = GetTickCount();
    return;
    }
    if(Keys & 16) {
    if(Dtdc_OnCarBuy(playerid,Dtdc_Player[playerid][IsInSeller],Dtdc_Player[playerid][CarSelect]))
    {
    new Float:px,Float:py,Float:pa;
    px = Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconPosX];
    py = Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconPosY];
    pa = Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconRot];
    GetXYInFrontOf(pa,px,py,2.5);
    SetPlayerPos(playerid,px,py,Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconPosZ]);
    SetPlayerFacingAngle(playerid,Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sIconRot]);
    SetPlayerInterior(playerid,0);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid,1);
    SetPlayerVirtualWorld(playerid, 0);
    Dtdc_Player[playerid][IsInSeller] = (MaxSeller+1);
    CallRemoteFunction("PlayerDTDCSellerStateChange","dd",playerid,0);
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    for(new i=0;i<4;i++){TextDrawHideForPlayer(playerid,Dtdc_BuyTexte[i]);}
    //CAR SHOW
    if(Dtdc_Player[playerid][CarShow] !=0){DestroyVehicle(Dtdc_Player[playerid][CarShow]);Dtdc_Player[playerid][CarShow] = 0;}
    }
    Dtdc_Player[playerid][LastTick] = GetTickCount();
    return;
    }
    if(lr > 0) { // right
    Dtdc_Player[playerid][CarSelect] = 0;
    Dtdc_Player[playerid][IsAtCar] ++;
    if(Dtdc_Player[playerid][IsAtCar] >= Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sCars]){Dtdc_Player[playerid][IsAtCar] = 0;}
    new plus = 0;
    for(new i = 0; i < Dtdc_SCarsNum; i++)
    {
    if(Dtdc_SCars[i][scSeller] == Dtdc_Player[playerid][IsInSeller])
    {
    if(plus == Dtdc_Player[playerid][IsAtCar]) {Dtdc_Player[playerid][CarSelect] = i; break;}
    plus++;
    }
    }
    //SHOW CAR
    if(Dtdc_Player[playerid][CarShow] !=0){DestroyVehicle(Dtdc_Player[playerid][CarShow]);Dtdc_Player[playerid][CarShow] = 0;}
    Dtdc_Player[playerid][CarShow] = CreateVehicle(Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scModel],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarPosX],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarPosY],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarPosZ],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarRot],Dtdc_Player[playerid][CarColorSelect1],Dtdc_Player[playerid][CarColorSelect2],-1);
    SetVehicleVirtualWorld(Dtdc_Player[playerid][CarShow],GetPlayerVirtualWorld(playerid));
    //Textdraw
    format(string,sizeof(string),"Name: %s~n~Kategorie: %s~n~Preis: ~g~%d$",Dtdc_CarName[Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scModel]-400],Dtdc_NameCat[Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scCat]],Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scPreis]);
    if(!Dtdc_Player[playerid][CarKauf][0])
    {
    Dtdc_Player[playerid][CarKauf][0] = TextDrawCreate(20.000000,328.000000,Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sName]);
    Dtdc_Player[playerid][CarKauf][1] = TextDrawCreate(11.000000,355.000000,string);
    TextDrawAlignment(Dtdc_Player[playerid][CarKauf][0],0);
    TextDrawAlignment(Dtdc_Player[playerid][CarKauf][1],0);
    TextDrawBackgroundColor(Dtdc_Player[playerid][CarKauf][0],0x000000ff);
    TextDrawBackgroundColor(Dtdc_Player[playerid][CarKauf][1],0x000000ff);
    TextDrawFont(Dtdc_Player[playerid][CarKauf][0],0);
    TextDrawLetterSize(Dtdc_Player[playerid][CarKauf][0],1.000000,2.299999);
    TextDrawFont(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawLetterSize(Dtdc_Player[playerid][CarKauf][1],0.499999,1.800000);
    TextDrawColor(Dtdc_Player[playerid][CarKauf][0],0xffffffff);
    TextDrawColor(Dtdc_Player[playerid][CarKauf][1],0xffffffff);
    TextDrawSetOutline(Dtdc_Player[playerid][CarKauf][0],1);
    TextDrawSetOutline(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawSetProportional(Dtdc_Player[playerid][CarKauf][0],1);
    TextDrawSetProportional(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawSetShadow(Dtdc_Player[playerid][CarKauf][0],1);
    TextDrawSetShadow(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    }
    else
    {
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawSetString(Dtdc_Player[playerid][CarKauf][0],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sName]);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    TextDrawSetString(Dtdc_Player[playerid][CarKauf][1],string);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    }
    Dtdc_Player[playerid][LastTick] = GetTickCount();
    return;
    }
    else if(lr < 0) {
    Dtdc_Player[playerid][CarSelect] = 0;
    Dtdc_Player[playerid][IsAtCar] --;
    if(Dtdc_Player[playerid][IsAtCar] <0){Dtdc_Player[playerid][IsAtCar] = Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sCars]-1;}
    new plus = 0;
    for(new i = 0; i < Dtdc_SCarsNum; i++)
    {
    if(Dtdc_SCars[i][scSeller] == Dtdc_Player[playerid][IsInSeller])
    {
    if(plus == Dtdc_Player[playerid][IsAtCar]) {Dtdc_Player[playerid][CarSelect] = i; break;}
    plus++;
    }
    }
    //SHOW CAR
    if(Dtdc_Player[playerid][CarShow] !=0){DestroyVehicle(Dtdc_Player[playerid][CarShow]);Dtdc_Player[playerid][CarShow] = 0;}
    Dtdc_Player[playerid][CarShow] = CreateVehicle(Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scModel],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarPosX],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarPosY],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarPosZ],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sLVCarRot],Dtdc_Player[playerid][CarColorSelect1],Dtdc_Player[playerid][CarColorSelect2],-1);
    SetVehicleVirtualWorld(Dtdc_Player[playerid][CarShow],GetPlayerVirtualWorld(playerid));
    //Textdraw
    format(string,sizeof(string),"Name: %s~n~Kategorie: %s~n~Preis: ~g~%d$",Dtdc_CarName[Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scModel]-400],Dtdc_NameCat[Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scCat]],Dtdc_SCars[Dtdc_Player[playerid][CarSelect]][scPreis]);
    if(!Dtdc_Player[playerid][CarKauf][0])
    {
    Dtdc_Player[playerid][CarKauf][0] = TextDrawCreate(20.000000,328.000000,Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sName]);
    Dtdc_Player[playerid][CarKauf][1] = TextDrawCreate(11.000000,355.000000,string);
    TextDrawAlignment(Dtdc_Player[playerid][CarKauf][0],0);
    TextDrawAlignment(Dtdc_Player[playerid][CarKauf][1],0);
    TextDrawBackgroundColor(Dtdc_Player[playerid][CarKauf][0],0x000000ff);
    TextDrawBackgroundColor(Dtdc_Player[playerid][CarKauf][1],0x000000ff);
    TextDrawFont(Dtdc_Player[playerid][CarKauf][0],0);
    TextDrawLetterSize(Dtdc_Player[playerid][CarKauf][0],1.000000,2.299999);
    TextDrawFont(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawLetterSize(Dtdc_Player[playerid][CarKauf][1],0.499999,1.800000);
    TextDrawColor(Dtdc_Player[playerid][CarKauf][0],0xffffffff);
    TextDrawColor(Dtdc_Player[playerid][CarKauf][1],0xffffffff);
    TextDrawSetOutline(Dtdc_Player[playerid][CarKauf][0],1);
    TextDrawSetOutline(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawSetProportional(Dtdc_Player[playerid][CarKauf][0],1);
    TextDrawSetProportional(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawSetShadow(Dtdc_Player[playerid][CarKauf][0],1);
    TextDrawSetShadow(Dtdc_Player[playerid][CarKauf][1],1);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    }
    else
    {
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawSetString(Dtdc_Player[playerid][CarKauf][0],Dtdc_Seller[Dtdc_Player[playerid][IsInSeller]][sName]);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][0]);
    TextDrawHideForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    TextDrawSetString(Dtdc_Player[playerid][CarKauf][1],string);
    TextDrawShowForPlayer(playerid,Dtdc_Player[playerid][CarKauf][1]);
    }
    Dtdc_Player[playerid][LastTick] = GetTickCount();
    return;
    }
    if(ud < 0) {//up
    if(Keys & KEY_CROUCH){Dtdc_Player[playerid][CarColorSelect2] ++;} else {Dtdc_Player[playerid][CarColorSelect1] ++;}
    if(Dtdc_Player[playerid][CarColorSelect1] > 127){Dtdc_Player[playerid][CarColorSelect1] = 0;}
    if(Dtdc_Player[playerid][CarColorSelect2] > 127){Dtdc_Player[playerid][CarColorSelect2] = 0;}
    ChangeVehicleColor(Dtdc_Player[playerid][CarShow],Dtdc_Player[playerid][CarColorSelect1],Dtdc_Player[playerid][CarColorSelect2]);
    Dtdc_Player[playerid][LastTick] = GetTickCount();
    } else if(ud > 0) { //down
    if(Keys & KEY_CROUCH){Dtdc_Player[playerid][CarColorSelect2] --;} else {Dtdc_Player[playerid][CarColorSelect1] --;}
    if(Dtdc_Player[playerid][CarColorSelect1] < 0){Dtdc_Player[playerid][CarColorSelect1] = 127;}
    if(Dtdc_Player[playerid][CarColorSelect2] < 0){Dtdc_Player[playerid][CarColorSelect2] = 127;}
    ChangeVehicleColor(Dtdc_Player[playerid][CarShow],Dtdc_Player[playerid][CarColorSelect1],Dtdc_Player[playerid][CarColorSelect2]);
    Dtdc_Player[playerid][LastTick] = GetTickCount();
    }
    }

  • also bei Filterscript war das so


    public OnPlayerUpdate(playerid)
    {
    if(Dtdc_Select == 0 && Dtdc_Player[playerid][IsInSeller] != MaxSeller +1 && (GetTickCount() - Dtdc_Player[playerid][LastTick]) >= 500 )
    {
    Dtdc_HandleLiveView(playerid); // Naja Grandlarc lässt grüßen xD Naja ahbe andere wege um a und d benutzen zu können versucht doch nur der ging zu 100%
    }
    if(Dtdc_Player[playerid][IsInRespray] != MaxResprayer +1 && (GetTickCount() - Dtdc_Player[playerid][LastTick]) >= 250 )
    {
    Dtdc_HandleResprayer(playerid); // Naja Grandlarc lässt grüßen xD Naja ahbe andere wege um a und d benutzen zu können versucht doch nur der ging zu 100%
    }
    return 1;
    }


    forward Dtdc_HandleResprayer(playerid);
    public Dtdc_HandleResprayer(playerid)


    // usw. ..