[HELP] Spawn ändern

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
  • Hey Leute,
    Ich bekomm es einfach nicht hin den Spawn zu ändern.
    Kann da jemand vielleicht helfen ?
    Mann soll an folgenden Koordinaten spawnen :
    0,1107.9464,-1796.3353,16.5938,91.8533,0,0,0,0,0,0


    public OnGameModeInit()
    {
    SetGameModeText("Blank Script");
    AddPlayerClass(0,1107.9464,-1796.3353,16.5938,91.8533,0,0,0,0,0,0);
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,1107.9464,-1796.3353,16.5938);
    SetPlayerCameraPos(playerid,1104.4406,-1796.4176,15.6488);
    SetPlayerCameraLookAt(playerid,1110.9919,-1796.4048,16.5938);
    SetPlayerFacingAngle(playerid,91.8533);
    return 1;
    }


    //EDIT: Kann keiner helfen ?

    Einmal editiert, zuletzt von xReapZ ()

  • public OnGameModeInit()
    {
    SetGameModeText("Blank Script");
    AddPlayerClass(0,1107.9464,-1796.3353,16.5938,91.8533,0,0,0,0,0,0); // Hier Spawnt er dann.
    return 1;
    }


    Müsste eig gehen.


    /edit
    Oh ist ja das selbe...

  • Ich bin zwar auch noch ein noob, aber versuchs mal so:
    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT


    #include <a_samp>
    #include <dini>
    #define DIALOG_LOGIN 3
    #define DIALOG_REG 4
    enum spieler_daten
    {
    wanted,
    skin,
    eingeloggt
    }
    new Spieler[MAX_PLAYERS][spieler_daten];


    public OnGameModeInit()
    {
    SetGameModeText("Blank Script");
    AddPlayerClass(0,1107.9464,-1796.3353,16.5938,91.8533,0,0,0,0,0,0);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,1107.9464,-1796.3353,16.5938);
    SetPlayerCameraPos(playerid,1104.4406,-1796.4176,15.6488);
    SetPlayerCameraLookAt(playerid,1110.9919,-1796.4048,16.5938);
    SetPlayerFacingAngle(playerid,91.8533);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Spieler/%s.ini",pname);
    if(fexist(accFormat))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Spieler/%s.ini",pname);
    if(fexist(accFormat) && Spieler[playerid][eingeloggt])
    {
    dini_IntSet(accFormat,"wanted",Spieler[playerid][wanted]);
    dini_IntSet(accFormat,"skin",Spieler[playerid][skin]);
    dini_IntSet(accFormat,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(accFormat,"Score",GetPlayerScore(playerid));
    }
    Spieler[playerid][eingeloggt] = 0;
    Spieler[playerid][wanted] = 0;
    Spieler[playerid][skin] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Spieler/%s.ini",pname);
    if(response)
    {
    switch(dialogid) // dialogid auswählen
    {
    case DIALOG_LOGIN: // ID Login
    {
    if(!strlen(inputtext))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    return SendClientMessage(playerid,0xFFFFFFFF,"Kein Passwort angegeben!");
    }
    if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0) // Passwort Direkt aus der Datei Laden
    {
    Spieler[playerid][wanted] = dini_Int(accFormat,"wanted");
    Spieler[playerid][skin] = dini_Int(accFormat,"skin");
    GivePlayerMoney(playerid,dini_Int(accFormat,"Geld"));
    SetPlayerScore(playerid,dini_Int(accFormat,"Score"));
    Spieler[playerid][eingeloggt] = 1; // Spieler ist nun erfolgreich eingeloggt
    SendClientMessage(playerid,0xFFFFFFFF,"Du wurdest erfolgreich eingeloggt.");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort war Falsch!");
    }
    }
    case DIALOG_REG: // ID Registrieren
    {
    if(!strlen(inputtext)) // Text darf nicht = Null sein Null im Sinne von nichts
    {
    ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
    return SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort ist zu kurz!");
    }
    dini_Create(accFormat);
    dini_Set(accFormat,"Passwort",inputtext);
    Spieler[playerid][eingeloggt] = 1;
    SendClientMessage(playerid,0xFFFFFFFF,"Account wurde erstellt und du wurdest automatisch eingeloggt.");
    }
    }
    }
    else
    {
    switch(dialogid)
    {
    case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    case DIALOG_REG:ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
    }
    }
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT


    #include <a_samp>
    #include <dini>
    #define DIALOG_LOGIN 3
    #define DIALOG_REG 4
    enum spieler_daten
    {
    wanted,
    skin,
    eingeloggt
    }
    new Spieler[MAX_PLAYERS][spieler_daten];


    public OnGameModeInit()
    {
    SetGameModeText("Blank Script");
    AddPlayerClass(0,1107.9464,-1796.3353,16.5938,91.8533,0,0,0,0,0,0);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,1107.9464,-1796.3353,16.5938);
    SetPlayerCameraPos(playerid,1104.4406,-1796.4176,15.6488);
    SetPlayerCameraLookAt(playerid,1110.9919,-1796.4048,16.5938);
    SetPlayerFacingAngle(playerid,91.8533);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Spieler/%s.ini",pname);
    if(fexist(accFormat))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Spieler/%s.ini",pname);
    if(fexist(accFormat) && Spieler[playerid][eingeloggt])
    {
    dini_IntSet(accFormat,"wanted",Spieler[playerid][wanted]);
    dini_IntSet(accFormat,"skin",Spieler[playerid][skin]);
    dini_IntSet(accFormat,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(accFormat,"Score",GetPlayerScore(playerid));
    }
    Spieler[playerid][eingeloggt] = 0;
    Spieler[playerid][wanted] = 0;
    Spieler[playerid][skin] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Spieler/%s.ini",pname);
    if(response)
    {
    switch(dialogid) // dialogid auswählen
    {
    case DIALOG_LOGIN: // ID Login
    {
    if(!strlen(inputtext))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    return SendClientMessage(playerid,0xFFFFFFFF,"Kein Passwort angegeben!");
    }
    if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0) // Passwort Direkt aus der Datei Laden
    {
    Spieler[playerid][wanted] = dini_Int(accFormat,"wanted");
    Spieler[playerid][skin] = dini_Int(accFormat,"skin");
    GivePlayerMoney(playerid,dini_Int(accFormat,"Geld"));
    SetPlayerScore(playerid,dini_Int(accFormat,"Score"));
    Spieler[playerid][eingeloggt] = 1; // Spieler ist nun erfolgreich eingeloggt
    SendClientMessage(playerid,0xFFFFFFFF,"Du wurdest erfolgreich eingeloggt.");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort war Falsch!");
    }
    }
    case DIALOG_REG: // ID Registrieren
    {
    if(!strlen(inputtext)) // Text darf nicht = Null sein Null im Sinne von nichts
    {
    ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
    return SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort ist zu kurz!");
    }
    dini_Create(accFormat);
    dini_Set(accFormat,"Passwort",inputtext);
    Spieler[playerid][eingeloggt] = 1;
    SendClientMessage(playerid,0xFFFFFFFF,"Account wurde erstellt und du wurdest automatisch eingeloggt.");
    }
    }
    }
    else
    {
    switch(dialogid)
    {
    case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    case DIALOG_REG:ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
    }
    }
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }

  • C:\Users\ar2807614649\Desktop\Spiele\GTA - San Andreas\SAMP Server\pawno\Test.pwn(74) : warning 204: symbol is assigned a value that is never used: "accFormat"
    C:\Users\Computer\Desktop\Spiele\GTA - San Andreas\SAMP Server\pawno\Test.pwn(250) : warning 217: loose indentation
    C:\Users\Computer\Desktop\Spiele\GTA - San Andreas\SAMP Server\pawno\Test.pwn(270) : warning 217: loose indentation
    C:\Users\Computer\Desktop\Spiele\GTA - San Andreas\SAMP Server\pawno\Test.pwn(274) : warning 217: loose indentation
    C:\Users\Computer\Desktop\Spiele\GTA - San Andreas\SAMP Server\pawno\Test.pwn(275) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Warnings.


    -.-

  • na dann so sieht es in meinem dm script aus

    //ongamemodeinit
    AddPlayerClass(105, 2482.7224,-1668.4399,13.3417,259.8332,0,0,0,0,0,0);//Team spawn grooveskin//<------------das is die classid 0 und die nächste wäre 1 und dann 2 das wäre alles team 1


    //onplayerrequestclass
    if(classid >= 0 && classid <= 2)
    {
    SetPlayerColor(playerid, GREEN);
    gTeam[playerid] = TEAM_GOSSENSTREET;
    }
    if(gTeam[playerid] == TEAM_GOSSENSTREET)
    {
    SetPlayerPos(playerid, 2513.6677,-1690.9747,13.7842);//beim einloggen skinauswahl
    SetPlayerCameraPos(playerid, 2511.2434,-1688.6477,13.5524);
    SetPlayerCameraLookAt(playerid, 2513.6677,-1690.9747,13.7842);
    SetPlayerFacingAngle(playerid,180.0);
    }
    }
    //onplayerspawn
    if(gTeam[playerid] == TEAM_GOSSENSTREET)
    {
    if(Spieler[playerid][Member] == 1)
    {
    GivePlayerWeapon(playerid,29,250);//MP5
    GivePlayerWeapon(playerid,1,1);//Schlagring
    GivePlayerWeapon(playerid,22,200);//9mm
    GivePlayerWeapon(playerid,30,300);//Ak47
    }
    }


  • Ich möchte doch bloss meinen Spawn ändern. ^^

  • den spawn änderst du indem du die koordinaten von addplayerclass änderst aber damit er spawnt ist es besser einen spieler eine variable mit gTeam oder anderen zu vergeben.

  • den spawn änderst du indem du die koordinaten von addplayerclass änderst aber damit er spawnt ist es besser einen spieler eine variable mit gTeam oder anderen zu vergeben.

    Bei AddplayerClass stehen doch schon längst die Koordinaten aber er spwant da nicht.

  • SetPlayerPos(playerid,1107.9464,-1796.3353,16.5938);


    Gehört, wenn ich mich nicht irre, in OnPlayerSpawn, nicht OnPlayerRequestClass. Weil da ist er ja noch nicht gespawned sondern sucht sich nurn Skin aus. Kann aber auch sein dass ich falsch liege :p


    Mein CS:GO Server: 62.75.168.39:27016


    Ich bin so hungrig, dass ich vor lauter Durst nicht weiß, was ich rauchen soll - so müde bin ich!
    Freedom is just another word for 'Nothing left to lose'

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen