Warum geht mein FIx befehl nicht ?

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
  • Warum geht mein FIx befehl nicht ? Hier mal der Code
    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if(newkeys == KEY_CTRL_BACK)
    {
    new playerState = GetPlayerState(playerid);
    if (playerState == PLAYER_STATE_PASSENGER || playerState == PLAYER_STATE_DRIVER)
    {
    SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
    GameTextForPlayer(playerid,"Vehicle Repariert",3000,1);
    }
    else
    {
    return 1;
    }
    }
    return 1;
    }

  • versuch mal so:


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if(newkeys == KEY_CTRL_BACK)
    {
    new playerState = GetPlayerState(playerid);
    if (playerState == PLAYER_STATE_PASSENGER || playerState == PLAYER_STATE_DRIVER)
    {
    RepairVehicle(vehicleid);
    GameTextForPlayer(playerid,"Vehicle Repariert",3000,1);
    }
    else
    {
    return 1;
    }
    }
    return 1;
    }

  • kannst du damit was anfangen


    if(strcmp(cmd, "/fixveh", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 7) { SendClientMessage(playerid, COLOR_GRAD1, " Geh in Paintspray du abuser!!!"); return 1; } if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, COLOR_GREY, "Vehicle repariert"); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s hat sein Vehicle repariert.", sendername, giveplayer); ABroadCast(0x00F5FFFF,string,1337); } } return 1; }

  • public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if(newkeys == KEY_CTRL_BACK)
    {
    new playerState = GetPlayerState(playerid);
    if (playerState == PLAYER_STATE_PASSENGER || playerState == PLAYER_STATE_DRIVER)
    {
    SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
    RepairVehicle(GetPlayerVehicleID(playerid));
    GameTextForPlayer(playerid,"Vehicle Repariert",3000,1);
    }
    else
    {
    return 1;
    }