Beiträge von Pascal.

    Setz bei OnPlayerSpawn das Leben auf 100.
    SetPlayerHealth(playerid,100);
    if(PlayerInfo[playerid][pTod] == 1)
    {
    SetPVarInt(playerid,"tot_Skin",GetPlayerSkin(playerid));
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_YELLOW, "|________ | Krankenhaus | ________|");
    SendClientMessage(playerid, COLOR_LIGHTRED, "Durch deine schweren Verletzungen liegst du im Koma!");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sie sind für 2 bis 3 Minuten im Krankenhaus.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "In 2 bis 3 Minuten kommen Sie wieder raus, da Sie gerade behandelt werden.");
    SetPlayerPos(playerid,941.7925,1734.3978,21.1277);
    SetPlayerCameraPos(playerid, 993.5776,1653.3435,10.3279);
    SetPlayerCameraLookAt(playerid, 949.7623,1748.0996,26.2525);
    TogglePlayerControllable(playerid,0);
    SetPlayerColor(playerid, COLOR_ZIVI);
    ResetPlayerWeapons(playerid);
    return 1;
    }

    Probier es mal so =)
    if(strcmp(cmd, "/prison", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Verwendung: /prison [SpielerID] [Minute/n] [Begründung]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du hast keine Berechtigung.");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Verwendung: /prison [SpielerID] [Minute/n] [Begründung]");
    return 1;
    }
    new time_p = strval(tmp);
    if(time_p < 0 ) return 1;
    new lenght = strlen(cmdtext);
    while ((idx < lenght) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < lenght) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Verwendung: /prison [SpielerID] [Minute/n] [Begründung]");
    return 1;
    }
    SetPlayerInterior(giveplayerid, 1);
    PlayerInfo[giveplayerid][pJailed] = 1;
    PlayerInfo[giveplayerid][pJailTime] = time_p;
    ResetPlayerWeapons(giveplayerid);
    PlayerInfo[giveplayerid][pInt] = 1;
    format(string, sizeof(string), "%s hat %s für %d Minuten ins Prison teleportiert, Begründung: %s", Name(playerid), Name(giveplayerid), PlayerInfo[playerid][pJailTime], (result));
    SendClientMessageToAll(COLOR_IRED, string);
    SetPlayerInterior(giveplayerid, 1);
    SetPlayerPos(giveplayerid, 2144.3108,1635.9301,993.5761);
    SpawnPlayer(giveplayerid);
    new jstr[500];
    format(jstr, sizeof(jstr), "Du wurdest von %s für %d Minuten ins Prison teleportiert, Begründung: %s", Name(playerid), PlayerInfo[playerid][pJailTime], (result));
    SendClientMessage(playerid, COLOR_IRED, string);
    return 1;
    }
    }
    }
    }
    return 1;
    }

    Speicher es sobald diese Nachricht kommt.
    Hier:
    if(PlayerInfo[playerid][pTod] == 1)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_YELLOW, "|________ | Krankenhaus | ________|");
    SendClientMessage(playerid, COLOR_LIGHTRED, "Durch deine schweren Verletzungen liegst du im Koma!");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sie sind für 2 bis 3 Minuten im Krankenhaus.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "In 2 bis 3 Minuten kommen Sie wieder raus, da Sie gearde behandelt werden.");
    SetPlayerPos(playerid,957.6639,1733.9774,9.0391);
    TogglePlayerControllable(playerid,0);
    SetPlayerColor(playerid, COLOR_ZIVI);
    ResetPlayerWeapons(playerid);
    return 1;
    }

    Das mit dem Skin geht eigentlich recht easy.
    Sobald der Spieler stirbt, speicherst du den Skin in ein PVar.
    Das würde so aussehen:
    SetPVarInt(playerid,"tot_Skin",GetPlayerSkin(playerid);


    Achte aber darauf das du erst den skin speicherst bevor er den Krankenhaus skin bekommt.
    Sobald er dann vom Krankenhaus draußen ist, machst du dass einfach so:
    SetPlayerSkin(playerid,GetPVarInt(playerid,"tot_Skin");


    Müsste so gehen.

    Sinnlos, ich finde Rocky macht seine Arbeit als Moderator ganz gut.
    Wenn halt mal etwas von dir gelösch wird, dann wird es seine Gründe haben.
    Wenn du damit nicht einverstanden bist, dann gibt es eine PN Funktion, in dem du ihn eine Nachricht schreiben kannst.
    Oder einfach mal ins Regelwerk schauhen, dort sollteste dann die Antwort finden.

    Jeffry:


    Hier ist der code mit der ATM-list.
    Sobald der Spieler dann auf ein ATM klickt, soll er ein Checkpoint kriegen.
    Die ATM's und die Kordinaten sind in der Datenbank vorhanden.


    ocmd:atmlist(playerid,params[])
    {
    if(pInfo[playerid][pEingeloggt] == 0)return SendClientMessage(playerid,COLOR_GRAU,"Info: Du bist nicht Eingeloggt!");
    if(pInfo[playerid][pJob] !=3)return SCM(playerid,COLOR_GRAU,"Du bist kein Geldlieferant.");
    //if(GetPVarInt(playerid,"Job_Duty") == 0)return SCM(playerid,COLOR_GRAU,"Du bist nicht im Dienst.");
    new string[350];
    for(new i=0; i<sizeof(amInfo); i++)
    {
    if(!amInfo[i][ad_id])continue;
    format(string,350,"%s\n%i: %i/30.000$",string,amInfo[i][ad_id],amInfo[i][a_geld]);
    ShowPlayerDialog(playerid,DIALOG_ATMLIST,DIALOG_STYLE_LIST,"ATM Liste",string,"Makieren","Abbrechen");
    return 1;
    }
    return SCM(playerid,COLOR_GRAU,"Es sind keine ATM's vorhanden!");
    }


    Bin bei OnDialogResponse nicht mehr weiter gekommen, weil ich nicht weiß wie ich das mit dem case machen soll.
    hatte schon probiert mit case 1 .. 50:{//code}.
    Das ging aber auch nicht.


    if(dialogid == DIALOG_ATMLIST)
    {
    for(new i=0; i<sizeof(amInfo); i++)
    {
    if(!amInfo[i][ad_id])continue;
    {
    i = amInfo[i][ad_id];
    printf("%i",i);
    printf("SetPlayerCheckpoint(playerid, amInfo[%i][a_x],amInfo[%i][a_y],amInfo[%i][a_z],3)",i,i,i);
    SetPlayerCheckpoint(playerid, amInfo[i][a_x],amInfo[i][a_y],amInfo[i][a_z],3);
    }
    }
    return 1;
    }
    Bei dem Print kam immer das zweite raus also er hat es mir so gelistet.
    Es gibt 18 ATM's und das kam im Print raus:


    Spoiler anzeigen
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[1][a_x],amInfo[1][a_y],amInfo[1][a_z],3)
    [00:07:02] 3
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[3][a_x],amInfo[3][a_y],amInfo[3][a_z],3)
    [00:07:02] 5
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[5][a_x],amInfo[5][a_y],amInfo[5][a_z],3)
    [00:07:02] 7
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[7][a_x],amInfo[7][a_y],amInfo[7][a_z],3)
    [00:07:02] 9
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[9][a_x],amInfo[9][a_y],amInfo[9][a_z],3)
    [00:07:02] 11
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[11][a_x],amInfo[11][a_y],amInfo[11][a_z],3)
    [00:07:02] 13
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[13][a_x],amInfo[13][a_y],amInfo[13][a_z],3)
    [00:07:02] 15
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[15][a_x],amInfo[15][a_y],amInfo[15][a_z],3)
    [00:07:02] 17
    [00:07:02] SetPlayerCheckpoint(playerid, amInfo[17][a_x],amInfo[17][a_y],amInfo[17][a_z],3)
    [00:07:06] 1
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[1][a_x],amInfo[1][a_y],amInfo[1][a_z],3)
    [00:07:06] 3
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[3][a_x],amInfo[3][a_y],amInfo[3][a_z],3)
    [00:07:06] 5
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[5][a_x],amInfo[5][a_y],amInfo[5][a_z],3)
    [00:07:06] 7
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[7][a_x],amInfo[7][a_y],amInfo[7][a_z],3)
    [00:07:06] 9
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[9][a_x],amInfo[9][a_y],amInfo[9][a_z],3)
    [00:07:06] 11
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[11][a_x],amInfo[11][a_y],amInfo[11][a_z],3)
    [00:07:06] 13
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[13][a_x],amInfo[13][a_y],amInfo[13][a_z],3)
    [00:07:06] 15
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[15][a_x],amInfo[15][a_y],amInfo[15][a_z],3)
    [00:07:06] 17
    [00:07:06] SetPlayerCheckpoint(playerid, amInfo[17][a_x],amInfo[17][a_y],amInfo[17][a_z],3)
    [00:07:08] 1
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[1][a_x],amInfo[1][a_y],amInfo[1][a_z],3)
    [00:07:08] 3
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[3][a_x],amInfo[3][a_y],amInfo[3][a_z],3)
    [00:07:08] 5
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[5][a_x],amInfo[5][a_y],amInfo[5][a_z],3)
    [00:07:08] 7
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[7][a_x],amInfo[7][a_y],amInfo[7][a_z],3)
    [00:07:08] 9
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[9][a_x],amInfo[9][a_y],amInfo[9][a_z],3)
    [00:07:08] 11
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[11][a_x],amInfo[11][a_y],amInfo[11][a_z],3)
    [00:07:08] 13
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[13][a_x],amInfo[13][a_y],amInfo[13][a_z],3)
    [00:07:08] 15
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[15][a_x],amInfo[15][a_y],amInfo[15][a_z],3)
    [00:07:08] 17
    [00:07:08] SetPlayerCheckpoint(playerid, amInfo[17][a_x],amInfo[17][a_y],amInfo[17][a_z],3)
    [00:07:11] 1
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[1][a_x],amInfo[1][a_y],amInfo[1][a_z],3)
    [00:07:11] 3
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[3][a_x],amInfo[3][a_y],amInfo[3][a_z],3)
    [00:07:11] 5
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[5][a_x],amInfo[5][a_y],amInfo[5][a_z],3)
    [00:07:11] 7
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[7][a_x],amInfo[7][a_y],amInfo[7][a_z],3)
    [00:07:11] 9
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[9][a_x],amInfo[9][a_y],amInfo[9][a_z],3)
    [00:07:11] 11
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[11][a_x],amInfo[11][a_y],amInfo[11][a_z],3)
    [00:07:11] 13
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[13][a_x],amInfo[13][a_y],amInfo[13][a_z],3)
    [00:07:11] 15
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[15][a_x],amInfo[15][a_y],amInfo[15][a_z],3)
    [00:07:11] 17
    [00:07:11] SetPlayerCheckpoint(playerid, amInfo[17][a_x],amInfo[17][a_y],amInfo[17][a_z],3)

    Das war bei mir auch immer das Problem, ich lasse aber jetzt mysql und apache mit dem PC hoch fahren, und das klappt einwandfrei =)
    Vielleicht hilft dir das ja auch.