Beiträge von SAB0h

    Das radio spielt leider nichts ab


    ocmd:radio(playerid,params[])
    {
    if(IsPlayerConnected(playerid))
    {
    ShowPlayerDialog(playerid, DIALOG_RADIO,DIALOG_STYLE_LIST, "Radio System", "JamFM.\nHardbase.FM\nRadio Aus", "Weiter", "Abbrechen");
    }
    return 1;
    }
    ocmd:radioaus(playerid,params[])
    {
    StopAudioStreamForPlayer(playerid);
    SendClientMessage(playerid,GREEN,"Radio ausgeschaltet!");
    return 1;
    }
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    switch(dialogid)
    {
    case DIALOG_REGISTER:
    {
    if(response)
    {
    if(strlen(inputtext) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Register","Das angegebene Passwort war zu Kurtz...\nBitte Registrier dich jetzt mit einem Passwort:","Register","Abbrechen");
    return 1;
    }
    else
    {
    CreateAccount(playerid, inputtext);
    SetPVarInt(playerid,"Eingeloggt",1);
    SpawnPlayer(playerid);
    return 1;
    }
    }
    else
    {
    Kick(playerid);
    }
    }
    case DIALOG_LOGIN:
    {
    if(response)
    {
    if(strlen(inputtext) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Das Angegebene Passwort war Falsch.\nBitte log dich jetzt mit dem richtigen Passwort ein:","Login","Abbrechen");
    return 1;
    }
    else
    {
    new SpielerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, SpielerName, MAX_PLAYER_NAME);
    if(!strcmp(inputtext, mysql_ReturnPasswort(SpielerName), true))
    {
    SetPVarInt(playerid,"Eingeloggt",1);
    LoadPlayer(playerid);
    SpawnPlayer(playerid);
    return 1;
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das war das Falsche Passwort.\nBitte log dich jetzt mit dem richtigen Passwort ein:","Login","Abbrechen");
    return 1;
    }
    }
    }
    else
    {
    Kick(playerid);
    }
    if(dialogid == DIALOG_RADIO)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Technobase.FM!");
    PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "JAM FM!");
    PlayAudioStreamForPlayer(playerid, "http://www.jam.fm/streams/jam-nmr-mp3.pls");
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Radio Aus!");
    StopAudioStreamForPlayer(playerid);
    }
    return 1;
    }
    }


    }
    }
    return 1;
    }


    wenn der spieler /defuse macht soll der Timer "bombe" gefreetz werden & Wenn der Spieler bei /defuse die range verlässt oder stirb soll der timer wieder weiter laufen & der Timer der bombedefuse gekillt werden.



    ocmd:defuse(playerid,params[])
    {
    if(gTeam[playerid] == TEAM_BLUE) return SendClientMessage(playerid,ROT,"Anti , nutze /legebombe!");
    if(IsPlayerInRangeOfPoint(playerid,7,6233.4854,-2170.1738,5.7506)) return SendClientMessage(playerid,ROT,"Du bist nicht an der Bombe!");
    {
    SetTimer("bombedefuse",20000,false);
    }
    return 1;
    }



    ocmd:legebombe(playerid,params[])
    {

    if(gTeam[playerid] == TEAM_RED) return SendClientMessage(playerid,ROT,"Du bist kein Terrorist , nutze /defuse!");
    if(IsPlayerInRangeOfPoint(playerid,7,6233.4854,-2170.1738,5.7506)) return SendClientMessage(playerid,ROT,"Du bist nicht an der Bombe!");
    {
    timerbombe = SetTimer("bombe",40000, false);
    return 1;
    }
    }
    public bombedefuse()
    {
    KillTimer(timerbombe);
    return 1;
    }





    public bombe()
    {
    switch(CurrentMap)
    {
    case 0:
    {


    }
    case 1:
    {



    }
    case 2:
    {



    }
    case 3:
    {



    }
    }
    return 1;
    }

    Spieler bekommt hier keine Waffe -.-



    if(dialogid == Waffenmenu)
    {
    if(response)
    {
    if(listitem == 0) // Pack 1
    {
    GivePlayerWeapon(playerid,22,100);


    }
    if(listitem == 1) // // Pack 2
    {
    GivePlayerWeapon(playerid,24,30);



    }
    if(listitem == 2) // Pack 3
    {
    GivePlayerWeapon(playerid,24,50);


    }
    if(listitem == 3) // // Pack 4
    {
    GivePlayerWeapon(playerid,30,50);


    }
    return 1;



    }
    }

    R_1[playerid] = TextDrawCreate(498.000000, 100.000000, " ");
    Das Playerid wird mir als Fehler angezeigt , das es undefiniert ist.



    new Text:R_1[MAX_PLAYERS];

    Wie könnte ich das einstellen das die Map nach case 3 von case 0 beginnt ?
    switch(CurrentMap)
    {
    case 0:
    {


    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,GREEN,"____________________________________________");
    SendClientMessage(playerid,WHITE,"- Karte : Wüste -");
    SendClientMessage(playerid,WHITE,"- happy fragging ! -");
    SendClientMessage(playerid,GREEN,"____________________________________________");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SetPlayerInterior(playerid,0);
    if(gTeam[playerid] == TEAM_BLUE) {
    SetPlayerPos(playerid,6286.1719,-2129.5879,12.6453);
    SetPlayerFacingAngle(playerid,314.8662);


    }
    if(gTeam[playerid] == TEAM_RED) {

    SetPlayerPos(playerid,6212.8721,-2189.0254,5.4562);
    SetPlayerFacingAngle(playerid,177.7062);
    SetPlayerInterior(playerid,0);


    //Wüste


    }
    }
    case 1:
    {
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,GREEN,"____________________________________________");
    SendClientMessage(playerid,WHITE,"- Karte : Dschungel -");
    SendClientMessage(playerid,WHITE,"- happy fragging ! -");
    SendClientMessage(playerid,GREEN,"____________________________________________");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    //DSCHUNGEL;
    SetPlayerInterior(playerid,0);
    if(gTeam[playerid] == TEAM_BLUE) {
    SetPlayerPos(playerid,2874.7771,-3061.0977,379.8411);
    SetPlayerFacingAngle(playerid,228.1154);
    SetPlayerInterior(playerid,0);


    }
    if(gTeam[playerid] == TEAM_RED) {
    SetPlayerPos(playerid,2875.2122,-2981.9343,376.3135);
    SetPlayerFacingAngle(playerid,15.4068);
    SetPlayerInterior(playerid,0);


    }
    }


    case 2:
    {
    //de_dust1


    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,GREEN,"____________________________________________");
    SendClientMessage(playerid,WHITE,"- Karte : De_Dust1 -");
    SendClientMessage(playerid,WHITE,"- happy fragging ! -");
    SendClientMessage(playerid,GREEN,"____________________________________________");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SendClientMessage(playerid,WHITE,"");
    SetPlayerInterior(playerid,0);
    if(gTeam[playerid] == TEAM_BLUE) {
    SetPlayerPos(playerid,1756.6603,-4740.8545,756.3553);
    SetPlayerFacingAngle(playerid,69.1259);
    SetPlayerInterior(playerid,0);


    }
    if(gTeam[playerid] == TEAM_RED) {
    SetPlayerPos(playerid,1770.3132,-4941.1060,753.9554);
    SetPlayerFacingAngle(playerid,242.8826);
    SetPlayerInterior(playerid,0);


    }
    }
    }
    return 1;
    }

    onplayercommand ? dann muss der Spieler ein Command eingeben um das eingezeigt zu bekommen ?!
    & Internet hat dir doch die vorlage gegeben



    //onplayerdeath


    Kills[killerid] += 1;
    Kills[playerid] = 0;
    killstreak[playerid] = 0;
    new string[120],name[MAX_PLAYER_NAME];
    GetPlayerName(killerid,name, sizeof(name));
    if(Kills[killerid] == 3) //Killerid < Der der den Spieler gekillt hat...
    {

    format(string,sizeof(string),"%s hat mit 3Kills ein Killing Spree!(+30hp/+1500$) ",name);
    killstreak[killerid] = 1;
    SendClientMessageToAll(0xFFA000FF,string);
    }

    SetPVarInt(killerid, "forspreeKills", GetPVarInt(killerid, "forspreeKills") +1);
    Wenn der Spieler(<- also Killerid) jemande gekillt hat füge bei forspreeKills für killerid 1 hinzu.
    & bei 3Kills bekommt er ne Nachricht das durch den Stock , den dieser Fragt diese Kills ab.


    EDIT : Playerid ist der , der gestorben ist & killerid der jemand gekillt hat.

    Onplayerconnect:
    SetPVarInt(playerid,"forspreeKills",0);


    [pwn]onplayerdeath:
    SetPVarInt(killerid, "forspreeKills", GetPVarInt(killerid, "forspreeKills") +1);
    SetPVarInt(playerid,"forspreeKills",0);
    new string[120],name[MAX_PLAYER_NAME];
    GetPlayerName(killerid,name, sizeof(name));
    if(havekills(killerid,3))
    {
    format(string,sizeof(string),"%s hat mit 3Kills ein Killing Spree!(+30hp/+1500$) ",name);
    SendClientMessageToAll(0xFFA000FF,string);
    }
    else
    {
    if(havekills(killerid,6))
    {
    format(string,sizeof(string),"%s dominiert mit 6 Kills!(+50hp/+3000$) ",name);
    SendClientMessageToAll(0xFFA000FF,string);
    }
    }
    return 1;
    }


    stock havekills(playerid,anzahl)
    {
    if(GetPVarInt(playerid,"forspreeKills")==anzahl)return 1;
    return 0;
    }

    Nabend , ich bräuche etwas hilfe meinen Server auf eine Mysql datenbank zu verknüpfen . Wer nett wenn mir einer per Skype+Teamviewer helfen könnte.