1 Fage [Aus dem Fahrzeug werfen]

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
  • Hi leute ich hab mal 1 kleine frage



    wie mache ich das wenn ich den cmd /ende eingebe das man dan aus dem Fahrzeug geworfen wird


    das wars eig schon danke schon mal



    MfG AS_MR_00

  • if(IsPlayerInVehicle(playerid) {
    RemovePlayerFromVehicle(playerid);
    }else{
    SendClientMessage(playerid, COLOR ,"Du bist in keinem Car");
    return 1;
    }

  • ich wollte dur das



    if(IsPlayerInVehicle(playerid)
    RemovePlayerFromVehicle(playerid);




    Nur da bekomm ich 1 error :


    C:\Dokumente und Einstellungen\Marco\Desktop\Server[Aktuell]\filterscripts\ladmin4v2.pwn(5110) : warning 202: number of arguments does not match definition
    C:\Dokumente und Einstellungen\Marco\Desktop\Server[Aktuell]\filterscripts\ladmin4v2.pwn(5111) : error 001: expected token: ")", but found "-identifier-"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.



    // Edit bei mir schuat das Ende so Aus :



    if(!strcmp(strget(cmdtext,0),"/ende"))
    {
    new ziel = strval(strget(cmdtext, 1));
    if(PlayerInfo[playerid][Level] == 3)
    {
    new autoa = GetPlayerVehicleID(playerid);
    if(IsPlayerInVehicle(ziel,autoa))
    {
    if(PlayerInfo[ziel][fahrstunde] == 1)
    {
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"Your driving lesson is finished.");
    if(IsPlayerInVehicle(playerid)
    RemovePlayerFromVehicle(playerid);
    format(string, sizeof(string), "Du hast die Fahrstunde von %s beendet",Zielname);
    SendClientMessage(playerid, Grau, string);
    PlayerInfo[ziel][fahrstunde] = 0;
    } else return SendClientMessage(playerid,red,"ERROR: You are not a driving instructor!");
    }
    }
    }

  • if(!strcmp(strget(cmdtext,0),"/ende"))
    {
    new ziel = strval(strget(cmdtext, 1));
    if(PlayerInfo[playerid][Level] == 3)
    {
    new autoa = GetPlayerVehicleID(playerid);
    if(IsPlayerInVehicle(ziel,autoa))
    {
    if(PlayerInfo[ziel][fahrstunde] == 1)
    {
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"Your driving lesson is finished.");
    RemovePlayerFromVehicle(ziel);
    format(string, sizeof(string), "Du hast die Fahrstunde von %s beendet",Zielname);
    SendClientMessage(playerid, Grau, string);
    PlayerInfo[ziel][fahrstunde] = 0;
    } else return SendClientMessage(playerid,red,"ERROR: You are not a driving instructor!");
    }
    }
    }

  • Thx funzt aber hab noch eine frage wie kann ich mach das man wem den führerschein weg nehmen kann das geben hab ich so :



    if(!strcmp(strget(cmdtext,0),"/lizenzgeben"))
    {
    new ziel = strval(strget(cmdtext, 1));
    if(PlayerInfo[playerid][Level] == 3)
    {
    if(strcmp(strget(cmdtext,2),"1",true) == 0)
    {
    PlayerInfo[ziel][autoschein] = 1;
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"You got the Drivinglicens for the Car.");
    format(string, sizeof(string), "Du hast %s einen Führerschein gegeben",Zielname);
    SendClientMessage(playerid, Grau, string);
    }
    else if(strcmp(strget(cmdtext,2),"2",true) == 0)
    {
    PlayerInfo[ziel][flugschein] = 1;
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"You got the Drivinglicens for the plane.");
    format(string, sizeof(string), "Du hast %s einen Flugschein gegeben",Zielname);
    SendClientMessage(playerid, Grau, string);
    }
    else if(strcmp(strget(cmdtext,2),"3",true) == 0)
    {
    PlayerInfo[ziel][bootschein] = 1;
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"You got the Drivinglicens for the Boat.");
    format(string, sizeof(string), "Du hast %s einen Bootsschein gegeben",Zielname);
    SendClientMessage(playerid, Grau, string);
    } else SendClientMessage(playerid,red,"ERROR: You are not a driving instructor!");
    }
    return 1;
    }



    Könntest mich in icq adden und mal kurz helfen weil das mit den saven da dan das weis ich auch nicht

  • if(!strcmp(strget(cmdtext,0),"/lizenzwegnehmen"))
    {
    new ziel = strval(strget(cmdtext, 1));
    if(PlayerInfo[playerid][Level] == 3)
    {
    if(strcmp(strget(cmdtext,2),"1",true) == 0)
    {
    PlayerInfo[ziel][autoschein] = 0;
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"Your drivinglicense for cars was taken by an admin.");
    format(string, sizeof(string), "Du hast %s den Führerschein weggenommen",Zielname);
    SendClientMessage(playerid, Grau, string);
    }
    else if(strcmp(strget(cmdtext,2),"2",true) == 0)
    {
    PlayerInfo[ziel][flugschein] = 0;
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"Your drivinglicense for plance was taken by an admin.");
    format(string, sizeof(string), "",Zielname);
    SendClientMessage(playerid, Grau, string);
    }
    else if(strcmp(strget(cmdtext,2),"3",true) == 0)
    {
    PlayerInfo[ziel][bootschein] = 0;
    new Zielname[MAX_PLAYER_NAME];
    GetPlayerName(ziel,Zielname,sizeof(Zielname));
    SendClientMessage(ziel,green,"Your drivinglicense for boots was taken by an admin.");
    format(string, sizeof(string), "Du hast %s den Führerschein weggenommen",Zielname);
    SendClientMessage(playerid, Grau, string);
    } else SendClientMessage(playerid,red,"ERROR: You are not a driving instructor!");
    }
    return 1;
    }


    Eine Frage hätte ich noch, du fragst oben ab, ob er admin ist und unten schreibste else wenn er kein Fahrlehrer ist ?(

  • ja weil ich die fraktionen in mein adminsystem gemacht habe aber es soll auch gesavt werden das mit lizenzeswegnehmen also wen man off geht und wieder on geht alles genau so ist wie es war




    //edit



    Noch eine frage


    ähm wie mach ich bei /jail das ich da keine minuten angeben muss sondern bei


    1 wanted 600 sek bei 2 800 sek bei 3 1000 sek bei 4 1200 sek bei 5 1400 sek bei 6 1800 sek bei 9 2000 sek bei 10 2400 sek


    ess soll automatisch also sie zeit angegeben werden bei wanteds


    es soll nicht mehr /jail [id] [ Min] [ Reason] heißen
    sondern /jail [id] nur noch




    Hier mein /Jail


    dcmd_jail(playerid,params[]) {
    if(PlayerInfo[playerid][LoggedIn] == 1) {
    if(PlayerInfo[playerid][Level] >= 1) {
    new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);
    if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /jail [playerid] [minutes] [reason]");
    new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
    player1 = strval(tmp);


    if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) ) {
    if(PlayerInfo[player1][Jailed] == 0) {
    GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
    new jtime = strval(tmp2);
    if(jtime == 0) jtime = 9999;


    PlayerInfo[player1][JailTime] = jtime*1000*60;
    SetTimerEx("JailPlayer",5000,0,"d",player1);
    SetTimerEx("Jail1",1000,0,"d",player1);
    PlayerInfo[player1][Jailed] = 1;


    if(jtime == 9999) {
    if(!strlen(params[strlen(tmp2)+1])) format(string,sizeof(string),"Administrator %s has jailed %s ",adminname, playername);
    else format(string,sizeof(string),"Officer %s has jailed %s [reason: %s]",adminname, playername, params[strlen(tmp)+1] );
    } else {
    if(!strlen(tmp3)) format(string,sizeof(string),"Administrator %s has jailed %s for %d minutes",adminname, playername, jtime);
    else format(string,sizeof(string),"Officer %s has jailed %s for %d minutes [reason: %s]",adminname, playername, jtime, params[strlen(tmp2)+strlen(tmp)+1] );
    }
    return SendClientMessageToAll(blue,string);
    } else return SendClientMessage(playerid, red, "Player is already in jail");
    } else return SendClientMessage(playerid, red, "Player is not connected or is the highest level admin");
    } else return SendClientMessage(playerid,red,"ERROR: You are not a Cop");
    } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
    }



    Hier mein /unjail


    dcmd_unjail(playerid,params[]) {
    if(PlayerInfo[playerid][LoggedIn] == 1) {
    if(PlayerInfo[playerid][Level] >= 1) {
    new tmp[256], Index; tmp = strtok(params,Index);
    if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /jail [playerid]");
    new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
    player1 = strval(tmp);


    if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) ) {
    if(PlayerInfo[player1][Jailed] == 1) {
    GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
    format(string,sizeof(string),"Officer %s has unjailed you",adminname); SendClientMessage(player1,blue,string);
    format(string,sizeof(string),"Officer %s has unjailed %s",adminname, playername);
    JailRelease(player1);
    return SendClientMessageToAll(blue,string);
    } else return SendClientMessage(playerid, red, "Player is not in jail");
    } else return SendClientMessage(playerid, red, "Player is not connected or is the highest level admin");
    } else return SendClientMessage(playerid,red,"ERROR: You are not a Cop");
    } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
    }

    Einmal editiert, zuletzt von AS_MR_00 ()