Beiträge von don456

    habs mal anders gemacht
    new Float:playerx[MAX_PLAYERS],Float:playery[MAX_PLAYERS],Float:playerz[MAX_PLAYERS],Float:playera[MAX_PLAYERS];
    new Float:vehx[MAX_VEHICLES],Float:vehy[MAX_VEHICLES],Float:vehz[MAX_VEHICLES],Float:veha[MAX_VEHICLES];
    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if(newkeys & KEY_ACTION)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new auto = GetPlayerVehicleID(playerid);
    GetVehiclePos(playerid,vehx[auto],vehy[auto],vehz[auto]);
    GetPlayerPos(playerid,playerx[playerid],playery[playerid],playerz[playerid]);
    GetPlayerFacingAngle(playerid,playera[playerid]);
    }
    else
    {
    GetPlayerPos(playerid,playerx[playerid],playery[playerid],playerz[playerid]);
    GetPlayerFacingAngle(playerid,playera[playerid]);
    }
    }
    if(newkeys & KEY_CROUCH)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new auto = GetPlayerVehicleID(playerid);
    SetPlayerPos(playerid,playerx[playerid],playery[playerid],playerz[playerid]);
    SetVehiclePos(playerid,vehx[auto],vehy[auto],vehz[auto]);
    SetPlayerFacingAngle(playerid,veha[playerid]);
    PutPlayerInVehicle(playerid,auto,0);
    }
    else
    {
    SetPlayerPos(playerid,playerx[playerid],playery[playerid],playerz[playerid]);
    SetPlayerFacingAngle(playerid,playera[playerid]);
    }
    }
    Bloß wenn man jetzt mit nem auto zu gespeicherten position will bleibt das auto stehen und wird nicht teleportiert zu gespeicherten position
    hat irgendwer nen einfall wie es richtig funktionieren könnte


    if(!strcmp(strget(cmdtext, 0),"/getip"))
    {
    new target = strval(strget(cmdtext, 1));
    if(!strlen(strget(cmdtext, 1))) { SendClientMessage(playerid,MSG2,"Benutze: /getip [ID]"); return 1; }
    if(!IsPlayerConnected(target)) { SendClientMessage(playerid,COLOR_RED,"Diese ID ist nicht vergeben"); return 1; }
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
    new ipadress[128],string[128],name[24];
    GetPlayerName(target,name,sizeof name);
    GetPlayerIp(target,ipadress,sizeof ipadress);
    format(string,sizeof string,"Name: %s IP: %s",name,ipadress);
    SendClientMessage(playerid,MSG2,string);
    }
    return 1;
    }

    monti was ist da jetzt der unterschied zu meinem?


    Und Pawno hängt sich auf weil du das ganze script falsch eingerückt hast


    EDIT: Also sowas hier
    if (strcmp(cmdtext, "/pimp", true)==0)
    {
    SetPlayerInterior(playerid,0);
    {if(State!=PLAYER_STATE_DRIVER)
    {SetPlayerPos(playerid,786.1298,-509.4973,16.8773);}
    else if(IsPlayerInVehicle(playerid, cartype) == 1)
    {SetVehiclePos(cartype,786.1298,-509.4973,16.8773);
    SetVehicleZAngle(cartype,177.6599);}
    else
    {SetPlayerPos(playerid,786.1298,-509.4973,16.8773);}
    GameTextForPlayer(playerid,"Willkommen zur Pimpround!",2500,3);}
    return 1;}
    //-----------------------------------------------------pPacker
    if (strcmp(cmdtext, "/pPacker", true) ==0) {
    if ( NRGspawn[playerid] == 0) {
    new Float:xxx, Float:yyy, Float:zzz;
    GetPlayerPos(playerid, xxx, yyy, zzz);
    new Float:aaa;
    GetPlayerFacingAngle(playerid, aaa);
    new interior;
    interior = GetPlayerInterior(playerid);
    pNRG[playerid] = CreateVehicle(443, xxx, yyy +1, zzz +1, aaa, 0, 0, 5000000);
    LinkVehicleToInterior(pNRG[playerid], interior);
    NRGspawn[playerid] = 1;
    PutPlayerInVehicle(playerid, pNRG[playerid], 0);


    } else {
    SendClientMessage(playerid, COLOR_RED, "Fehler: Dein Packer ist schon gepawned.Bitte tippe /cPacker ein!");}
    return 1;
    }
    if (strcmp(cmdtext, "/cPacker", true) ==0) {
    if ( NRGspawn[playerid] == 1 )
    {
    new Float:xxx, Float:yyy, Float:zzz;
    GetPlayerPos(playerid, xxx, yyy, zzz);
    new Float:aaa;


    GetPlayerFacingAngle(playerid, aaa);


    if(GetVehicleModel(pNRG[playerid]) == 443)
    {
    SetVehiclePos(pNRG[playerid], xxx, yyy +1, zzz +1);
    SetVehiclePos(pNRG[playerid], xxx, yyy +1, zzz +1);
    SetVehiclePos(pNRG[playerid], xxx, yyy +1, zzz +1);
    SetVehiclePos(pNRG[playerid], xxx, yyy +1, zzz +1);
    SetVehiclePos(pNRG[playerid], xxx, yyy +1, zzz +1);
    PutPlayerInVehicle(playerid, pNRG[playerid], 0);
    NRGspawn[playerid] = 1;
    SendClientMessage(playerid, COLOR_YELLOW, "Packer - gerufen !");
    } else {
    SetVehiclePos(pNRG[playerid], xxx+1,yyy+1,zzz+1);
    DestroyVehicle(pNRG[playerid]);
    pNRG[playerid] = CreateVehicle(411, xxx, yyy +1, zzz +1, aaa, 0, 0, 5000000);
    PutPlayerInVehicle(playerid, pNRG[playerid], 0);
    }


    } else {
    SendClientMessage(playerid, COLOR_RED, "FEHLER: Noch kein Packer gespawned.Bitte tippe /pPacker ein!");}
    return 1;


    }
    //dm�s
    if(strcmp(cmdtext,"/DM1",true)==0)
    {
    SetPlayerPos(playerid,-2119.2554,-194.4700,35.3203);
    ResetPlayerWeapons(playerid);
    GameTextForPlayer(playerid,"Willkommen zu /DM1",4000,6);
    GivePlayerWeapon(playerid, 26, 8000);
    GivePlayerWeapon(playerid, 32, 8000);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.0);
    return 1;
    }


    if(strcmp(cmdtext,"/DM2",true)==0)
    {
    SetPlayerPos(playerid,2208.0815,2189.2583,103.8786);
    ResetPlayerWeapons(playerid);
    GameTextForPlayer(playerid,"Willkommen zu /DM3",4000,6);
    GivePlayerWeapon(playerid, 26, 8000);
    GivePlayerWeapon(playerid, 32, 8000);
    GivePlayerWeapon(playerid, 23, 8000);
    return 1;
    }


    if(strcmp(cmdtext,"/DM3",true)==0)
    {
    SetPlayerPos(playerid,2100.1074,2185.1470,13.4786);
    ResetPlayerWeapons(playerid);
    GameTextForPlayer(playerid,"Willkommen zu /DM4",4000,6);
    GivePlayerWeapon(playerid, 26, 8000);
    GivePlayerWeapon(playerid, 32, 8000);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.0);
    GivePlayerWeapon(playerid, 23, 8000);
    return 1;
    }

    SO


    public OnPlayerConnect(playerid)
    {
    new pname[256];
    GetPlayerName(playerid,pname,sizeof(pname));
    format(pname,sizeof(pname),"*** %s hat den Server betreten. (ID:%d)",pname,playerid);
    SendClientMessageToAll(COLOR_CON_GREEN,pname);
    GameTextForPlayer(playerid,"~b~Willkommen auf dem ~r~xTreme~y~Party ~y~ Server!",2500,3);
    SendClientMessage(playerid,"Wilkommen auf dem SexXxy Party Server von [GBC]Gecko!!!! Du bekommst gleich mal 50000$.");
    SendClientMessage(playerid,"Willkommen Tippe [/login] um dich einzuloqqen.[/register] Um dich zu Registrieren.");
    return 1;
    }




    //------------------------------------------------------------------------------
    public OnPlayerDisconnect(playerid, reason)
    {
    new string[85],pname[24];
    switch (reason)
    {
    case 0:
    {
    GetPlayerName(playerid,pname,sizeof(pname));
    format(string,sizeof(string), "%s hat den Server verlassen. (Timeout)(ID:%d)",pname,playerid);
    SendClientMessageToAll(COLOR_RED,string)
    }
    case 1:
    {
    GetPlayerName(playerid,pname,sizeof(pname));
    format(string,sizeof(string), "%s hat den Server verlassen. (Leaving)(ID:%d)",pname,playerid);
    SendClientMessageToAll(COLOR_RED,string);
    }
    case 2:
    {
    GetPlayerName(playerid,pname,sizeof(pname));
    format(string,sizeof(string), "%s hat den Server verlassen. (Kicked)(ID:%d)",pname,playerid);
    SendClientMessageToAll(COLOR_RED,string);
    }
    }
    return 1;
    }
    public OnPlayerSpawn(playerid)
    {
    return 1;
    }
    Hab auch mal die einrückung überarbeitet

    if(strcmp(cmd, "/giveweapon", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "BENUTZE: /giveweapon [id] [weaponid] [ammo]");
    return 1;
    }
    new player;
    new gun;
    new ammo;
    player = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    tmp = strtok(cmdtext, idx);
    ammo = strval(tmp);
    if(ammo <1||ammo > 10000)
    { SendClientMessage(playerid, COLOR_WHITE, "Du kannst nich mehr Munition als 10000 geben!"); return 1; }
    if (PlayerInfo[playerid][pAdmin] >= 5)
    {
    if(IsPlayerConnected(player))
    {
    if(player != INVALID_PLAYER_ID)
    {
    GivePlayerWeapon(player, gun, ammo);
    }
    }
    } else {
    SendClientMessage(playerid, COLOR_WHITE, "Du bist kein Admin!");
    }
    }
    return 1;
    }

    das ist ja net mein systme ich hab halt das problem das es net funktioniert wie ich es mir vorstelle also die autos spawnen immer am ersstleelungs ort erst nach nem neustart dan am park ort

    du hast den server bei dir zu hause auf dem pc dann nehm mal die ip zum test 127.0.0.1:7777
    die kannste bloss net weiter geben ist so gesehen deine private samp ip

    So ich hab mir das "BlackFoX' CarOwnerShip *New* " geholt und wollte es so erweitern, dass nach dem fahrzeug tod die fahrzeuge an der alten geparkten stelle spawnen, diese Funktionier bei meiner erweiterung bloß geneauso wenig wie bei dem original von BlackFoX. Mann muss immer erst denn server neu starten, das die fahrzeuge an der geparkten stelle spawnen, aber dieses nach jedem parken.
    So hier mal meine erweiterung .
    Was ich hinzugefügt habe zum testen ist.

    forward yCar(playerid);


    public OnVehicleDeath(vehicleid, killerid)
    {
    new i;
    for(i=0; i<MAX_PLAYERS; i++)
    if(!IsBuyVehicle(vehicleid)) {
    SetTimerEx("yCar",3000,0,"i",i);
    }
    return 1;
    }





    public yCar(playerid)
    {
    new MyName[256];
    new string[256];
    GetPlayerName(playerid,MyName,sizeof(MyName));
    new vehicleid = GetPlayerVehicleID(playerid);
    new OwnerN[256];
    new Get = GetBuyID(vehicleid);
    if(!IsBuyVehicle(vehicleid)) { return 1; }
    new temp[256];
    for(new count;count<MAX_BUY_CARS;count++){
    format(string, sizeof(string),"blackfox_carlist/buyc_%d.sav",count);
    if(dini_Exists(string)){
    new Float:ccx, Float:ccy, Float:ccz, Float:cca;
    temp = dini_Get(string,"auto_x");
    ccx = strval(temp);
    temp = dini_Get(string,"auto_y");
    ccy = strval(temp);
    temp = dini_Get(string,"auto_z");
    ccz = strval(temp);
    temp = dini_Get(string,"auto_a");
    cca = strval(temp);
    SetVehiclePos(vehicleid,ccx,ccy,ccz);
    SetVehicleZAngle(vehicleid,cca);
    SendClientMessage(playerid,COLOR_YELLOW," Dein Auto wurde neu gespawnt!");


    return 1;
    }