Beiträge von Kasakow

    Ja natürlich aber mit GetPlayerVehicleID wird das nichts!


    Denn nur wenn du in einem Fahrzeug drinnen sitzt ist GetPlayerVehicleID sinnvoll.


    Ich schreibe dich mal per PN an!

    tobialvarez


    Mit GetPlayerVehicleID lässt du den die des Fahrzeuges auslesen wo du gerade herinnen sitzt, :thumbup: Ich wette wenn du den Befehl eingibst dann führt er dich zum 0 Punkt
    Deswegen musst du das ganze anders Struckturieren.
    Ist dies ein Selfmade oder GF ?
    Denn zeig mal wie du das Fahrzeug zuweist.

    @Slider


    API:http://pastebin.com/iXCKPFaG


    PHP Code:

    PHP
    require "SampQueryAPI.php";
    $Funktion = new Funktion();
    $host = $Funktion->GetServerStats("ServerIP", "user_server", $username);
    $port = $Funktion->GetServerStats("Port", "user_server", $username);
    $SampQueryAPI = new SampQueryAPI('$host','$port');


    Ich habe mal die '' weggemacht nun klappt es wieder:
    IP - Adresse: 37.4.93.178:7777
    Hostname: SA-MP 0.3 Server
    Players: 0/496
    (Das steht im panel)
    Nur sagen wir ich stelle den port in der db & server.cfg auf 1234:
    IP - Adresse: 37.4.93.178:1234
    Der Server ist aktuell offline.
    (Das steht im panel)

    if(dialogid == DIALOG_BANK_ABHEBEN){
    if(!response)return 1;
    if(!strval(inputtext))return ShowPlayerDialog(playerid,DIALOG_BANK_ABHEBEN,DIALOG_STYLE_INPUT,"Geld abheben","Gebe den Betrag an.","OK","Abbrechen");
    if(strval(inputtext)>sInfo[playerid][bankgeld])return ShowPlayerDialog(playerid,DIALOG_BANK_ABHEBEN,DIALOG_STYLE_INPUT,"Geld abheben","So viel geld hast du nicht","OK","Abbrechen");
    new string[128];
    format(string,128,"Abgehoben: %i$ Neuer Kontostand: %i$",strval(inputtext),sInfo[playerid][bankgeld] -= strval(inputtext)),SCM(playerid,CL_GELB,string);
    return sInfo[playerid][bankgeld] -= strval(inputtext);
    }

    SetVehicleVelocity ist z.B für einen Speedhack da, (ist nur ein beispiel)


    Ah, ich habe mir gerade mal was durchgelesen.


    DE:

    Zitat

    Diese Funktion hat keine Auswirkungen auf un-besetzte Fahrzeuge und hat keine Auswirkungen auf Züge


    EN:

    Zitat

    This function has no affect on un-occupied vehicles and does not affect trains


    //Closed muss mir was anderes einfallen lassen

    Guten Tag,


    Mein Name lautet CIBERKILLER.
    Und zwar bäuchte ich mal eure hilfe.
    Ich möchte das ein Zug, sich langsam nachvorne bewegt (flüssig) ohne einen NPC herinnen.
    Geplant war so so:
    @MoveTrain(playerid); @MoveTrain(playerid){
    switch(GetPVarInt(playerid, "Zugstatus")){
    case 0:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 1:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 2:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 3:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 4:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 5:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 6:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 7:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 8:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 9:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 10:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 11:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 12:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 13:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 14:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 15:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 16:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 17:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 18:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 19:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 20:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 21:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 22:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 23:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 24:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 25:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 26:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 27:SetVehicleVelocity(sInfo[playerid][sZugCar], 0.450000, 0.014314, 0.0090000),SetPVarInt(playerid, "Zugstatus", GetPVarInt(playerid, "Zugstatus") + 1);
    case 28:DestroyVehicle(sInfo[playerid][sZugCar]), KillTimer(pTimer[playerid][0]),SetPlayerPos(playerid, 816.8663, -1362.0260, -0.5078), SetPlayerFacingAngle(playerid, 320.6011);
    }
    return 1;
    }


    Doch aktuell bewegt er sich nicht oder ich sehe das nicht. (Timer wird ausgeführt)


    pTimer[playerid][0] = SetTimerEx("@MoveTrain", 100, true, "i", playerid);


    Mit freundlichen Grüßen,


    CIBERKILLER

    Ja, klar.
    So müsste das auch Funktionieren.


    Im Include
    NPC_OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    //...
    return 1;
    }


    Im Skript
    OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    NPC_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
    return 1;
    }

    Versuche das mal :thumbup: