Beiträge von BlueMatrix

    Ich habe 2 Teams-2 Shops,
    nun ist meine Frage, kann ich in den shops ein "MediPack" machen,das man nur EINMAL kaufen kann und das man das unterwegs benutzen kann mit einem befehl namens /heal ? :S


    und wie mache ich da eine else hin das da steht "Du bist nicht am Shop!" :) ?
    //Polizei Shop
    if (strcmp("/buy", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 1, 1575.2797,-1620.1421,13.5469))
    {
    ShowPlayerDialog(playerid, ShopDialog , DIALOG_STYLE_LIST, "Shop", "Schutzweste (500,00$)\nM4 (1500,00$)\nSMG (1200,00$)\nDeagle (1000,00$)\nSchrotflinte (1000,00)\nSniper (1500,00$$)", "Kaufen", "Abbrechen");
    }
    else if(IsPlayerInRangeOfPoint(playerid, 1, 1087.4868,-1233.6852,15.8203)) // else -> oder
    {
    ShowPlayerDialog(playerid, KaufenDialog , DIALOG_STYLE_LIST, "Shop", "Schutzweste (500,00$)\nAK47 (1500,00$)\nSMG (1200,00$)\nDeagle (1000,00$)\nSchrotflinte (1000,00)\nSniper (1500,00$$)", "Kaufen", "Abbrechen");
    }
    }

    Hallo


    ich hab 2 shops gemacht, es kommen keine errors, beide haben den selben befehl sind aber an anderen Stellen, hab ich was falsch gemacht?


    //Polizei Shop
    if (strcmp("/buy", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 1, 1575.2797,-1620.1421,13.5469))
    {
    ShowPlayerDialog(playerid, ShopDialog , DIALOG_STYLE_LIST, "Shop", "Schutzweste (500,00$)\nM4 (1500,00$)\nSMG (1200,00$)\nDeagle (1000,00$)\nSchrotflinte (1000,00)\nSniper (1500,00$$)", "Kaufen", "Abbrechen");
    }
    return 1;
    }
    //Mafia Shop
    if (strcmp("/buy", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 1, 1087.4868,-1233.6852,15.8203))
    {
    ShowPlayerDialog(playerid, KaufenDialog , DIALOG_STYLE_LIST, "Shop", "Schutzweste (500,00$)\nAK47 (1500,00$)\nSMG (1200,00$)\nDeagle (1000,00$)\nSchrotflinte (1000,00)\nSniper (1500,00$$)", "Kaufen", "Abbrechen");
    }
    return 1;
    }
    return 0;
    }

    Hallo,ich bekomme 3 Warnings nicht weg :(


    Error:
    "C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(413) : warning 225: unreachable code
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(413) : warning 217: loose indentation
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(451) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Warnings."


    DIALOGE :


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == ShopDialog )
    {
    if(response == 0)
    {
    return 1;
    }
    if(response == 1)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Schutzweste gekauft!");
    SetPlayerArmour(playerid,100);
    GivePlayerMoney(playerid,-500);
    return 1;
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine M4 gekauft!");
    GivePlayerWeapon(playerid,31,2000);
    GivePlayerMoney(playerid,-1500);
    return 1;
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine SMG gekauft!");
    GivePlayerWeapon(playerid,29,2000);
    GivePlayerMoney(playerid,-1200);
    return 1;
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Deagle gekauft!");
    GivePlayerWeapon(playerid,24,2000);
    GivePlayerMoney(playerid,-1000);
    return 1;
    }
    }
    }
    return 1;

    //Mafia Shop
    if(dialogid == KaufenDialog )
    {
    if(response == 0)
    {
    return 1;
    }
    if(response == 1)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Schutzweste gekauft!");
    SetPlayerArmour(playerid,100);
    GivePlayerMoney(playerid,-500);
    return 1;
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine AK47 gekauft!");
    GivePlayerWeapon(playerid,30,2000);
    GivePlayerMoney(playerid,-1500);
    return 1;
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine SMG gekauft!");
    GivePlayerWeapon(playerid,29,2000);
    GivePlayerMoney(playerid,-1200);
    return 1;
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Deagle gekauft!");
    GivePlayerWeapon(playerid,24,2000);
    GivePlayerMoney(playerid,-1000);
    return 1;
    }
    }
    }
    return 1;
    }


    Danke im Vorraus :)

    Die Errors:
    "
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(134) : warning 217: loose indentation
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(135) : error 017: undefined symbol "eingelogt"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(135) : warning 215: expression has no effect
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(135) : error 001: expected token: ";", but found "]"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(135) : error 029: invalid expression, assumed zero
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(135) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors."


    public OnPlayerConnect(playerid)
    //Registrier & Login
    {
    eingelogt[playerid] = false;
    SendClientMessage(playerid,0xFFFBFFFF,"Herzlich Willkommen bei Happy Deathmatch Zum Registrieren /register zum Einloggen /login ");
    SendClientMessage(playerid,0xFF0000FF,"Drücke nicht auf SPAWN! Du wirst sonnst gekickt!");
    new name[128];
    new save[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(save,sizeof(save),"/User/%s.ini");
    if(!dini_Exists(save))
    {
    SendClientMessage(playerid, 0xFF0000FF, "Wilkommen zurück! Um dich einzu loggen tippe /login Password");
    GivePlayerMoney(playerid,dini_Int(save,"Money"));
    SetPlayerScore(playerid,dini_Int(save,"Score"));
    pInfo[playerid][Kills] = dini_Int(save,"Kills");
    pInfo[playerid][Deaths] = dini_Int(save,"Deaths");
    pInfo[playerid][Adminlevel] = dini_Int(save, "AdminLevel");
    }
    else
    {
    SendClientMessage(playerid, 0xFF0000FF, "Zum Reggen /register Password!");
    }
    new connect[128];
    new string[128];
    GetPlayerName(playerid,connect,sizeof(connect));
    format(string,sizeof(string),"%s hat den Server betreten", connect);
    SendClientMessageToAll(0xFFFBFFFF,string);
    return 1;
    }

    public OnPlayerDisconnect(playerid, reason)
    //Registrier & Login
    {
    new name[128];
    new save[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(save,sizeof(save),"/User/%s.ini",name);
    if(dini_Exists(save))
    {
    dini_IntSet(save,"Money",GetPlayerMoney(playerid));
    dini_IntSet(save,"Score",GetPlayerScore(playerid));
    dini_IntSet(save,"Kills",pInfo[playerid][Kills]);
    dini_IntSet(save,"Deaths",pInfo[playerid][Deaths]);
    dini_IntSet(save,"Adminlevel",pInfo[playerid][Adminlevel]);
    }
    new disconnect[128];
    new string[128];
    GetPlayerName(playerid,disconnect,sizeof(disconnect));
    format(string,sizeof(string)," %s hat den Server verlassen",disconnect);
    SendClientMessageToAll(0xFF0000FF,string);
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    //Registrier und Login
    if(strcmp(strget(cmdtext,0), "/register", true) == 0)
    {
    new save[40];
    GetPlayerName(playerid,spieler,sizeof(spieler));
    format(save, sizeof(save),"/User/%s.ini",spieler); //Speicherort
    if(dini_Exists(save))
    {
    dini_Create(save);
    dini_IntSet(save,"passwort",udb_hash(strget(cmdtext,1)));
    SendClientMessage(playerid, 0x00C100FF, "Der Account wurde regestriert!");
    SendClientMessage(playerid, 0x00C100FF, "Du kannst dich nun einloggen(/login PW)");
    }
    else
    {
    if(!dini_Exists(save))
    {
    SendClientMessage(playerid, 0xFF0000FF, "Error:Der Name ist bereits vergeben!~n~Wähle einen neuen!");
    }
    }
    return 1;
    } if(strcmp(strget(cmdtext,0), "/register", true) == 0)
    {
    new save[40];
    GetPlayerName(playerid,spieler,sizeof(spieler));
    format(save, sizeof(save),"/User/%s.ini",spieler); //Speicherort
    if(dini_Exists(save))
    {
    dini_Create(save);
    dini_IntSet(save,"passwort",udb_hash(strget(cmdtext,1)));
    SendClientMessage(playerid, 0x00C100FF, "Der Account wurde regestriert!");
    SendClientMessage(playerid, 0x00C100FF, "Du kannst dich nun einloggen(/login PW)");
    }
    else
    {
    if(!dini_Exists(save))
    {
    SendClientMessage(playerid, 0xFF0000FF, "Error:Der Name ist bereits vergeben!~n~Wähle einen neuen!");
    }
    }
    return 1;
    }
    return 0;
    }


    Kann mir einer helfen :S ? das sind die einzigste sachen! es gibt kein define oder ähnliches,brauch ich des?

    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(224) : error 017: undefined symbol "ShopDialog"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(357) : error 017: undefined symbol "ShopDialog"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(396) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    //Shop
    if (strcmp("/buy", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 1, 1575.2797,-1620.1421,13.5469))
    {
    ShowPlayerDialog(playerid, ShopDialog, DIALOG_STYLE_LIST, "Shop", "Schutzweste (500,00$)\nM4 (1500,00$)\nSMG (1200,00$)\nDeagle (1000,00$)", "OK", "ABBRUCH");
    }
    return 1;
    }
    return 0;
    }


    und

    if(dialogid == ShopDialog)
    {
    if(response == 0)
    {
    return 1;
    }
    if(response == 1)
    {

    }
    if(listitem == 0)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Schutzweste gekauft!");
    SetPlayerArmour(playerid,100);
    GivePlayerMoney(playerid,-500);
    return 1;
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine M4 gekauft!");
    GivePlayerWeapon(playerid,31,2000);
    GivePlayerMoney(playerid,-1500);
    return 1;
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine SMG gekauft!");
    GivePlayerWeapon(playerid,29,2000);
    GivePlayerMoney(playerid,-1200);
    return 1;
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Deagle gekauft!");
    GivePlayerWeapon(playerid,24,2000);
    GivePlayerMoney(playerid,-1000);
    return 1;
    }
    }
    return 1;
    }

    es kommt immernoch


    "C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(403) : error 001: expected token: "#endif", but found "-end of file-"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    1 Error."


    Aber die Zeile 403 gibt es nicht und damit es defined musste ich es so machen damit die errors weg gehen ^^


    //Dialoge
    #if defined DIALOGE
    #define ShopDialog;

    Hallo liebe Community,


    ich wollte heute das erste mal einen Dialog machen nur kommen diese Errors
    "
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(224) : error 017: undefined symbol "ShopDialog"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(357) : error 017: undefined symbol "ShopDialog"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(370) : error 017: undefined symbol "GivePlayerArmour"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(384) : error 017: undefined symbol "GivePlayerArmour"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(391) : error 017: undefined symbol "GivePlayerArmour"
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(396) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Errors."



    Dazu das Script,also ausschnitte


    //Shop
    if (strcmp("/buy", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 1, 1575.2797,-1620.1421,13.5469))
    {
    ShowPlayerDialog(playerid, ShopDialog, DIALOG_STYLE_LIST, "Shop", "Schutzweste (500,00$)\nM4 (1500,00$)\nSMG (1200,00$)\nDeagle (1000,00$)", "OK", "ABBRUCH");
    }
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == ShopDialog)
    {
    if(response == 0)
    {
    return 1;
    }
    if(response == 1)
    {

    }
    if(listitem == 0)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Schutzweste gekauft!");
    GivePlayerArmour(playerid,100);
    GivePlayerMoney(playerid,-500);
    return 1;
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine M4 gekauft!");
    GivePlayerWeapon(playerid,31,2000);
    GivePlayerMoney(playerid,-1500);
    return 1;
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine SMG gekauft!");
    GivePlayerArmour(playerid,29,2000);
    GivePlayerMoney(playerid,-1200);
    return 1;
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid,0x7AA4A6FF,"Du hast dir eine Deagle gekauft!");
    GivePlayerArmour(playerid,24,2000);
    GivePlayerMoney(playerid,-1000);
    return 1;
    }
    }
    return 1;
    }


    Danke im Vorraus :love:

    WOW :)


    Vielen Dank für eure Hilfe :P


    kann mir villeicht einer mit Dialogen helfen? :S


    Falls ja könntest du mich in Skype adden


    Skypeaddy:
    FunnyHami


    Bin am verzweifeln :huh:

    public OnPlayerDeath(playerid, killerid, reason)
    {
    SendClientMessage(killerid,0x00C100FF,"Du hast einen Feind eleminiert und erhältst 1000,00$!");
    SendClientMessage(playerid,0xFF0000FF,"Du bist gestorben und dir wurden 500,00$ abgezogen!");
    new string[128];
    new playername[MAX_PLAYER_NAME];
    SendDeathMessage(killerid, playerid, reason);
    new killername[MAX_PLAYER_NAME];
    GetPlayerName(killerid,killername,sizeof(killername));
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string,128,"%s wurde gerade getötet!", playername);
    SendClientMessageToAll(0xFF0000FF, string);
    GivePlayerMoney(killerid, 1000);
    GivePlayerMoney(playerid, -500);
    return 1;
    }



    so oder? weil da sind keine errors ^^

    Red ich habs umgeändert aber dann kommen 2 Errors


    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(150) : error 001: expected token: ")", but found ","
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(150) : error 029: invalid expression, assumed zero
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(150) : warning 215: expression has no effect




    2 Errors.

    Was meinst du?


    also ich hab nur noch des Problem


    public OnPlayerDeath(playerid, killerid, reason)
    {
    SendClientMessage(killerid,0x00C100FF,"Du hast einen Feind eleminiert und erhältst 1000,00$!");
    SendClientMessage(playerid,0xFF0000FF,"Du bist gestorben und dir wurden 500,00$ abgezogen!");
    new string[128];
    new playername[MAX_PLAYER_NAME];
    SendDeathMessage(killerid, playerid, reason);
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string,sizeof(string,"%s wurde gerade getötet!", playername);
    SendClientMessageToAll(0xFF0000FF, string);
    GivePlayerMoney(killerid, 1000);
    GivePlayerMoney(playerid, -500);
    return 1;
    }


    Der Error


    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(150) : error 001: expected token: ")", but found ","


    1 Error.

    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(150) : error 001: expected token: ")", but found ","
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(150) : error 029: invalid expression, assumed zero
    C:\Users\Hami\Desktop\Selfmade Script\Happy Deathmatch\gamemodes\HappyDeathmatch.pwn(150) : warning 215: expression has no effect


    weil ich das durch deins ersetzt habe,aber ohne das ist der andere error noch da :|



    2 Errors.




    1 Error.


    ?( und jetzt ? ?(