Beiträge von DJ Deagle

    Dann blinkt das aber so komisch :o
    So hab ich es, dann blinkt das aber immer wieder :o


    Weapon = GetPlayerWeapon(playerid);
    if(Weapon == 0) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], -1); format(str,sizeof str,"Faust",GetPlayerAmmo(playerid));}//Fist
    else if(Weapon == 14) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 325); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Flowers
    else if(Weapon == 15) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 326); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Cane
    else if(Weapon == 1) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 331); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Brass Knuckels
    else if(Weapon == 2) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 333); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Golf Club
    else if(Weapon == 3) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 334); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Nite Stick
    else if(Weapon == 4) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 335); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Combat Knife
    else if(Weapon == 5) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 336); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Baseball Bat
    else if(Weapon == 6) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 337); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Shovel
    else if(Weapon == 7) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 338); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Pool Cue
    else if(Weapon == 8) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 339); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Katana
    else if(Weapon == 9) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 341); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Chainsaw
    else if(Weapon == 16) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 342); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Frag Grenade
    else if(Weapon == 17) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 343); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Tear Gas Grenade
    else if(Weapon == 18) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 344); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Molotov Cocktail
    else if(Weapon == 22) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 346); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Colt 45
    else if(Weapon == 23) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 347); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Silenced Pistol
    else if(Weapon == 24) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 348); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Desert Eagle
    else if(Weapon == 25) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 349); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Shotgun
    else if(Weapon == 26) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 350); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Sawn-off Shutgun
    else if(Weapon == 27) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 351); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Combat Shotgu (SPAS 12)
    else if(Weapon == 28) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 352); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Micro Uzi
    else if(Weapon == 29) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 353); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//MP5
    else if(Weapon == 30) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 355); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//AK47
    else if(Weapon == 31) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 356); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//M4A1
    else if(Weapon == 33) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 357); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Country Rifle
    else if(Weapon == 34) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 358); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Sniper Rifle
    else if(Weapon == 35) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 359); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Rocket Launcher
    else if(Weapon == 36) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 360); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Heat Seeking Rocket Launcher
    else if(Weapon == 37) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 361); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Flamethrower
    else if(Weapon == 38) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 362); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Minigun
    else if(Weapon == 39) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 363); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Satchel Charges
    else if(Weapon == 40) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 364); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Detonator
    else if(Weapon == 41) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 365); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Spray Paint Can
    else if(Weapon == 42) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 366); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Fire Extinguisher
    else if(Weapon == 43) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 367); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Camera
    else if(Weapon == 32) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 372); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//TEC-9
    PlayerTextDrawShow(playerid, igInfo3[playerid]);

    Sieht schon besser aus :D


    Achso, wenn 8 Spieler online sind, sollen 3 "Random" sein ich hatte mich zu unverständlich ausgedrückt :o
    Hier mal ein Array, wo steht wie viele Spieler online sein müssen, und wie viele dann Random werden:
    new Random[][] = {
    {2,1},
    {4,2},
    {6,2},
    {8,3},
    {10,4},
    {12,5},
    {14,6},
    {16,8},
    {18,9},
    {20,10},
    {22,11},
    {24,12},
    {26,13},
    {28,14},
    {30,15},
    {32,16},
    {34,17},
    {36,18},
    {38,19},
    {40,20}
    //Und so weiter
    };
    Also das ab 16 Spieler die Hälfte "Random" wird :D

    Naja, bei deinem Code versteh ich beim ersten hingucken nur Bahnhof o.o


    format(str,sizeof str,"Rolle: Traitor");
    PlayerTextDrawSetString(tt, igInfo0[tt], str);
    SendClientMessage(tt,COLOR_LIGHTBLUE,"Du bist ein Traitor!");
    if(tt > 1){ SendClientMessage(tt,COLOR_LIGHTBLUE,"Du musst mit deinen Teamkameraden alle Innocents töten um zu gewinnen!"); } else { SendClientMessage(tt,COLOR_LIGHTBLUE,"Du hast keine Teamkameraden!"); }
    SendClientMessage(tt,COLOR_LIGHTBLUE,"Viel Glück!");
    Das muss nun an alle "Random-Spieler" gesendet werden. TT ist dabei ein Random spieler.
    Wie? Ist schon spät O:


    /e Oder sag mir einfach wer die Random Spieler sind (Variablen da, tmp2 oder so)

    Danke schonmal :)


    Sollten allerdings 6 Spieler online sein, soll auch 2 dieser 6 eine Variable zugewiesen werden.


    Wie geht das dann damit?


    /e:
    Das ist mein derzeitiger Code:
    public startGame()
    {
    new tt=1,str[128];
    for(new i;i<MAX_PLAYERS;i++){
    if(IsPlayerConnected(i) && GetPVarInt(i,"Eingeloggt") == 0){
    if(isIn[i] == 1){
    for(new t;t<i;t++)
    role[tt] = 1;
    format(str,sizeof str,"Rolle: Traitor");
    PlayerTextDrawSetString(tt, igInfo0[tt], str);
    SendClientMessage(tt,COLOR_LIGHTBLUE,"Du bist ein Traitor!");
    if(tt > 1){ SendClientMessage(tt,COLOR_LIGHTBLUE,"Du musst mit deinen Teamkameraden alle Innocents töten um zu gewinnen!"); } else { SendClientMessage(tt,COLOR_LIGHTBLUE,"Du hast keine Teamkameraden!"); }
    SendClientMessage(tt,COLOR_LIGHTBLUE,"Viel Glück!");
    }
    role[i] = 0;
    format(str,sizeof str,"Rolle: Innocent");
    PlayerTextDrawSetString(i, igInfo0[i], str);
    SetSpawnInfo(i,0,skin[i],20.6069,1545.0732,16.2459,176.940,0,0,0,0,0,0);
    SpawnPlayer(i);
    roundstarted = 1;
    round += 1;
    }
    }
    }
    return 1;
    }

    Also....


    Sagen wir es sind gerade 2 Spieler auf dem Server.
    Dann wird durch eine Random-Funktion 1 der 2 Spieler eine Variable zugewiesen (Sagen wir: Role[playerid] = 1; )
    Sollten allerdings 4 Spieler online sein, soll 2 dieser 4 eine Variable zugewiesen werden.
    Sollten allerdings 6 Spieler online sein, soll auch 2 dieser 6 eine Variable zugewiesen werden.


    Das versuche ich herauszufinden wie das geht.

    Hallo,


    ich habe einen Textdraw, welcher TextDrawSetPreviewModel benutzt. Leider wird das ganze nicht aktualisiert (Er soll die Waffe anzeigen, die der Spieler in der Hand hält).
    Hier mal mein Code:
    Weapon = GetPlayerWeapon(playerid);
    if(Weapon == 0) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 321); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Fist
    else if(Weapon == 14) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 325); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Flowers
    else if(Weapon == 15) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 326); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Cane
    else if(Weapon == 1) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 331); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Brass Knuckels
    else if(Weapon == 2) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 333); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Golf Club
    else if(Weapon == 3) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 334); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Nite Stick
    else if(Weapon == 4) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 335); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Combat Knife
    else if(Weapon == 5) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 336); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Baseball Bat
    else if(Weapon == 6) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 337); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Shovel
    else if(Weapon == 7) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 338); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Pool Cue
    else if(Weapon == 8) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 339); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Katana
    else if(Weapon == 9) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 341); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Chainsaw
    else if(Weapon == 16) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 342); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Frag Grenade
    else if(Weapon == 17) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 343); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Tear Gas Grenade
    else if(Weapon == 18) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 344); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Molotov Cocktail
    else if(Weapon == 22) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 346); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Colt 45
    else if(Weapon == 23) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 347); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Silenced Pistol
    else if(Weapon == 24) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 348); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Desert Eagle
    else if(Weapon == 25) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 349); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Shotgun
    else if(Weapon == 26) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 350); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Sawn-off Shutgun
    else if(Weapon == 27) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 351); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Combat Shotgu (SPAS 12)
    else if(Weapon == 28) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 352); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Micro Uzi
    else if(Weapon == 29) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 353); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//MP5
    else if(Weapon == 30) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 355); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//AK47
    else if(Weapon == 31) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 356); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//M4A1
    else if(Weapon == 33) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 357); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Country Rifle
    else if(Weapon == 34) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 358); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Sniper Rifle
    else if(Weapon == 35) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 359); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Rocket Launcher
    else if(Weapon == 36) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 360); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Heat Seeking Rocket Launcher
    else if(Weapon == 37) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 361); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Flamethrower
    else if(Weapon == 38) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 362); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Minigun
    else if(Weapon == 39) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 363); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Satchel Charges
    else if(Weapon == 40) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 364); format(str,sizeof str," ",GetPlayerAmmo(playerid));}//Detonator
    else if(Weapon == 41) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 365); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Spray Paint Can
    else if(Weapon == 42) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 366); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Fire Extinguisher
    else if(Weapon == 43) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 367); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//Camera
    else if(Weapon == 32) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 372); format(str,sizeof str,"%d Schuss",GetPlayerAmmo(playerid));}//TEC-9
    Warum macht er das, bzw ist es möglich das ganze zu verändern?


    lg


    Auszug aus der ServerLog, das heißt er merkt, welche Waffe ich in der Hand halte.
    Trotzdem zeigt er mir nicht das richtige Model an..



    Und bei GetPlayerAmmo gehts auch nicht. Der zeigt irgendwie nur die komplette Muni an, die vorhanden ist :o

    Skinselect0 = TextDrawCreate(220.400009, 401.706512, "LD_SPAC:white");
    TextDrawLetterSize(Skinselect0, 0.000000, 0.000000);
    TextDrawTextSize(Skinselect0, 197.599990, 23.395549);
    TextDrawAlignment(Skinselect0, 1);
    TextDrawColor(Skinselect0, 8388863);
    TextDrawSetShadow(Skinselect0, 0);
    TextDrawSetOutline(Skinselect0, 0);
    TextDrawFont(Skinselect0, 4);

    Skinselect1 = TextDrawCreate(228.799957, 404.195526, "<<");
    TextDrawLetterSize(Skinselect1, 0.472799, 2.067910);
    TextDrawTextSize(Skinselect1, 252.799972, 22.897779);
    TextDrawAlignment(Skinselect1, 1);
    TextDrawColor(Skinselect1, -2147483393);
    TextDrawUseBox(Skinselect1, true);
    TextDrawBoxColor(Skinselect1, 0x00000000);
    TextDrawSetShadow(Skinselect1, 0);
    TextDrawSetOutline(Skinselect1, 1);
    TextDrawBackgroundColor(Skinselect1, 51);
    TextDrawFont(Skinselect1, 3);
    TextDrawSetProportional(Skinselect1, 1);
    TextDrawSetSelectable(Skinselect1, true);


    Skinselect2 = TextDrawCreate(381.199493, 404.195709, ">>");
    TextDrawLetterSize(Skinselect2, 0.523600, 2.003200);
    TextDrawTextSize(Skinselect2, 406.400268, 22.897777);
    TextDrawAlignment(Skinselect2, 1);
    TextDrawColor(Skinselect2, -2147483393);
    TextDrawUseBox(Skinselect2, true);
    TextDrawBoxColor(Skinselect2, 0x00000000);
    TextDrawSetShadow(Skinselect2, 0);
    TextDrawSetOutline(Skinselect2, 1);
    TextDrawBackgroundColor(Skinselect2, 51);
    TextDrawFont(Skinselect2, 3);
    TextDrawSetProportional(Skinselect2, 1);
    TextDrawSetSelectable(Skinselect2, true);


    Skinselect3 = TextDrawCreate(269.999969, 405.191162, "auswaehlen");
    TextDrawLetterSize(Skinselect3, 0.489200, 1.789155);
    TextDrawTextSize(Skinselect3, 366.800018, 97.066688);
    TextDrawAlignment(Skinselect3, 1);
    TextDrawColor(Skinselect3, -2147483393);
    TextDrawUseBox(Skinselect3, true);
    TextDrawBoxColor(Skinselect3, 0x00000000);
    TextDrawSetShadow(Skinselect3, 0);
    TextDrawSetOutline(Skinselect3, 0);
    TextDrawBackgroundColor(Skinselect3, 51);
    TextDrawFont(Skinselect3, 3);
    TextDrawSetProportional(Skinselect3, 1);
    TextDrawSetSelectable(Skinselect3, true);


    Das ist Array index out of bounds, da du es wahrscheinlich so deklariert hast geht es von 0-499 (sagen wir Standard Wert), aber MAX_PLAYERS ist 500 also über der Grenze.


    Du wolltest wohl igInfo3[playerid] schreiben ;)


    mfg. :thumbup:


    Ich habs selber bemerkt :thumbup:


    Danke trotzdem.



    /e:
    Okay, ich habe nun die Models drin usw...
    InGame wird mir als Preview nur der CJ-Skin angezeigt, obwohl ich eine Deagle in der Hand halte.
    Hier der Code:
    GetPlayerWeaponData(playerid,Slot,Weapon,Ammo);
    if(Weapon == 0) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 321); }//Fist
    else if(Weapon == 14) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 325); }//Flowers
    else if(Weapon == 15) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 326); }//Cane
    else if(Weapon == 1) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 331); }//Brass Knuckels
    else if(Weapon == 2) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 333); }//Golf Club
    else if(Weapon == 3) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 334); }//Nite Stick
    else if(Weapon == 4) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 335); }//Combat Knife
    else if(Weapon == 5) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 336); }//Baseball Bat
    else if(Weapon == 6) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 337); }//Shovel
    else if(Weapon == 7) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 338); }//Pool Cue
    else if(Weapon == 8) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 339); }//Katana
    else if(Weapon == 9) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 341); }//Chainsaw
    else if(Weapon == 16) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 342); }//Frag Grenade
    else if(Weapon == 17) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 343); }//Tear Gas Grenade
    else if(Weapon == 18) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 344); }//Molotov Cocktail
    else if(Weapon == 22) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 346); }//Colt 45
    else if(Weapon == 23) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 347); }//Silenced Pistol
    else if(Weapon == 24) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 348); }//Desert Eagle
    else if(Weapon == 25) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 349); }//Shotgun
    else if(Weapon == 26) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 350); }//Sawn-off Shutgun
    else if(Weapon == 27) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 351); }//Combat Shotgu (SPAS 12)
    else if(Weapon == 28) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 352); }//Micro Uzi
    else if(Weapon == 29) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 353); }//MP5
    else if(Weapon == 30) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 355); }//AK47
    else if(Weapon == 31) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 356); }//M4A1
    else if(Weapon == 33) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 357); }//Country Rifle
    else if(Weapon == 34) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 358); }//Sniper Rifle
    else if(Weapon == 35) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 359); }//Rocket Launcher
    else if(Weapon == 36) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 360); }//Heat Seeking Rocket Launcher
    else if(Weapon == 37) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 361); }//Flamethrower
    else if(Weapon == 38) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 362); }//Minigun
    else if(Weapon == 39) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 363); }//Satchel Charges
    else if(Weapon == 40) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 364); }//Detonator
    else if(Weapon == 41) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 365); }//Spray Paint Can
    else if(Weapon == 42) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 366); }//Fire Extinguisher
    else if(Weapon == 43) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 367); }//Camera
    else if(Weapon == 32) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[playerid], 372); }//TEC-9
    Warum CJ Skin wenn ich eine Deagle halte?
    Und kann man den aktuellen Clip der Munition abfragen?

    Okay, dann eine andere Frage:


    Warum bekomme ich hierbei einen Array Index out of bounds?
    if(Weapon == 1) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[MAX_PLAYERS], 331); }//Brass Knuckels
    else if(Weapon == 2) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[MAX_PLAYERS], 333); }//Golf Club
    else if(Weapon == 3) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[MAX_PLAYERS], 334); }//Nite Stick
    else if(Weapon == 4) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[MAX_PLAYERS], 335); }//Combat Knife
    else if(Weapon == 5) { PlayerTextDrawSetPreviewModel(playerid, igInfo3[MAX_PLAYERS], 336); }//Baseball Bat?


    lg