Beiträge von AndreasMieke

    Am besten du erstellst gTeams und setzt die dann ins CMD ein


    //Probiers mal nur mit AddStaticVehicle - Da müssten die nach dem kaputt gehen respawnen

    Wie geht das mit den gTeams, kann mir wer ein TUtorial Link geben?


    EDIT: Hab es jetzt mit AddStaticVehicle probiert, aber sie Respawnen noch immer nicht.

    Ne ich meine das nur bestimmte Leute z.B. /armyau benutzen können (öffnet das Tor zur Army Base) und die sollen in einer Datei stehen (z.B. army.cfg)
    Und ich habe die Fahrzeuge mit AddStaticVehicleEx und einer Respawn Zeit von -1 gemacht, aber wenn die kaputt gehen Respwnen sie nicht!

    Hallo, erstmal!


    Ich bin Anfänger im Scripten, deswegen brauche ich euer Hilfe.


    Also 1.: Wie kann man machen das die Cars respawnen, wenn sie kaputt gehen.
    2.: Wie kann man Pickups machen?
    Und 3.: Wie kann man machen das bestimmte Befehle nur Leute benutzen können, welche in einer bestimmten Datei stehen?


    Ich hoffe ihr könnt mir Helfen!
    Mfg Andreas

    Hi, alle zusammen ich habe soeben mein erstes Filterscript fertig gekriegt. Es funktioniert auch, nur das Problem ist das die Funktionen des GM nicht gehen (z.B. /login) und die Daten alles User die On kommen werden ressettet! Kan mir einer Helfen?


    #define FILTERSCRIPT
    #include <a_samp>
    new gate1;new gate2;
    public OnFilterScriptInit(){//print("\n--------------------------------------");//print(" Maut LS-LV by AndreasMieke");//print("--------------------------------------\n");//---{AddStaticVehicleEx(564,1726.53234863,471.41577148,29.28118706,340.00000000,-1,-1,15); //RC TigerAddStaticVehicleEx(430,1630.56262207,572.03192139,0.00000000,92.00000000,-1,-1,15); //PredatorCreateObject(1323,1714.85986328,395.83709717,32.31619644,0.00000000,0.00000000,246.00000000); //object(ws_roadwarning_03) (1)CreateObject(1323,1685.58679199,328.90005493,31.51441956,0.00000000,0.00000000,245.99487305); //object(ws_roadwarning_03) (2)CreateObject(1323,1695.04479980,397.40875244,31.84191513,0.00000000,0.00000000,245.99487305); //object(ws_roadwarning_03) (3)CreateObject(1323,1672.46093750,329.22744751,31.52825546,0.00000000,0.00000000,245.99487305); //object(ws_roadwarning_03) (5)CreateObject(1323,1732.71337891,565.86914062,27.17860222,0.00000000,0.00000000,48.00000000); //object(ws_roadwarning_03) (7)CreateObject(1323,1751.92724609,561.90924072,26.98889542,0.00000000,0.00000000,79.99926758); //object(ws_roadwarning_03) (8)CreateObject(1323,1776.74877930,649.89221191,19.93625450,0.00000000,0.00000000,79.99694824); //object(ws_roadwarning_03) (9)CreateObject(1323,1761.26989746,670.54687500,19.19248581,0.00000000,0.00000000,79.99694824); //object(ws_roadwarning_03) (10)CreateObject(10832,1722.39660645,466.56399536,31.25511169,0.00000000,0.00000000,160.00000000); //object(gatehouse2_sfse) (1)CreateObject(10832,1711.47033691,455.76815796,31.58781433,0.00000000,0.00000000,340.00000000); //object(gatehouse2_sfse) (2)gate1 = CreateObject(2990,1702.22521973,454.26232910,33.75374603,0.00000000,0.00000000,160.00000000); //object(wongs_gate) (1)gate2 = CreateObject(2990,1731.74414062,468.26660156,33.23192596,0.00000000,0.00000000,339.99407959); //object(wongs_gate) (2)CreateObject(3578,1714.30163574,464.36822510,30.13277817,0.00000000,0.00000000,38.00000000); //object(dockbarr1_la) (15)CreateObject(3578,1720.01965332,458.55422974,30.28239059,0.00000000,0.00000000,35.99816895); //object(dockbarr1_la) (17)CreateObject(3578,1698.51416016,456.49755859,30.39088058,0.00000000,0.00000000,71.99816895); //object(dockbarr1_la) (18)CreateObject(3578,1699.73083496,466.29571533,30.31162643,0.00000000,0.00000000,93.99340820); //object(dockbarr1_la) (19)CreateObject(3578,1704.90686035,448.04937744,30.69293976,0.00000000,0.00000000,69.98803711); //object(dockbarr1_la) (20)CreateObject(3578,1693.45837402,448.08688354,30.57693863,0.00000000,0.00000000,45.98291016); //object(dockbarr1_la) (21)CreateObject(3578,1735.77478027,466.60629272,29.85779953,0.00000000,0.00000000,69.97778320); //object(dockbarr1_la) (22)CreateObject(3578,1734.22229004,457.05685425,30.14007187,0.00000000,0.00000000,91.97741699); //object(dockbarr1_la) (23)CreateObject(3578,1740.77819824,475.14666748,29.56614304,0.00000000,0.00000000,47.97204590); //object(dockbarr1_la) (24)CreateObject(3578,1728.93774414,473.62451172,29.97421646,0.00000000,0.00000000,69.97180176); //object(dockbarr1_la) (25)CreateObject(3578,1714.07934570,449.97137451,30.59106445,0.00000000,0.00000000,72.00000000); //object(dockbarr1_la) (1)CreateObject(3578,1710.79016113,440.62707520,30.72470856,0.00000000,0.00000000,69.99890137); //object(dockbarr1_la) (2)CreateObject(3578,1707.23266602,430.86560059,30.83481598,0.00000000,0.00000000,69.99389648); //object(dockbarr1_la) (3)CreateObject(3578,1703.67041016,421.08410645,30.93297958,0.00000000,0.00000000,69.99389648); //object(dockbarr1_la) (4)CreateObject(3578,1700.13525391,411.48886108,30.92255402,0.00000000,0.00000000,69.99389648); //object(dockbarr1_la) (5)CreateObject(3578,1720.04296875,472.41619873,30.01535797,0.00000000,0.00000000,70.00000000); //object(dockbarr1_la) (6)CreateObject(3578,1723.52819824,481.96908569,29.55004501,0.00000000,0.00000000,69.99938965); //object(dockbarr1_la) (7)CreateObject(3578,1727.01135254,491.80749512,29.40837097,0.00000000,0.00000000,249.99935913); //object(dockbarr1_la) (8)
    /*Objects converted: 30Vehicles converted: 2Vehicle models found: 2----------------------In the time this conversion took to finish the US national debt has risen by about $1,025.25!*/
    //---//return 1;}}
    public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp("/mautlvls", cmdtext, true, 10) == 0){ MoveObject(gate1, 1702.22521973,454.26232910, 22.75374603, 1); GivePlayerMoney(playerid, -100); SetTimer("Resetgate1",10000,0);return 1;}if (strcmp("/mautlslv", cmdtext, true, 10) == 0){ MoveObject(gate2, 1731.74414062,468.26660156, 22.23192596, 1); GivePlayerMoney(playerid, -100); SetTimer("Resetgate2",10000,0);return 1;}return 1;}
    forward Resetgate1();forward Resetgate2();
    public Resetgate1(){MoveObject(gate1, 1702.22521973,454.26232910, 33.75374603, 1);}
    public Resetgate2(){MoveObject(gate2, 1731.74414062,468.26660156, 33.23192596, 1);}
    //public OnFilterScriptExit()//{//return 1;//}

    Falls es was nützt hier die 2 /register bzw /login Codes und die daraus erzeigten Dateien!


    Also hier der Code aus dem FilterScript:


    Code
    //========================[REGISTRATION SYSTEM v2.1]============================dcmd_register(playerid,params[]) { if(!strlen(params)) { new string[256]; format(string,256,"Syntax Error: \"/REGISTER \" [Password must be %d+].",Config[MinimumPasswordLength]); return SendClientMessage(playerid,red,string); } new index = 0,Password[256],string[256],PlayerFile[256]; Password = strtok(params,index); PlayerFile = GetPlayerFile(playerid); new filename[256]; new pname[256]; GetPlayerName(playerid, pname, 24); format(filename, 256, "/xadmin/Users/%s.inc", udb_encode(pname)); //This is the name check-up if(dini_Int(filename, "Registered") == 1)return SendClientMessage(playerid, red, "Error: That playername is already registered. Try another one"); if(!(Variables[playerid][Registered] && Variables[playerid][LoggedIn])) { if(strlen(Password) >= Config[MinimumPasswordLength]) { format(string,sizeof(string),"You have registered your account with the password \"%s\" and automatically been logged in.",Password); SetUserInt(playerid,"Password",udb_hash(Password)); SetUserInt(playerid,"Registered",1); SetUserInt(playerid,"LoggedIn",1); Variables[playerid][LoggedIn] = true, Variables[playerid][Registered] = true; SendClientMessage(playerid,blue,string); SetUserInt(playerid,"Level", 0); GivePlayerMoney(playerid, 10000); new tmp3[100]; GetPlayerIp(playerid,tmp3,100); SetUserString(playerid,"IP",tmp3); OnPlayerRegister(playerid); } else SendClientMessage(playerid,red,"Syntax Error: \"/REGISTER \" [Password must be 3+]."); } else SendClientMessage(playerid,red,"Error: Make sure that you have not registered and are logged out."); return 1;}dcmd_login(playerid,params[]) { if(!strlen(params)) { SendClientMessage(playerid,red,"Syntax Error: \"/LOGIN \"."); return 1; }new index = 0;new Password[256], string[256]; Password = strtok(params,index);new PlayerFile[256]; PlayerFile = GetPlayerFile(playerid); if(Variables[playerid][Registered] && !Variables[playerid][LoggedIn]) { if(udb_hash(Password) == dini_Int(PlayerFile,"Password")) { switch(Variables[playerid][Level]) { case 0: format(string,sizeof(string),"You have logged into your account. [Status Level: Member]"); default: format(string,sizeof(string),"You have logged into your account. [Status Level: Administrator Lv. %d]",Variables[playerid][Level]);} SendClientMessage(playerid,blue,string); SetUserInt(playerid,"LoggedIn",1); Variables[playerid][LoggedIn] = true; new tmp3[100]; GetPlayerIp(playerid,tmp3,100); SetUserString(playerid,"IP",tmp3); OnPlayerLogin(playerid,true); } else { OnPlayerLogin(playerid,false); SendClientMessage(playerid,red,"Syntax Error: \"/LOGIN \"."); }} else SendClientMessage(playerid,red,"Error: You must be registered to log in; if you have make sure you haven't already logged in.");return 1;}dcmd_logout(playerid,params[]) {#pragma unused paramsnew PlayerFile[256]; PlayerFile = GetPlayerFile(playerid); if(Variables[playerid][Registered] && Variables[playerid][LoggedIn]) {SendClientMessage(playerid,blue,"You have logged out of your account. You may log back in later by typing \"/LOGIN \"."); SetUserInt(playerid,"LoggedIn",0); Variables[playerid][LoggedIn] = false; OnPlayerLogout(playerid);} else SendClientMessage(playerid,red,"Error: You must be registered and logged into your account first.");return 1;}


    Hier die daraus erzeugte User Datei (inc):


    Code
    IP=10.0.0.1Registered=1Level=10Cash=0Kills=0Deaths=0Password=************Wired=0WiredWarnings=0Jailed=0LoggedIn=1



    Und hier die Register und login aus dem GameMode:


    Code
    if(strcmp(cmd, "/login", true) == 0) {if(PlayerInfo[playerid][logged] == 1) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du bit bereits eingeloggt"); return 1;} tmp = strtok(cmdtext, idx); GetPlayerName(playerid, playername, sizeof(playername)); if(!strlen(tmp)) {SendClientMessage(playerid, COLOR_LIGHTBLUE, "BENUTZE: /login [password]");}else {new fname[256]; format(fname,sizeof(fname),P_FILE,udb_encode(playername));if (fexist(fname)) { LoadPlayer(playerid); if(PlayerInfo[playerid][pass] == udb_hash(tmp)) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid,PlayerInfo[playerid][pcash]); PlayerInfo[playerid][logged] = 1;format(string, sizeof(string), "Du biat nun als %s eingeloggt.", playername);SendClientMessage(playerid, COLOR_YELLOW, string);}else { SendClientMessage(playerid, COLOR_BRIGHTRED, "Falsches Passwort!");}}else { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du bist noch nicht registriert, mache /register [password] um deinen Benutzernamen zu Registerien.");}}
    return 1;}
    if(strcmp(cmd, "/register", true) == 0) { tmp = strtok(cmdtext, idx); GetPlayerName(playerid, playername, sizeof(playername)); if(20 < strlen(tmp) || strlen(tmp) < 5) {SendClientMessage(playerid, COLOR_YELLOW, "Passwort muss mindestens 5 und maximal 20 Zeichen lang sein.");return 1;} if(!strlen(tmp))SendClientMessage(playerid, COLOR_YELLOW, "BENUTZE: /register [password]");
    else { new fname[256]; format(fname,sizeof(fname),P_FILE,udb_encode(playername));if (!fexist(fname)) { PlayerInfo[playerid][pcash] = GetPlayerMoney(playerid); PlayerInfo[playerid][pass] = udb_hash(tmp); CreatePlayer(playerid);format(string, sizeof(string), "--- %s (id: %d) wurde generiert. Dein Passwort: %s.", playername, playerid, tmp);printf(string);format(string, sizeof(string), "Bnutzerkonto %s generiert! Du kannst dich nun mit deiesem Passwort eingloggen: %s.", playername, tmp);SendClientMessage(playerid, COLOR_YELLOW, string);}else {format(string, sizeof(string), "%s ist schon registriert auf diesem Server, logge dich mit /login [password] ein.", playername);SendClientMessage(playerid, COLOR_BRIGHTRED, string);}}
    return 1;}


    Und die Userdatei (taxi):


    Code
    AndreasMieke,61,1,*************,0,18782998,2,1,6

    Hallo ich habe mir heute den Xtreme Admin heruntergeladen, und ich habe so ein RL Gamemode aus dem SAMP Forum, jetzt wenn ich /register bzw. /login eingebe logge ich mich zwar beim Admin Filterscript ein jedoch nicht im Mode selbst, wie kann ich nun machen, das man auch im GameMode eingeloggt wird??


    Danke schonmal für die Hilfe!



    Bin ziemlich neu im Bereich Scripten also wenn ihr eine Lösung habt, erklärt mir sie danke!

    Tschuldigung, Bitte vieschieben!


    Also ich blicke nicht durch!


    Also hier der Code aus dem FilterScript:


    dcmd_register(playerid,params[]) { if(!strlen(params)) { new string[256]; format(string,256,"Syntax Error: \"/REGISTER <PASSWORD>\" [Password must be %d+].",Config[MinimumPasswordLength]); return SendClientMessage(playerid,red,string); } new index = 0,Password[256],string[256],PlayerFile[256]; Password = strtok(params,index); PlayerFile = GetPlayerFile(playerid); new filename[256]; new pname[256]; GetPlayerName(playerid, pname, 24); format(filename, 256, "/xadmin/Users/%s.inc", udb_encode(pname)); //This is the name check-up if(dini_Int(filename, "Registered") == 1)return SendClientMessage(playerid, red, "Error: That playername is already registered. Try another one"); if(!(Variables[playerid][Registered] && Variables[playerid][LoggedIn])) { if(strlen(Password) >= Config[MinimumPasswordLength]) { format(string,sizeof(string),"You have registered your account with the password \"%s\" and automatically been logged in.",Password); SetUserInt(playerid,"Password",udb_hash(Password)); SetUserInt(playerid,"Registered",1); SetUserInt(playerid,"LoggedIn",1); Variables[playerid][LoggedIn] = true, Variables[playerid][Registered] = true; SendClientMessage(playerid,blue,string); SetUserInt(playerid,"Level", 0); GivePlayerMoney(playerid, 10000); new tmp3[100]; GetPlayerIp(playerid,tmp3,100); SetUserString(playerid,"IP",tmp3); OnPlayerRegister(playerid); } else SendClientMessage(playerid,red,"Syntax Error: \"/REGISTER <PASSWORD>\" [Password must be 3+]."); } else SendClientMessage(playerid,red,"Error: Make sure that you have not registered and are logged out."); return 1;}dcmd_login(playerid,params[]) { if(!strlen(params)) { SendClientMessage(playerid,red,"Syntax Error: \"/LOGIN <PASSWORD>\"."); return 1; }new index = 0;new Password[256], string[256]; Password = strtok(params,index);new PlayerFile[256]; PlayerFile = GetPlayerFile(playerid); if(Variables[playerid][Registered] && !Variables[playerid][LoggedIn]) { if(udb_hash(Password) == dini_Int(PlayerFile,"Password")) { switch(Variables[playerid][Level]) { case 0: format(string,sizeof(string),"You have logged into your account. [Status Level: Member]"); default: format(string,sizeof(string),"You have logged into your account. [Status Level: Administrator Lv. %d]",Variables[playerid][Level]);} SendClientMessage(playerid,blue,string); SetUserInt(playerid,"LoggedIn",1); Variables[playerid][LoggedIn] = true; new tmp3[100]; GetPlayerIp(playerid,tmp3,100); SetUserString(playerid,"IP",tmp3); OnPlayerLogin(playerid,true); } else { OnPlayerLogin(playerid,false); SendClientMessage(playerid,red,"Syntax Error: \"/LOGIN <PASSWORD>\"."); }} else SendClientMessage(playerid,red,"Error: You must be registered to log in; if you have make sure you haven't already logged in.");return 1;}dcmd_logout(playerid,params[]) {#pragma unused paramsnew PlayerFile[256]; PlayerFile = GetPlayerFile(playerid); if(Variables[playerid][Registered] && Variables[playerid][LoggedIn]) {SendClientMessage(playerid,blue,"You have logged out of your account. You may log back in later by typing \"/LOGIN <PASSWORD>\"."); SetUserInt(playerid,"LoggedIn",0); Variables[playerid][LoggedIn] = false; OnPlayerLogout(playerid);} else SendClientMessage(playerid,red,"Error: You must be registered and logged into your account first.");return 1;}


    Hier die daraus erzeugte User Datei (inc):


    IP=10.0.0.1Registered=1Level=10Cash=0Kills=0Deaths=0Password=118620561Wired=0WiredWarnings=0Jailed=0LoggedIn=1



    Und hier die Register und login aus dem GameMode:


    if(strcmp(cmd, "/login", true) == 0) {if(PlayerInfo[playerid][logged] == 1) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du bit bereits eingeloggt"); return 1;} tmp = strtok(cmdtext, idx); GetPlayerName(playerid, playername, sizeof(playername)); if(!strlen(tmp)) {SendClientMessage(playerid, COLOR_LIGHTBLUE, "BENUTZE: /login [password]");}else {new fname[256]; format(fname,sizeof(fname),P_FILE,udb_encode(playername));if (fexist(fname)) { LoadPlayer(playerid); if(PlayerInfo[playerid][pass] == udb_hash(tmp)) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid,PlayerInfo[playerid][pcash]); PlayerInfo[playerid][logged] = 1;format(string, sizeof(string), "Du biat nun als %s eingeloggt.", playername);SendClientMessage(playerid, COLOR_YELLOW, string);}else { SendClientMessage(playerid, COLOR_BRIGHTRED, "Falsches Passwort!");}}else { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du bist noch nicht registriert, mache /register [password] um deinen Benutzernamen zu Registerien.");}}
    return 1;}
    if(strcmp(cmd, "/register", true) == 0) { tmp = strtok(cmdtext, idx); GetPlayerName(playerid, playername, sizeof(playername)); if(20 < strlen(tmp) || strlen(tmp) < 5) {SendClientMessage(playerid, COLOR_YELLOW, "Passwort muss mindestens 5 und maximal 20 Zeichen lang sein.");return 1;} if(!strlen(tmp))SendClientMessage(playerid, COLOR_YELLOW, "BENUTZE: /register [password]");
    else { new fname[256]; format(fname,sizeof(fname),P_FILE,udb_encode(playername));if (!fexist(fname)) { PlayerInfo[playerid][pcash] = GetPlayerMoney(playerid); PlayerInfo[playerid][pass] = udb_hash(tmp); CreatePlayer(playerid);format(string, sizeof(string), "--- %s (id: %d) wurde generiert. Dein Passwort: %s.", playername, playerid, tmp);printf(string);format(string, sizeof(string), "Bnutzerkonto %s generiert! Du kannst dich nun mit deiesem Passwort eingloggen: %s.", playername, tmp);SendClientMessage(playerid, COLOR_YELLOW, string);}else {format(string, sizeof(string), "%s ist schon registriert auf diesem Server, logge dich mit /login [password] ein.", playername);SendClientMessage(playerid, COLOR_BRIGHTRED, string);}}
    return 1;}


    Und die Userdatei (taxi):


    AndreasMieke,0,0,118620561,99999999,0,2,0,0

    Hallo ich habe mir heute den Xtreme Admin heruntergeladen, und ich habe so ein RL Gamemode aus dem SAMP Forum, jetzt wenn ich /register bzw. /login eingebe logge ich mich zwar beim Admin Filterscript ein jedoch nicht im Mode selbst, wie kann ich nun machen, das man auch im GameMode eingeloggt wird??


    Danke schonmal für die Hilfe!