Beiträge von sLy

    Hey :P


    Ist es möglich , ein "System" zu erstellen , das die Waffen des Spielers erfasst und diese Waffen an den Spieler heftet , also mit AttachObjectToPlayer ?


    Beispiel:


    Er hat eine M4 , Deagle und Shotgun in der Hand , also ist auf seinem Rücken/Bein etc eine M4 , Deagle und ne Shotgun.


    Switcht er zur Deagle , verschwindet die Deagle vom seinen Rücken , so auch bei allen anderen Waffen !


    Ist sowas möglich , wenn ja , würde jemand das für mich machen ?
    Das mit den Waffen kann ich selber machen , also die Positionen für AttachObjectToPlayer

    Hey ^^


    Beim Payday läuft der Timer irgendwie nicht richtig !


    Er schwankt immer zwischen 3 und 10 Minuten !


    Laut dem Code sollte er aber jede 2 Minuten kommen !


    Hier der Code:



    forward pimer(playerid);


    pimerday[playerid] = SetTimerEx("pimer",60000,1,"i",playerid);


    public pimer(playerid)
    {
    pPlaytime[playerid]++; // ++ ist wie +1 also wird es alle 60000 milliskunden um 1 erhöht soll die Spielzeit sein
    if(pSincePayday[playerid] >= 2) // wenn Zeitseitpayday 60 oder über 6o ist wird das in der Klammer ausgelöst
    {
    new Spieler[64];
    format(Spieler,sizeof(Spieler),"Spieler/%s.txt",PlayerName(playerid));
    new levelbonus;
    //levelbonus=GetPlayerScore(playerid);
    // ZeitseitPayday wird wieder auf 0 gesetzt da er den Payday hatte.
    //GivePlayerMoney(playerid, 3000); // der ID "Playerid" werden 2000$ gegeben
    dini_IntSet(Spieler,"Levelpunkte",dini_Int(Spieler,"Levelpunkte")+1);
    new gehalt;
    if(GetPlayerFrakRang(playerid,0))
    {
    gehalt=2500;
    }
    if(GetPlayerFrakRang(playerid,1))
    {
    gehalt=4000;
    }
    if(GetPlayerFrakRang(playerid,2))
    {
    gehalt=5000;
    }
    if(GetPlayerFrakRang(playerid,3))
    {
    gehalt=6000;
    }
    if(GetPlayerFrakRang(playerid,4))
    {
    gehalt=9000;
    }
    if(GetPlayerFrakRang(playerid,5))
    {
    gehalt=12000;
    }
    if(dini_Int(Spieler,"Levelpunkte")>=dini_Int(Spieler,"Level"))
    {
    dini_IntSet(Spieler,"Levelpunkte",0);
    SetPlayerScore(playerid,dini_Int(Spieler,"Level")+1);
    new string[256];
    format(string,sizeof(string),"Du hast 0 von %i Levelpunkten!",GetPlayerScore(playerid));
    dini_IntSet(Spieler,"Level",GetPlayerScore(playerid));
    SendClientMessage(playerid,Orange,"~Payday~");
    SendClientMessage(playerid,Gelb,"Glückwunsch! Du bist ein Level aufgestiegen!");
    new string3[256];
    format(string3,sizeof(string3),"Du bist nun Level %i !",GetPlayerScore(playerid));
    SendClientMessage(playerid,Gelb,string3);
    SendClientMessage(playerid,Gelb,string);
    levelbonus=GetPlayerScore(playerid)*300;
    new bankkontostring[256];
    new levelbonusstring[256];
    new hartz4string[256];
    new gehaltstring[256];
    new bankkontostringneu[256];
    format(bankkontostring,sizeof(bankkontostring),"Alter Kontostand: %i",GetPVarInt(playerid,"Kontostand"));
    format(levelbonusstring,sizeof(levelbonusstring),"Levelbonus: %i",levelbonus);
    //format(hartz4string,sizeof(hartz4string),"Hartz IV: 500");
    format(gehaltstring,sizeof(gehaltstring),"Gehalt: %i",gehalt);
    SendClientMessage(playerid,Gelb,bankkontostring);
    SendClientMessage(playerid,Gelb,levelbonusstring);
    SendClientMessage(playerid,Gelb,"Hartz IV: 500");
    SendClientMessage(playerid,Gelb,gehaltstring);
    SetPVarInt(playerid,"Kontostand",GetPVarInt(playerid,"Kontostand")+levelbonus);
    SetPVarInt(playerid,"Kontostand",GetPVarInt(playerid,"Kontostand")+gehalt);
    if(dini_Int(Spieler,"Hartz4")>=1)
    {
    SetPVarInt(playerid,"Kontostand",GetPVarInt(playerid,"Kontostand")+500);
    }
    format(bankkontostringneu,sizeof(bankkontostringneu),"Neuer Kontostand: %i",GetPVarInt(playerid,"Kontostand"));
    SendClientMessage(playerid,Gelb,bankkontostringneu);
    pSincePayday[playerid] = 0;
    SpielerSpeichern(playerid);
    }
    else
    {
    new string[256];
    format(string,sizeof(string),"Du hast %i von %i Levelpunkten!",dini_Int(Spieler,"Levelpunkte"),GetPlayerScore(playerid));
    SendClientMessage(playerid,Orange,"~Payday~");
    SendClientMessage(playerid,Gelb,string);
    levelbonus=GetPlayerScore(playerid)*300;
    new bankkontostring[256];
    new levelbonusstring[256];
    new gehaltstring[256];
    new bankkontostringneu[256];
    format(bankkontostring,sizeof(bankkontostring),"Alter Kontostand: %i",GetPVarInt(playerid,"Kontostand"));
    format(levelbonusstring,sizeof(levelbonusstring),"Levelbonus: %i",levelbonus);
    format(gehaltstring,sizeof(gehaltstring),"Gehalt: %i",gehalt);
    SendClientMessage(playerid,Gelb,bankkontostring);
    SendClientMessage(playerid,Gelb,levelbonusstring);
    SendClientMessage(playerid,Gelb,gehaltstring);
    SetPVarInt(playerid,"Kontostand",GetPVarInt(playerid,"Kontostand")+levelbonus);
    SetPVarInt(playerid,"Kontostand",GetPVarInt(playerid,"Kontostand")+gehalt);
    format(bankkontostringneu,sizeof(bankkontostringneu),"Neuer Kontostand: %i",GetPVarInt(playerid,"Kontostand"));
    SendClientMessage(playerid,Gelb,bankkontostringneu);
    pSincePayday[playerid] = 0;
    SpielerSpeichern(playerid);
    }
    }
    else
    {
    pSincePayday[playerid]++; // ZEit seit Payday wird um 1 erhöht
    }
    return 1;
    }


    Beweis:


    Wenn du ein haus löscht ist es weg, was hast du gedacht? Wenn du etwas löscht dass es immernoch da ist?


    Also ist es permanent gelöscht ?


    Ich dachte es wird nur gelöscht , solange ich den Code drinhab , wenn ich ihn wieder rausnehme ist es wieder normal :o

    Hey !


    Ich wollte was testen mit dem SA-MP Map editor , undzwar habe ich ein Haus "gelöscht" , und nun ist es irgendwie ganz weg !


    Also ich habe schon die RemoveBuilding blabla rausgelöscht , aber das haus ist immernoch weg :O!


    Hab schon 3x n neues Script gemacht !



    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT


    #include <a_samp>
    #include <ocmd>


    new tor;


    main()
    {
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }


    public OnGameModeInit()
    {
    CreateVehicle(459,1530.00000000,-1502.69921875,13.61657810,0.00000000,24,24,0); //Berkley's RC Van
    CreateVehicle(459,1521.00000000,-1502.69921875,13.61657810,0.00000000,24,24,0); //Berkley's RC Van
    CreateVehicle(459,1510.40002441,-1487.09997559,13.61657810,181.50000000,24,24,0); //Berkley's RC Van
    CreateVehicle(459,1502.69995117,-1486.59997559,13.61657810,179.24963379,24,24,0); //Berkley's RC Van
    CreateVehicle(487,2074.00000000,2150.39990234,19.39999962,0.00000000,67,67,0); //Maverick
    CreateVehicle(413,2068.19995117,2172.50000000,11.00000000,269.75000000,67,67,0); //Pony
    CreateVehicle(560,2068.10009766,2178.30004883,10.66270161,269.74731445,67,67,0); //Sultan
    CreateVehicle(550,2068.00000000,2184.10009766,10.94114685,269.74731445,67,67,0); //Sunrise
    CreateVehicle(461,2094.80004883,2155.89990234,10.50000000,0.00000000,67,67,0); //PCJ-600
    CreateVehicle(461,2090.00000000,2155.89990234,10.50000000,0.00000000,67,67,0); //PCJ-600
    CreateVehicle(477,2083.30004883,2185.60009766,10.75697231,180.24993896,67,67,0); //ZR-350
    CreateObject(3475,1537.19995117,-1486.50000000,14.89999962,0.00000000,0.00000000,0.00000000); //object(vgsn_fncelec_pst) (1)
    CreateObject(3475,1537.19921875,-1492.50000000,14.89999962,0.00000000,0.00000000,0.00000000); //object(vgsn_fncelec_pst) (2)
    CreateObject(3475,1537.19921875,-1498.50000000,14.89999962,0.00000000,0.00000000,0.00000000); //object(vgsn_fncelec_pst) (3)
    CreateObject(3475,1537.19921875,-1504.00000000,14.89999962,0.00000000,0.00000000,0.00000000); //object(vgsn_fncelec_pst) (4)
    CreateObject(1232,1525.19995117,-1503.00000000,15.10000038,0.00000000,0.00000000,0.00000000); //object(streetlamp1) (1)
    CreateObject(1232,1506.59997559,-1487.19995117,15.10000038,0.00000000,0.00000000,0.00000000); //object(streetlamp1) (2)
    CreateObject(1215,1464.50000000,-1492.80004883,13.10000038,0.00000000,0.00000000,0.00000000); //object(bollardlight) (1)
    CreateObject(1215,1465.50000000,-1501.19995117,13.10000038,0.00000000,0.00000000,0.00000000); //object(bollardlight) (2)
    CreateObject(1319,1464.40002441,-1490.90002441,13.10000038,0.00000000,0.00000000,0.00000000); //object(ws_ref_bollard) (1)
    CreateObject(1319,1465.80004883,-1503.00000000,13.10000038,0.00000000,0.00000000,0.00000000); //object(ws_ref_bollard) (2)
    CreateObject(792,1468.30004883,-1493.19995117,12.89999962,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (1)
    CreateObject(792,1468.69995117,-1500.80004883,12.89999962,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (2)
    CreateObject(792,1534.80004883,-1485.30004883,12.80000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (3)
    CreateObject(792,1527.80004883,-1485.40002441,12.80000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (4)
    CreateObject(1364,1531.30004883,-1484.19995117,13.30000019,0.00000000,0.00000000,0.00000000); //object(cj_bush_prop) (1)
    CreateObject(1221,1510.19995117,-1503.59997559,13.00000000,0.00000000,0.00000000,0.00000000); //object(cardboardbox4) (1)
    CreateObject(1221,1511.40002441,-1503.50000000,13.00000000,0.00000000,0.00000000,0.00000000); //object(cardboardbox4) (2)
    CreateObject(1221,1511.09997559,-1503.59997559,13.89999962,0.00000000,0.00000000,0.00000000); //object(cardboardbox4) (3)
    CreateObject(1334,1496.50000000,-1488.09997559,13.69999981,0.00000000,0.00000000,269.25000000); //object(binnt04_la) (1)
    CreateObject(1300,1517.80004883,-1483.90002441,12.89999962,0.00000000,0.00000000,0.00000000); //object(bin1) (1)
    CreateObject(2780,1522.50000000,-1485.69995117,4.69999981,0.00000000,0.00000000,0.00000000); //object(cj_smoke_mach) (1)
    CreateObject(3065,1522.50000000,-1485.30004883,12.69999981,0.00000000,0.00000000,0.00000000); //object(bball_col) (1)
    tor=CreateObject(2933,2102.30004883,2175.89990234,11.39999962,0.00000000,0.50000000,90.25000000); //object(pol_comp_gate) (1)
    CreateObject(3475,2102.19995117,2183.39990234,9.69999981,0.00000000,0.00000000,181.50000000); //object(vgsn_fncelec_pst) (5)
    CreateObject(1215,2107.80004883,2171.50000000,10.39999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (3)
    CreateObject(1215,2107.50000000,2184.89990234,10.39999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (4)
    CreateObject(8613,2070.60009766,2160.69995117,14.19999981,0.00000000,0.00000000,89.50000000); //object(vgssstairs03_lvs) (2)
    CreateObject(1656,2066.90014648,2164.19995117,17.70000076,0.00000000,0.00000000,269.25000000); //object(esc_step) (1)
    CreateObject(1656,2066.60009766,2164.20288086,17.89999962,0.00000000,0.00000000,269.25000000); //object(esc_step) (2)
    CreateObject(1656,2066.40014648,2164.20703125,18.10000038,0.00000000,0.00000000,269.24743652); //object(esc_step) (3)
    CreateObject(1656,2066.19995117,2164.20996094,18.29999924,0.00000000,0.00000000,269.24743652); //object(esc_step) (4)
    CreateObject(3928,2073.80004883,2151.00000000,18.20000076,0.00000000,0.00000000,269.75000000); //object(helipad) (1)
    CreateObject(2011,2088.69995117,2188.39990234,9.80000019,0.00000000,0.00000000,0.00000000); //object(nu_plant2_ofc) (1)
    CreateObject(2011,2091.50000000,2188.50000000,9.80000019,0.00000000,0.00000000,0.00000000); //object(nu_plant2_ofc) (2)
    CreateObject(1290,2084.50000000,2171.19995117,15.80000019,0.00000000,0.00000000,270.50000000); //object(lamppost2) (1)
    CreateObject(1656,2065.80004883,2164.19995117,18.29999924,0.00000000,0.00000000,269.24743652); //object(esc_step) (5)
    CreateObject(792,2099.60009766,2169.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (5)
    CreateObject(792,2068.50000000,2168.10009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (6)
    CreateObject(1224,2064.39990234,2156.00000000,10.39999962,0.00000000,0.00000000,0.00000000); //object(woodenbox) (1)
    CreateObject(1221,2064.00000000,2154.19995117,10.19999981,0.00000000,0.00000000,0.00000000); //object(cardboardbox4) (4)
    CreateObject(1264,2066.19995117,2153.60009766,10.30000019,0.00000000,0.00000000,0.00000000); //object(blackbag1) (1)
    CreateObject(1264,2065.30004883,2154.00000000,10.19999981,0.00000000,8.00000000,302.50000000); //object(blackbag1) (2)
    CreateObject(1344,2067.69995117,2153.89990234,10.60000038,0.00000000,0.00000000,180.00000000); //object(cj_dumpster2) (1)
    CreateObject(1357,2065.60009766,2155.10009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(cj_fruitcrate3) (1)
    CreateObject(1549,2084.50000000,2170.69995117,9.80000019,0.00000000,0.00000000,0.00000000); //object(cj_ashtray_b) (1)
    SetGameModeText("Blank Script");
    UsePlayerPedAnims();
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    SetPlayerPos(playerid,2101.30004883,2175.89990234,11.39999962);
    SetPlayerSkin(playerid,233);
    GivePlayerWeapon(playerid,24,11111);
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }


    ocmd:nacht(playerid,params[])
    {
    SetWorldTime(24);
    return 1;
    }


    ocmd:tag(playerid,params[])
    {
    SetWorldTime(14);
    return 1;
    }


    ocmd:auf(playerid,params[])
    {
    MoveObject(tor,2102.30004883,2175.89990234,11.39999962-10,2.0);
    return 1;
    }


    ocmd:zu(playerid,params[])
    {
    MoveObject(tor,2102.30004883,2175.89990234,11.39999962,2.0);
    return 1;
    }


    Naja einfacher ist es doch wenn man nicht 48.20000076 Schreib sondern 5.20000076-6 oder nicht?


    Kann man auch machen , ich machs aber so , dass ich 2 Tore mappe , also 1x das Offene , 1x das geschlossene , dann hab ich die genauen Koordinaten/Rotationen des offenes tores ^^

    Hier nochmal ein Beispiel meines terrortores (Es geht nach unten auf , also einfach bei MoveObject die koordinaten ändern :D)



    new terrortor;


    OnGameModeInit
    terrortor=CreateObject(980,-507.20001221,2592.19995117,55.20000076,0.00000000,0.00000000,270.00000000); //object(airportgate) (2)


    ocmd:oeffnen(playerid,params[])
    {
    MoveObject(terrortor, -507.20001221,2592.19995117,48.20000076, 4.5);
    return 1;
    }

    Hey :\


    Irgendwie werden die Fraktionen bei meinem /makeleader befehl nicht gespeichert :\


    Sprich ich mach /makeleader xSpeciiaL 1 (1=Terror) , und ich kann keine Terror befehle benutzen ! Es geht nur wenn ich in der Datei die Fraktion auf 1 setze ! :o


    ocmd:makeleader(playerid,params[])
    {
    new pID;
    new frak;
    new Spieler[64];
    format(Spieler,sizeof(Spieler),"Spieler/%s.txt",PlayerName(pID));
    if(IsPlayerAnAdmin(playerid,3))
    {
    if(sscanf(params,"ui",pID,frak))return SendClientMessage(playerid,Rot,"Fehler: /makeleader [ID/Name] [FraktionsID] \nFraktionsID's: 1 - Terror | 2 - San News | 3 Terror");
    {
    //SendClientMessage(playerid,Rot,"FraktionsID's: 1 - Terror | 2 - San News | 3 Terror");
    if(pID == INVALID_PLAYER_ID)return SendClientMessage(playerid,Rot,"Der Spieler exisitert nicht !");
    {
    if(dini_Int(Spieler,"Fraktion")!=0)return SendClientMessage(playerid,Rot,"Der Spieler ist bereits in einer Fraktion.");
    {
    if(dini_Int(Spieler,"Fraktion")==frak && dini_Int(Spieler,"Fraktionsrang")>=4)return SendClientMessage(playerid,Rot,"Der Spieler ist bereits Leader der Fraktion!");
    {
    dini_IntSet(Spieler,"Fraktionsrang",5);
    dini_IntSet(Spieler,"Fraktion",frak);
    SetPVarInt(pID,"Fraktionsrang",5);
    SetPVarInt(pID,"Fraktion",frak);
    if(dini_Int(Spieler,"Fraktion")==1)
    {
    ShowPlayerDialog(playerid,Dialog_skinauswahlTerror,DIALOG_STYLE_LIST,"Skinauswahl","Skin #1\nSkin #2","Auswählen","Anschauen");
    }
    if(dini_Int(Spieler,"Fraktion")==2)
    {
    ShowPlayerDialog(playerid,Dialog_skinauswahlTerror,DIALOG_STYLE_LIST,"Skinauswahl","Skin #1\nSkin #2\nSkin #3\nSkin #4\nSkin #5\nSkin #6","Auswählen","Anschauen");
    }
    new string[256];
    new string2[256];
    format(string,sizeof(string),"Du hast %s zu dem Leader der Fraktion %i gemacht !",PlayerName(pID),frak);
    format(string2,sizeof(string2),"Du wurdest von %s zu dem Leader der Fraktion %i gemacht !",PlayerName(playerid),frak);
    SendClientMessage(playerid,Gruen,string);
    SendClientMessage(pID,Gruen,string2);
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du bist nicht befugt diesen Befehl zu benutzen.");
    return 1;
    }
    return 1;
    }

    Ja will das ja mit allen Waffen net nur mit Sniper :D Also auch mit Faust usw, da ich sehen will wie viel er verliert :D



    Ist doch ? ^^