Problem mit Fight Style system

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 ersma,


    Und zwar habe ich nen Fight Style system gescriptet mit einem Dialog es öffnet sich und wird auch richtig mit dem Geld&Pos abgefragt aber der Fightstyle ändert sich nicht.


    Der Code:
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == List) { if(listitem == 0) { SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to normal!"); SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL); GivePlayerMoney(playerid, -3500); } if(listitem == 1) { SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to boxing!"); SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING); GivePlayerMoney(playerid, -3500); } if(listitem == 2) { SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Kung Fu!"); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); GivePlayerMoney(playerid, -3500); } if(listitem == 3) { SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Elbow!"); SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW); GivePlayerMoney(playerid, -3500); } if(listitem == 4) { SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Kneehead!"); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD); GivePlayerMoney(playerid, -3500); } if(listitem == 5) SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Grabkick!"); SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK); GivePlayerMoney(playerid, -3500); } return 1; }



    Create3DTextLabel("Fight Styles",0x008080FF,2226.7983, -1719.6892, 13.5330,40.0,0);
    fstyle = CreatePickup(1239,1, 2226.7983, -1719.6892, 13.5330);


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == List)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to normal!");
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
    GivePlayerMoney(playerid, -3500);
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to boxing!");
    SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
    GivePlayerMoney(playerid, -3500);
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Kung Fu!");
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
    GivePlayerMoney(playerid, -3500);
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Elbow!");
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
    GivePlayerMoney(playerid, -3500);
    }
    if(listitem == 4)
    {
    SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Kneehead!");
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
    GivePlayerMoney(playerid, -3500);
    }
    if(listitem == 5)
    SendClientMessage(playerid,COLOR_BLUE,"You set your Figtstyle to Grabkick!");
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
    GivePlayerMoney(playerid, -3500);
    }
    return 1;
    }


    dcmd(fstyle, 6, cmdtext);




    dcmd_fstyle(playerid, cmdtext[]) {
    #pragma unused cmdtext
    if(IsPlayerInRangeOfPoint(playerid,1,2226.7983,-1719.6892,13.5330)){
    if (GetPlayerMoney(playerid)>1000) {
    ShowPlayerDialog(playerid,List,DIALOG_STYLE_LIST,"Fight Styles", "Normal\nBoxing\nKung Fu\nElbow\nKneehead\nGrabkick" ,"OK","Cancel");
    }
    else{
    SendClientMessage(playerid, GRAU, "You do not have enough money!");
    }
    }
    else{
    SendClientMessage(playerid, GRAU, "You' re not at the gym!");
    }
    return 1;
    }


    PS: Weis einer evtl. wieso die Codes in eine Zeile gepresst werden?


    Mit freundlichen grüßen


    /e icon 3d label vergessen

  • Vielleicht mit return 1; beeenden? Also unter jedem Fight Skill ?


    -Unknown