Beiträge von IntelligenT

    Ach mach aus string einfach string1


    for(new pv = 0; pv < sizeof(PolizeiVehs); pv++)
    {
    new string1[10];
    new kenzeichenzahl = 100 + random(999);
    format(string1,sizeof(string1),"PD-%d",kenzeichenzahl);
    SetVehicleNumberPlate(PolizeiVehs[pv], string1);
    SetVehicleToRespawn(PolizeiVehs[pv]);
    }


    MfG:
    Me

    {
    new string[10];
    new kenzeichenzahl = 100 + random(999);
    format(string,sizeof(string),"PD-%d",kenzeichenzahl);
    SetVehicleNumberPlate(PolizeiVehs[pv], string);
    SetVehicleToRespawn(PolizeiVehs[pv]);
    }


    Dann haste davor schon irgendwo new string stehen.

    new string[10];
    new kenzeichenzahl = 100 + random(999);
    format(string,sizeof(string),"PD-%d",kenzeichenzahl);
    SetVehicleNumberPlate(PolizeiVehs[pv], string);
    SetVehicleToRespawn(PolizeiVehs[pv]);
    }
    for(new pv = 0; pv < sizeof(FeuerVehs); pv++)
    {
    Ohne das new string bei der Schleife.


    MfG.
    Me

    So ?


    if(strcmp(cmd, "/kick", true) == 1)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /kick [playerid] [Grund]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pSupporter] >= 1)
    {
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /kick [playerid] [Grund]");
    return 1;
    }
    if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Spieler nicht kicken, da er ein höheres Adminlevel hat als du!");
    return 1;
    }
    new year, month,day;
    getdate(year, month, day);
    format(string, sizeof(string), "Server: Spieler %s wurde von %s gekickt, Grund: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
    KickLog(string);
    format(string, sizeof(string), "AdminSystem: %s wurde von %s gekickt, Grund: %s", giveplayer, sendername, (result));
    SendClientMessageToAll(0xFF0019FF, string);
    Kick(giveplayerid);
    return 1;
    }
    }
    else
    {
    format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "Du bist kein Admin!");
    }
    }
    }

    Versuchs mal damit:


    if(dialogid == DIALOG_FIGHTSTYLE)
    {
    if(response==0)
    {
    return 1;
    }
    if(response==1)
    {
    if(listitem == 0)
    {
    if(GetPlayerMoney(playerid) >= PREIS)
    {
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
    GivePlayerMoney(playerid, -PREIS);
    SendClientMessage(playerid,HELLBLAU,"Du hast den normalen Fightstyle erlernt (Preis: 500)!");
    }
    else
    {
    SendClientMessage(playerid, WEINROT,"Du hast nicht genug Geld");
    }
    }
    if(listitem == 1)
    {
    if(GetPlayerMoney(playerid) >= PREIS)
    {
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
    GivePlayerMoney(playerid, -PREIS);
    SendClientMessage(playerid,HELLBLAU,"Du hast den Boxer Fightstyle erlernt (Preis: 500)!");

    }
    else
    {
    SendClientMessage(playerid, WEINROT,"Du hast nicht genug Geld");
    }
    }
    if(listitem == 2)
    {
    if(GetPlayerMoney(playerid) >= PREIS)
    {
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
    GivePlayerMoney(playerid, -PREIS);
    SendClientMessage(playerid,HELLBLAU,"Du hast den Kungfu Fightstyle erlernt (Preis: 500)!");
    }
    else
    {
    SendClientMessage(playerid, WEINROT,"Du hast nicht genug Geld");
    }


    }
    if(listitem == 3)
    {
    if(GetPlayerMoney(playerid) >= PREIS)
    {
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
    GivePlayerMoney(playerid, -PREIS);
    SendClientMessage(playerid,HELLBLAU,"Du hast den Kneehead Fightstyle erlernt (Preis: 500)!");
    else
    {
    SendClientMessage(playerid, WEINROT,"Du hast nicht genug Geld");
    }
    }
    }
    if(listitem == 4)
    {
    if(GetPlayerMoney(playerid) >= PREIS)
    {
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
    GivePlayerMoney(playerid, -PREIS);
    SendClientMessage(playerid,HELLBLAU,"Du hast den Grabkick Fightstyle erlernt (Preis: 500)!");
    }
    else
    {
    SendClientMessage(playerid, WEINROT,"Du hast nicht genug Geld");
    }
    }
    if(listitem == 5)
    {
    if(GetPlayerMoney(playerid) >= PREIS)
    {
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
    GivePlayerMoney(playerid, -PREIS);
    SendClientMessage(playerid,HELLBLAU,"Du hast den Elbow Fightstyle erlernt (Preis: 500)!");
    }
    else
    {
    SendClientMessage(playerid, WEINROT,"SERVER: Du hast nicht genug Geld");
    }
    }
    }
    }