Beiträge von Simple

    #include <a_samp>
    #include <dini>


    new bsneingang;
    new bsnausgang;
    new bsn247eingang;
    new bsn247ausgang;
    new posteingang;
    new postausgang;
    new sapdeingang;
    new sapdausgang;
    new skinshopeingang;
    new skinshopausgang;
    new alhambraeingang;
    new alhambraausgang;
    new lapd247eingang;
    new lapd247ausgang;
    new lsbankeingang;
    new lsbankausgang;
    new kripoeingang;
    new kripoausgang;


    #define DIALOG_REGISTER 1
    #define DIALOG LOGIN 2


    #if defined FILTERSCRIPT




    #define ORANGE 0xFC9000FF











    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


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


    #endif


    public OnGameModeInit()
    {
    //Eingänge/Ausgänge
    bsneingang=CreatePickup(1559,1,1199.2704,-918.1425,43.1231);
    bsnausgang=CreatePickup(1559,1,362.9111,-75.2052,1001.507;
    bsn247eingang=CreatePickup(1559,1,1315.4843,-897.6848,39.5781);
    bsn247ausgang=CreatePickup(1559,1,-27.3671,-58.2653,1003.5469);
    posteingang=CreatePickup(1559,1,1239.2797,-952.2557,42.6660);
    postausgang=CreatePickup(1559,1,834.6639,7.4210,1004.1870);
    sapdeingang=CreatePickup(1559,1,1555.5018,-1675.6277,16.1953);
    sapdausgang=CreatePickup(1559,1,246.7560,62.3229,1003.6406);
    skinshopeingang=CreatePickup(1559,1,1419.1698,-1623.8104,13.5469);
    skinshopausgang=CreatePickup(1559,1,207.6740,-111.2642,1005.132;
    alhambraeingang=CreatePickup(1559,1,1836.8007,-1682.4725,13.332;
    alhambraausgang=CreatePickup(1559,1,493.4083,-24.8910,1000.6719);
    lapd247eingang=CreatePickup(1559,1,1352.3970,-1759.2524,13.507;
    lapd247ausgang=CreatePickup(1559,1,-27.3208,-31.7606,1003.5573);
    lsbankeingang=CreatePickup(1559,1,1467.3336,-1009.9205,26.843;
    lsbankausgang=CreatePickup(1559,1,390.7694,173.7866,1008.382;
    kripoeingang=CreatePickup(1559,1,-1605.5590,710.2749,13.8672);
    kripoausgang=CreatePickup(1559,1,246.4032,107.2997,1003.218;
    DisableInteriorEnterExits();
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0,1128.8928,-1492.3511,22.7690,359.9767,0,0,0,0,0,0); // position
    AddPlayerClass(2,1128.8928,-1492.3511,22.7690,359.9767,0,0,0,0,0,0); // position
    //NoobSpawnFahrräder
    AddStaticVehicle(481,1126.4116,-1471.7574,15.2845,357.6840,65,9); // noobspawn fahrrad
    AddStaticVehicle(481,1131.5289,-1472.0122,15.2927,357.4651,12,9); // noobspawn fahrrad2
    AddStaticVehicle(560,1128.9893,-1462.7653,15.4934,0.1242,21,1); // testnoobsultan




    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,1128.8928,-1492.3511,22.7690);
    SetPlayerFacingAngle(playerid,0.9167);
    SetPlayerCameraPos(playerid,1128.8386,-1488.9790,22.7690);
    SetPlayerCameraLookAt(playerid,1128.8928,-1492.3511,22.7690);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    SendClientMessage(playerid,0xFF0000FF,"Du hast noch keinen Account bitte Registriere dich");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib hier dein gewünschtes Passwort ein","Register","Abbrechen");


    return 1;
    }


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


    public OnPlayerSpawn(playerid)
    {


    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)
    {
    if(pickupid==bsneingang)
    {
    SetPlayerPos(playerid,365.4054,-73.6908,1001.507;
    SetPlayerInterior(playerid,10);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen im Burgershot North");
    }
    if(pickupid==bsnausgang)
    {
    SetPlayerPos(playerid,1199.7866,-921.0943,43.1047);
    SetPlayerFacingAngle(playerid,190.6055);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast den Burgershot North verlassen");
    }
    if(pickupid==bsn247eingang)
    {
    SetPlayerPos(playerid,-26.691598,-55.714897,1003.546875);
    SetPlayerInterior(playerid,6);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen im 24/7 Shop");
    }
    if(pickupid==bsn247ausgang)
    {
    SetPlayerPos(playerid,1315.6488,-901.3452,39.5781);
    SetPlayerFacingAngle(playerid,182.054;
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast den 24/7 Shop verlassen");
    }
    if(pickupid==posteingang)
    {
    SetPlayerPos(playerid,831.9349,7.1960,1004.1797);
    SetPlayerInterior(playerid,3);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen in der Los Santos Post Filliale");
    }
    if(pickupid==postausgang)
    {
    SetPlayerPos(playerid,1239.0342,-948.0449,42.6867);
    SetPlayerFacingAngle(playerid,5.5365);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast die Los Santos Post Filliale verlassen");
    }
    if(pickupid==sapdeingang)
    {
    SetPlayerPos(playerid,246.8827,64.9224,1003.6406);
    SetPlayerInterior(playerid,6);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen im Los Santos Polizei Revier");
    }
    if(pickupid==sapdausgang)
    {
    SetPlayerPos(playerid,1552.4202,-1675.6880,16.1953);
    SetPlayerFacingAngle(playerid,88.928;
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast das Los Santos Polizei Revier verlassen");
    }
    if(pickupid==skinshopeingang)
    {
    SetPlayerPos(playerid,207.737991,-109.019996,1005.132812);
    SetPlayerInterior(playerid,15);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen im Skinshop");
    }
    if(pickupid==skinshopausgang)
    {
    SetPlayerPos(playerid,1423.5804,-1623.8768,13.5469);
    SetPlayerFacingAngle(playerid,269.2222);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast den Skinshop verlassen");
    }
    if(pickupid==alhambraeingang)
    {
    SetPlayerPos(playerid,493.4081,-22.6653,1000.6797);
    SetPlayerFacingAngle(playerid,0.1873);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,17);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen im Alhambra Club");
    }
    if(pickupid==alhambraausgang)
    {
    SetPlayerPos(playerid,1832.4530,-1682.4686,13.5145);
    SetPlayerFacingAngle(playerid,91.2683);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast den Alhambra Club verlassen");
    }
    if(pickupid==lapd247eingang)
    {
    SetPlayerPos(playerid,-27.5002,-28.9983,1003.5573);
    SetPlayerFacingAngle(playerid,357.4953);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,4);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen im 24/7 Shop");
    }
    if(pickupid==lapd247ausgang)
    {
    SetPlayerPos(playerid,1352.3434,-1756.5320,13.507;
    SetPlayerFacingAngle(playerid,5.5431);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast den 24/7 Shop verlassen");
    }
    if(pickupid==lsbankeingang)
    {
    SetPlayerPos(playerid,385.6371,173.8344,1008.382;
    SetPlayerFacingAngle(playerid,91.3399);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen in der Los Santos Bank");
    }
    if(pickupid==lsbankausgang)
    {
    SetPlayerPos(playerid,1467.0659,-1013.4706,26.843;
    SetPlayerFacingAngle(playerid,181.0536);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast die Los Santos Bank verlassen");
    }
    if(pickupid==kripoeingang)
    {
    SetPlayerPos(playerid,246.3643,109.7788,1003.218;
    SetPlayerFacingAngle(playerid,2.7356);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,10);
    SendClientMessage(playerid,0xFC9000FF,"Willkommen im San Andreas Kriminalpolizei Revier");
    }
    if(pickupid==kripoausgang)
    {
    SetPlayerPos(playerid,-1605.6417,712.5386,13.8714);
    SetPlayerFacingAngle(playerid,4.0167);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,0xFC9000FF,"Du hast das San Andreas Kriminal Polizei Revier verlassen");
    }
    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[])
    {
    if(dialogid==DIALOG_REGISTER)
    {
    if(response==0)
    {
    SendClientMessage(playerid,0xFF0000FF,"Du wurdest Gekickt da du dich nicht Registriert hast.");
    Kick(playerid);
    return 1;
    }
    if(response==1)
    {
    if(!strlen(inputtext)) // HIER WAR EIN FEHLER!!, eine klammer vergessen
    {
    SendClientMessage(playerid,0xFF0000FF,"Das Passwort war zu kurz.");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib hier dein gewünschtes Passwort ein","Register","Abbrechen");
    return 1;
    }
    else


    Register(playerid,inputtext);
    return 1;
    }
    }
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }
    stock Register(playerid,key[])
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME]; // HIER WAR EIN FEHLER, eine falsche klammer benutzt
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_Create(Spielerdatei);
    dini_Set(Spielerdatei,"Passwort",key);
    SendClientMessage(playerid,0x00FF00FF,"Du hast dich Registriert");
    return 1;
    }

    Du musst ja die Funktion AendAdminMessage schon erstellen^^
    Die gibts icht so bei PWN dabei.


    stock SendAdminMessage(color,msg[])
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(Spieler[i][admin] >= 1) //füg deine adminanfrage ein
    SendClientMessage(i, color, msg);
    }
    }


    Das kommt nach ganz unten ins Script einfach ;)


    edit: fehler ausbessern

    Du musst dir eine Webspace mieten/kostenlos holen und da dann per FTP Sachen draufladen, halt in dein beliebiges Verzeichnis, so wie du es haben willst.
    Geh mal auf funpic.de und versuch dich da mal an soetwas. Ist alles kostenlos.

    Zitat aus wiki.sa-mp.com


    Format character Data type Example
    d Integer Money
    i Integer Money
    c Character A single letter
    u User ID or name Player
    s String Any length of text
    h Hex number Colour
    x Hex number Colour
    f Float Co-ordinate
    z Optional string A reason e.g. Ban Reason, only optional at the end of a format string

    " warning 219: local variable "string" shadows a variable at a preceding level" sagt nichts anderes aus, als das die Variable bzw der String "string" bereits anders irgendwo definiert ist. Nenne sie mal string1 oder string2 oder soetwas

    Nein, wie Eric schon sagte, kannst aber ihn hier machen:
    new test[5];


    Bsp zur Anwendung:


    test[0] = AddStaticVehicle(bla);
    test[1] = AddStaticVehicle(bla);
    test[2] = AddStaticVehicle(bla);
    test[3] = AddStaticVehicle(bla);
    ...


    Dann ist das die ID von den jeweiligen.



    Aso Ja mach einfach eine Schleife:


    for(new i=0;i<MAX_FIRE;i++)
    {
    if(FireHealth[i] == 0)
    usw


    edit: failer
    edit2: ant

    new Ballas[32];



    Ballas[0]=AddStaticVehicle(deine prarameter also farbe, x,y,z usw);
    ........
    //bis ........
    Ballas[0]=AddStaticVehicle(deine prarameter also farbe, x,y,z usw);



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new i=0; i<sizeof(LSPD); i++)
    {
    if(GetPlayerVehicleID(playerid)==LSPD[i])
    {
    if(GetPVarInt(playerid,"Fraktion")!=1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Dieses Fahrzeug gehört einer fraktion.");
    }
    }
    if(GetPlayerVehicleID(playerid)==Ballas[i])
    {
    if(GetPVarInt(playerid,"Fraktion")!=2) die zwei ist die fraktionsid von ballas(also habe jz mal 2 genommen, musst du anpassen)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Dieses Fahrzeug gehört einer fraktion.");
    }
    }
    }
    }
    return 1;
    }

    ocmd:ooc(playerid,params[])
    {
    new sText[128];
    if(sscanf(params, "s",sText))
    {
    return SendClientMessage(playerid,rot,"Benutze: /ooc [text]");
    }
    if(!IsPlayerConnected(playerid))
    {
    return SendClientMessage(playerid,rot,"Du bist nicht eingeloggt!");
    }
    if(Spieler[playerid][admin]>0)
    {
    new Player[MAX_PLAYER_NAME],string[255];
    GetPlayerName(playerid,Player,sizeof(Player));
    format(string,sizeof(string),"Admin %s: %s",Player,sText);
    SendClientMessageToAll(gelb,string);
    return 1;
    }
    if(Spieler[playerid][admin]<1)
    {
    new Player1[MAX_PLAYER_NAME],string1[255];
    GetPlayerName(playerid,Player1,sizeof(Player1));
    format(string1,sizeof(string1),"Spieler %s: %s",Player1,sText);
    SendClientMessageToAll(weiß,string1);
    return 1;
    }
    return 1;
    }


    Bitteschön


    //edit: bekomme das mim quelltext anzeigen nicht hin