Beiträge von Martinez

    Wenn ich /hostname test123 eingebe erscheint aber
    der hostname am browser als " ÿ "



    ocmd:hostname(playerid,params[])
    {
    new hostname[30], string[302];
    if(sscanf(params,"us",hostname))return SendClientMessage(playerid,ROT,"Benutzung: /hostname [text]");
    if(IstSpielerAdmin(playerid,6))
    {
    format(string, sizeof(string), "hostname %s", hostname);
    SendRconCommand(string);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Dein Adminlevel ist zu niedrig");
    return 1;
    }
    return 1;
    }


    MFG Martinez

    wie mach ich das if (listitem == 0) return


    mit


    new name[115];
    new pVehicle = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid,name,sizeof(name));
    SetVehiclePos(pVehicle,-2706.4104,217.1112,4);
    SetPlayerPos(playerid,-2706.4104,217.1112,4);
    PutPlayerInVehicle(playerid,pVehicle,0);
    format(name,sizeof(name),">>>> TELEPORT <<<< %s hat sich nach /arch teleportiert. (Wheel Arch Angels)",name);
    SendClientMessageToAll(0x00A3FFFF,name);

    if(dialogid==DIALOG_MENUTELE)
    {
    /* if(response)
    {*/
    if(listitem == 0)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_JUMPS,DIALOG_STYLE_LIST,"Jumps","Nichts","OK","Zurück");
    }
    else if(listitem == 1)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_FUN,DIALOG_STYLE_LIST,"Fun","Nichts","OK","Zurück");
    }
    else if(listitem == 2)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_STUNT,DIALOG_STYLE_LIST,"Stunts","/stunt - Stunt Airport","OK","Zurück");
    }
    else if(listitem == 3)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_DRIFT,DIALOG_STYLE_LIST,"Drifts","/drift","OK","Zurück");
    }
    else if(listitem == 4)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_DRAG,DIALOG_STYLE_LIST,"Drags","Nichts","OK","Zurück");
    }
    else if(listitem == 5)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_VEHICLE,DIALOG_STYLE_LIST,"Fahrzeuge & etc","/arch - Wheels Arch Angels\n/wang\n/low\n/trans\n/trans2","OK","Zurück");
    }
    else if(listitem == 6)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_ORTE,DIALOG_STYLE_LIST,"Orte","/ls - Los Santos LSPD\n/sf - San Firro Bahnhof","OK","Zurück");
    }
    else if(listitem == 7)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_MINISPIELE,DIALOG_STYLE_LIST,"Minispiele","/strauma","OK","Zurück");
    }
    else if(listitem == 8)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_SPEZIAL,DIALOG_STYLE_LIST,"Spezial","/strauma","OK","Zurück");
    }
    else if(listitem == 9)
    {
    if (!response) return ShowPlayerDialog(playerid,DIALOG_MENUTELE,DIALOG_STYLE_LIST,"*Teleports*","Jumps\nFun\nStunt\nDrifts\nDrags\nFahrzeuge & etc\nOrte\nMinispiele\nSpezial\nBasejumping","Ok","Abbruch");
    ShowPlayerDialog(playerid,DIALOG_BASEJUMPING,DIALOG_STYLE_LIST,"Basejumping","/strauma","OK","Zurück");
    //}
    }
    }
    else if(dialogid == DIALOG_JUMPS)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid,0xFF0000FF,"Dieses Teleport existiert nicht");
    }
    /* else if(listitem == 2)
    {

    }*/
    }
    }
    else if(dialogid == DIALOG_FUN)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid,0xFF0000FF,"Dieses Teleport existiert nicht");
    }
    }
    }
    else if(dialogid == DIALOG_STUNT)
    {
    if(response)
    {
    if(listitem == 0)
    {
    new name[115];
    new pVehicle = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid,name,sizeof(name));
    SetVehiclePos(pVehicle,375.8990,2536.6965,16.5639);
    SetPlayerPos(playerid,375.8990,2536.6965,16.5639);
    PutPlayerInVehicle(playerid,pVehicle,0);
    format(name,sizeof(name),">>>> TELEPORT <<<< %s hat sich nach /stunt teleportiert. (Stunt Airport)",name);
    SendClientMessageToAll(0x00A3FFFF,name);
    }
    }
    }
    else if(dialogid == DIALOG_DRIFT)
    {
    if(response)
    {
    if(listitem == 0)
    {
    new name[115];
    new pVehicle = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid,name,sizeof(name));
    SetVehiclePos(pVehicle,2326.8416,1393.2986,42.8203);
    SetPlayerPos(playerid,2326.8416,1393.2986,42.8203);
    PutPlayerInVehicle(playerid,pVehicle,0);
    format(name,sizeof(name),">>>> TELEPORT <<<< %s hat sich nach /drift teleportiert. (LV Parkhaus Drift)",name);
    SendClientMessageToAll(0x00A3FFFF,name);
    }
    }
    }
    else if(dialogid == DIALOG_DRAG)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid,0xFF0000FF,"Dieses Teleport existiert nicht");
    }
    }
    }
    else if(dialogid == DIALOG_VEHICLE)
    {
    if(response)
    {
    if(listitem == 0)
    {
    new name[115];
    new pVehicle = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid,name,sizeof(name));
    SetVehiclePos(pVehicle,-2706.4104,217.1112,4);
    SetPlayerPos(playerid,-2706.4104,217.1112,4);
    PutPlayerInVehicle(playerid,pVehicle,0);
    format(name,sizeof(name),">>>> TELEPORT <<<< %s hat sich nach /arch teleportiert. (Wheel Arch Angels)",name);
    SendClientMessageToAll(0x00A3FFFF,name);
    }
    }
    }
    else if(dialogid == DIALOG_ORTE)
    {
    if(response)
    {
    if(listitem == 0)
    {
    new name[115];
    new pVehicle = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid,name,sizeof(name));
    SetVehiclePos(pVehicle,1481.1954,-1740.2444,13);
    SetPlayerPos(playerid,1481.1954,-1740.2444,13);
    PutPlayerInVehicle(playerid,pVehicle,0);
    format(name,sizeof(name),">>>> TELEPORT <<<< %s hat sich nach /ls teleportiert. (Los Santos)",name);
    SendClientMessageToAll(0x00A3FFFF,name);
    }
    else if(listitem == 1)
    {
    new name[115];
    new pVehicle = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid,name,sizeof(name));
    SetVehiclePos(pVehicle,-1992.3933,145.0940,27.2577);
    SetPlayerPos(playerid,-1992.3933,145.0940,27.2577);
    PutPlayerInVehicle(playerid,pVehicle,0);
    format(name,sizeof(name),">>>> TELEPORT <<<< %s hat sich nach /sf teleportiert. (Los Santos)",name);
    SendClientMessageToAll(0x00A3FFFF,name);
    }
    }
    }

    Wie mach ich das man wieder zurück zum hauptmenü gehen kann,
    das Zurück button existiert ist aber ohne eine funktion eingebunden.



    ShowPlayerDialog(playerid,DIALOG_JUMPS,DIALOG_STYLE_LIST,"Jumps","Nichts","OK","Zurück");


    MFG Martinez

    Ich hab in mein Gamemode ein problem und etwa ist es wenn ich mein
    /torauf script rein tu sind fast alle untere befehle deaktiviert oder fehlerhaft.



    if (strcmp(cmd, "/torauf", true) == 0)
    {
    if(IsAMedic(playerid))
    {
    if(IsPlayerInRangeOfPoint(playerid,10,1141.59997559,-1288.50000000,15.30000019))
    {
    new string2[128];
    new sendernamee[MAX_PLAYER_NAME];
    SetTimer("torgate",9000, 0);
    SendClientMessage(playerid,0xFFD3FFFF,"Du hast das Tor geöffnet, schliesst sich in 7 sekunden.");
    MoveObject (tor[0],1141.59997559,-1288.50000000,9.30000019,2 );
    GetPlayerName(playerid, sendernamee, sizeof(sendernamee));
    format(string2, sizeof(string2), "* %s nimmt seine/ihre Fernbedienung und öffnet das Krankenhaus Tor.", sendernamee);
    ProxDetector(30.0, playerid, string2, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
    new y, m, d;
    new h,mi,s;
    getdate(y,m,d);
    gettime(h,mi,s);
    format(string2,sizeof(string2), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /torauf",d,m,y,h,mi,s,sendername);
    CommandLog(string);
    }
    else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
    if(IsPlayerInRangeOfPoint(playerid,10,1546.5278,-1626.9043,13.3828))
    {
    new string2[128];
    new sendernamee[MAX_PLAYER_NAME];
    SetTimer("torgate",9000, 0);
    SendClientMessage(playerid,0xFFD3FFFF,"Du hast das Tor geöffnet, schliesst sich in 7 sekunden.");
    MoveObject (tor[1],1547.19995117,-1627.30004883,9.19999981,2);
    GetPlayerName(playerid, sendernamee, sizeof(sendernamee));
    format(string2, sizeof(string2), "* %s nimmt seine/ihre Fernbedienung und öffnet das LSPD Tor.", sendernamee);
    ProxDetector(30.0, playerid, string2, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
    new y, m, d;
    new h,mi,s;
    getdate(y,m,d);
    gettime(h,mi,s);
    format(string2,sizeof(string2), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /torauf",d,m,y,h,mi,s,sendername);
    CommandLog(string);
    }
    return 1;
    }
    Könnt ihr mir da weiterhelfen?


    EDIT: Timer und Objecte sind drin es geht auch aber so wie z.b /duty funktioniert nicht mehr.


    MFG Martinez.

    Ich hab hier jetzt ein neues gemacht,
    sollte es so sein?


    dcmd_carcolor(playerid,params[]) {
    new
    vid=GetPlayerVehicleID(playerid);
    if(!vid) {
    return SendClientMessage(playerid,ROT,"Command nur in einem Fahrzeug möglich");
    }
    new
    carcolor1,
    carcolor2;
    if (sscanf(params, "dd", carcolor1,carcolor2)) {
    return SendClientMessage(playerid,ROT,"Benutzung: /carcolor [Farbe 1] [Farbe 2]"));
    }
    else {
    if(carcolor1 < 0 || carcolor1 > 126 || carcolor2 < 0 || carcolor2 >126) {
    SendClientMessage(playerid,ROT,"Ungueltige Farb ID");
    }
    else {
    ChangeVehicleColor(vid,carcolor1,carcolor2);
    SendClientMessage(playerid,GRÜN,"Du hast deine Fahrzeug umgefärbt: [Farbe 1:%d] [Farbe 2:%d]",carcolor1,carcolor2);
    }
    }
    }
    }
    return 1;
    }

    if(strcmp(cmdtext,"/carcolor",true)==0)
    {
    if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return
    SendClientMessage(playerid,ROT,"Du bist nicht fahrer eines Wagens");
    new veh;
    new color[2];
    veh = GetPlayerVehicleID(playerid);
    if(sscanf(params, "dd",color[0],color[1])) return
    SendClientMessage(playerid,ORANGE, "/changecolor [color1] [color2]");
    if(color[0] < 0 || color[0] > 126 || color[1] < 0 || color[1] > 126) return
    SendClientMessage(playerid,ROT, "Die Color-IDs müssen zwischen 0 und 126 sein!");
    ChangeVehicleColor(veh, color[0], color[1]);
    return 1;
    }

    Hallo,


    Ich hab oben denn Include sscanf2 und ganz unten ein stock von sscanf
    und der error von Befehl carcolor bleibt immer noch.

    Code
    C:\Users\***\Desktop\test\gamemodes\stuntserver.pwn(331) : error 017: undefined symbol "params"


    [pwn=331] if(sscanf(params, "dd",color[0],color[1])) return
    [/pwn]

    Hallo BlackLegend,


    Ich hab den Script jetzt mal angeguckt und in mein
    GameMode rein getan und die entsprechene Codes
    rein gemacht.


    Wenn ich den command /god an oder aus eintippe
    taucht im chat SERVER:Unknown Command.
    Code wird auch nicht bei if(!strcmp("an", param, true))und
    else if(!strcmp("aus", param, true)) benutzt.


    Der Code:
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);


    if(!strcmp("/god", cmdtext, true))
    {
    new param[256];
    param = strtok(cmdtext, idx);
    if(!strlen(param))
    {
    SendClientMessage(playerid,ROT,"Benutzung: /God[an|aus]");
    return 1;
    }
    if(!strcmp("an", param, true))
    {
    SendClientMessage(playerid,GRÜN,"Dein God Modus wurde Aktiviert.");
    SetPlayerHealth(playerid,99999999999999);
    // Code
    }
    else if(!strcmp("aus", param, true))
    {
    SendClientMessage(playerid,ROT,"Dein God Modus wurde Deaktiviert.");
    SetPlayerHealth(playerid,100);
    // Code
    }
    else
    {
    SendClientMessage(playerid,ROT,"Benutzung: /God[an|aus]");
    return 1;
    }


    }


    return 0;
    }

    Hallo,


    Ich hab ein Problem und ein Bug wenn ich ein NPC in mein GameMode rein tu.


    NPC Problem:
    Spieler Spawnt in LV beim ein Haus ganz nach oben und
    fährt nicht sein Bus das einglich beim BSN steht.
    root-->npcmodes-->Bus.pwn&amx ist drin. Zeilen:
    //////////////////////////////////////////////////
    #include <a_npc>
    main(){}
    #define RECORDING "Bus"
    // Record typ, 1 = in einen fahrzeug, 2 = zu fuß
    #define RECORDING_TYPE 1


    public OnRecordingPlaybackEnd()
    StartRecordingPlayback(RECORDING_TYPE, RECORDING);


    public OnNPCEnterVehicle(vehicleid, seatid)
    StartRecordingPlayback(RECORDING_TYPE, RECORDING);


    public OnNPCExitVehicle()
    StopRecordingPlayback();
    //////////////////////////////////////////////////
    root-->npcmodes-->recordings-->Bus.rec ist drin.
    root-->gamemodes-->gerrole.amx-->Alle Zeilen die für NPC Script hinzugefügt wurden:
    //////////////////////////////////////////////////
    new bus;


    stock SpielerName(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }


    //Unter
    "public OnPlayerRegister(playerid, password[])
    {
    if(IsPlayerConnected(playerid))
    {"


    if(IsPlayerNPC(playerid)) return 1;
    //Unter
    "public OnPlayerLogin(playerid,password[])
    {"
    if(IsPlayerNPC(playerid)) return 1;
    //Unter
    "public OnGameModeInit()
    {"
    ConnectNPC("Busfahrer","Bus");
    bus=AddStaticVehicle(437,1226.0709,-893.5596,43.1227,192.0233,151,151);
    //Unter
    "public OnPlayerSpawn(playerid)
    {"


    if(!strcmp(SpielerName(playerid),"Busfahrer",true))
    {
    PutPlayerInVehicle(playerid,bus,0);
    }



    Bug:
    SERVER MOTD Textdraw wird ersetzt gegen $0
    Zeilen:
    LoadMotd();
    LoadEvents();
    ChangeWeather();
    Textdraw2 = TextDrawCreate(0.000000,437.000000,"SERVER MOTD:");
    new versions[64];
    format(versions, sizeof(versions),"%s. Build %s",Motd, Version);
    Textdraw3 = TextDrawCreate(303.000000,437.000000,versions);
    TextDrawUseBox(Textdraw2,1);
    TextDrawBoxColor(Textdraw2,0x00000066);
    TextDrawTextSize(Textdraw2,700.000000,1500.000000);
    TextDrawAlignment(Textdraw2,1);
    TextDrawAlignment(Textdraw3,2);
    TextDrawBackgroundColor(Textdraw2,0x00000066);
    TextDrawBackgroundColor(Textdraw3,0x000000ff);
    TextDrawFont(Textdraw2,1);
    TextDrawLetterSize(Textdraw2,0.299999,1.000000);
    TextDrawFont(Textdraw3,2);
    TextDrawLetterSize(Textdraw3,0.399999,1.000000);
    TextDrawColor(Textdraw2,0x00ff00cc);
    TextDrawColor(Textdraw3,0xffffffff);
    TextDrawSetOutline(Textdraw2,1);
    TextDrawSetOutline(Textdraw3,1);
    TextDrawSetProportional(Textdraw2,1);
    TextDrawSetProportional(Textdraw3,1);
    TextDrawSetShadow(Textdraw2,1);
    TextDrawSetShadow(Textdraw3,1);


    Könnt ihr mir bitte helfen?

    #Edit
    Hab Problem behoben, aber die NPCs werden blockiert wegen server fullattack.


    Incoming connection: 127.0.0.1:56926
    [npc:join] tramsf has joined the server (0:127.0.0.1)
    Incoming connection: 127.0.0.1:56932
    Incoming connection: 127.0.0.1:56930
    Incoming connection: 127.0.0.1:56929
    Incoming connection: 127.0.0.1:56927
    Incoming connection: 127.0.0.1:56931
    Incoming connection: 127.0.0.1:56934
    Incoming connection: 127.0.0.1:56933
    Incoming connection: 127.0.0.1:56935
    Incoming connection: 127.0.0.1:56928
    [npc:join] L5B2 has joined the server (1:127.0.0.1)
    [npc:join] L5B1 has joined the server (2:127.0.0.1)
    [npc:join] L2B2 has joined the server (3:127.0.0.1)
    [npc:join] L1B2 has joined the server (4:127.0.0.1)
    [npc:join] L4B1 has joined the server (5:127.0.0.1)
    Incoming connection: 127.0.0.1:56936
    Blocking 127.0.0.1 due to a 'server full' attack (2)
    [npc:join] TutorialBot has joined the server (6:127.0.0.1)
    [npc:join] L6B1 has joined the server (7:127.0.0.1)
    [npc:part] tramsf has left the server (0:0)
    [npc:part] L1B2 has left the server (4:0)
    [npc:part] L4B1 has left the server (5:0)
    [npc:part] TutorialBot has left the server (6:0)
    [npc:part] L6B1 has left the server (7:0)
    [npc:part] L5B2 has left the server (1:0)
    [npc:part] L5B1 has left the server (2:0)
    [npc:part] L2B2 has left the server (3:0)