Beiträge von deathrunner

    Hallo, ich habe ein problem, ich bekomme den error nicht weg.



    #define MAX_GANGZONE 10


    enum gangname
    {
    baustelle,
    supermarkt,
    gartencenter,
    wohngeb,
    hitmangarage,
    uni,
    muelldepo,
    bergfarm,
    fleischberg
    };
    enum gangzonedata
    {
    gangzBesitzer,
    gangzFarbe,
    gangzDrogen,
    gangzMats,
    gangzGeld
    };
    new Gangzone[gangname];
    new Gangzoneinfo[gangname][gangzonedata];


    stock GangzoneNameByID(gangzoneid)
    {
    new gangzonename[128];
    switch(gangzoneid)
    {
    case 0: {gangzonename = "baustelle";}
    case 1: {gangzonename = "supermarkt";}
    case 2: {gangzonename = "gartencenter";}
    case 3: {gangzonename = "wohngeb";}
    case 4: {gangzonename = "hitmangarage";}
    case 5: {gangzonename = "uni";}
    case 6: {gangzonename = "muelldepo";}
    case 7: {gangzonename = "bergfarm";}
    case 8: {gangzonename = "Äfleischberg";}


    }
    return gangzonename;
    }


    public OnPlayerSpawn(playerid)
    {
    for(new i; i<MAX_GANGZONE;i++)
    {
    new gzn[128];
    gzn = GangzoneNameByID(i);
    GangZoneShowForPlayer(playerid, Gangzone[gzn], Gangzoneinfo[Gangzone[gzn]][gangzFarbe]);//Hier ist der error
    }
    return 1;
    }


    error 033: array must be indexed (variable "gzn")


    Bitte um hilfe

    ok danke für die info


    aber
    if(GetPlayerWeapon(playerid) == 34 && !IsPlayerInAnyVehicle(playerid))
    {
    new PlayerText3D:snipertext[MAX_PLAYERS];
    if(PRESSED(KEY_HANDBRAKE))
    {
    for(new i; i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    new Float:dist = GetDistanceBetweenPlayers(playerid, i);
    if(dist > 10)
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(i, X, Y, Z);
    new string[128];
    format(string,sizeof(string),"%s",PName[i]);
    snipertext[i] = CreatePlayer3DTextLabel(playerid,string,0x008080FF,X,Y,Z+1,315.0,i);
    return 1;
    }
    }
    }
    }
    else if(RELEASED(KEY_HANDBRAKE))
    {
    for(new i; i<MAX_PLAYERS;i++)
    {
    DeletePlayer3DTextLabel(playerid,snipertext[i]);
    return 1;
    }
    }
    }


    kann das so auch funktionieren?

    Hallo,


    Ich wollte wenn jemand mit der sniper anzielt das über jedem spieler ein 3d text erscheint


    unter OnPlayerKey....

    if(GetPlayerWeapon(playerid) == 34 && !IsPlayerInAnyVehicle(playerid))
    {
    new PlayerText3D:snipertext[MAX_PLAYERS];
    if(PRESSED(KEY_HANDBRAKE))
    {
    for(new i; i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    new Float:dist = GetDistanceBetweenPlayers(playerid, i);
    if(dist > 10)
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(i, X, Y, Z);
    new string[128];
    format(string,sizeof(string),"%s",PName[i]);
    snipertext[i] = CreatePlayer3DTextLabel(playerid,string,0x008080FF,X,Y,Z+1,315.0,i);
    return 1;
    }
    }
    }
    }
    else if(RELEASED(KEY_HANDBRAKE))
    {
    for(new i; i<MAX_PLAYERS;i++)
    {
    DeletePlayer3DTextLabel(playerid,snipertext[i]);
    return 1;
    }
    }
    }


    also ich finden den fehler nicht, es geschieht einfach nichts


    bitte um hilfe


    //edit mit GetPlayerTargetPlayer hab ichs versucht nur mit der sniper gehts nicht

    Hallo,


    Ich wollte wenn jemand mit der sniper einziel das über jedem spieler ein 3d text erscheint


    unter OnPlayerKey....

    if(GetPlayerWeapon(playerid) == 34 && !IsPlayerInAnyVehicle(playerid))
    {
    new PlayerText3D:snipertext[MAX_PLAYERS];
    if(PRESSED(KEY_HANDBRAKE))
    {
    for(new i; i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    new Float:dist = GetDistanceBetweenPlayers(playerid, i);
    if(dist > 10)
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(i, X, Y, Z);
    new string[128];
    format(string,sizeof(string),"%s",PName[i]);
    snipertext[i] = CreatePlayer3DTextLabel(playerid,string,0x008080FF,X,Y,Z+1,315.0,i);
    return 1;
    }
    }
    }
    }
    else if(RELEASED(KEY_HANDBRAKE))
    {
    for(new i; i<MAX_PLAYERS;i++)
    {
    DeletePlayer3DTextLabel(playerid,snipertext[i]);
    return 1;
    }
    }
    }


    also ich finden den fehler nicht, es geschieht einfach nichts


    bitte um hilfe


    //Edit schreib fehler

    [Folgendes muss im Thema enthalten sein und darf nicht entfernt werden:]
    ______
    Unverbindlicher Hinweis: Die Sicherheit einer Transaktion kann am besten durch die Einschaltung eines Mittelsmannes gewährleistet werden. Weitere Informationen dazu gibt es hier.



    Hallo,
    Wie meine Überschrift schon sagt, suche ich jemanden der mir einen guten stile für ein wbb3.1.x machen kann


    Die bezahlung hängt vom aufwand ab sowie dem ausehen, für mehr infos pn me




    Hallo, ich habe ein problem mit float speichern bei meiner mysql datenbank


    also ich habe

    stock WriteFloatToSQL(table[],cloum[], Float:what, playername[])
    {
    new query[1028];
    format(query, sizeof(query), "UPDATE %s SET %s = %f WHERE NAME = '%s';", table, cloum, what, playername);
    }


    aber er speicher die floats nicht in die datenbank.

    WriteFloatToSQL("samp_user","PosX",Playerinfopos[playerid][PosX],PName[playerid]);//25
    WriteFloatToSQL("samp_user","PosY",Playerinfopos[playerid][PosY],PName[playerid]);//26
    WriteFloatToSQL("samp_user","PosZ",Playerinfopos[playerid][PosZ],PName[playerid]);//27

    Playerinfopos[playerid][PosX] hat einen wert zugewisen, nur er speicher ihn nicht ab

    Code
    26	PosX	float			
    27	PosY	float			
    28	PosZ 	float


    bitte um hilfe

    Hallo,
    Ich rätsle schon länger rum wie ich es machen dann , das wen jemand durch die sniper schaut und kurz vor ende der streaming range ist also kurz bevor der spieler ausgeblendet wird. das sein Nametag angezeigt wird. bitte um hilfe

    Hallo, ich habe ein problem mit meinen textdraws


    also wenn man länger rumfährt oder geht verschwindet einfach ein textdraw immer ein anderes.
    wenn man stirbt verschwinden gleich alle oder nur 3 usw



    new Text:Textdraw0_Want[MAX_PLAYERS];
    new Text:Textdrawanf_Want[MAX_PLAYERS];
    new Text:Textdraw1_Want[MAX_PLAYERS];
    new Text:Textdraw2_Want[MAX_PLAYERS];
    new Text:Textdraw3_Want[MAX_PLAYERS];
    new Text:Textdraw4_Want[MAX_PLAYERS];
    new Text:Textdraw5_Want[MAX_PLAYERS];
    new Text:Textdraw6_Want[MAX_PLAYERS];
    also ich habe bei onplayerspawn

    new gwant = Playerinfo[playerid][Want_Gewalt];
    new stowant = Playerinfo[playerid][Want_STVO];
    new swant = Playerinfo[playerid][Want_Sonstige];
    new nnewgewalt[512],nnewstvo[512],nnewsonstige[512];
    format(nnewgewalt,sizeof(nnewgewalt),"%i",gwant);
    format(nnewstvo,sizeof(nnewstvo),"%i",stowant);
    format(nnewsonstige,sizeof(nnewsonstige),"%i",swant);


    Textdraw0_Want[playerid] = TextDrawCreate(516.000000, 101.000000, "_");
    TextDrawBackgroundColor(Textdraw0_Want[playerid], 255);
    TextDrawFont(Textdraw0_Want[playerid], 1);
    TextDrawLetterSize(Textdraw0_Want[playerid], 0.469999, 1.200000);
    TextDrawColor(Textdraw0_Want[playerid], -1);
    TextDrawSetOutline(Textdraw0_Want[playerid], 0);
    TextDrawSetProportional(Textdraw0_Want[playerid], 1);
    TextDrawSetShadow(Textdraw0_Want[playerid], 1);
    TextDrawSetSelectable(Textdraw0_Want[playerid], 0);


    Textdrawanf_Want[playerid] = TextDrawCreate(516.000000, 101.000000, "Wanteds");
    TextDrawBackgroundColor(Textdrawanf_Want[playerid], 255);
    TextDrawFont(Textdrawanf_Want[playerid], 1);
    TextDrawLetterSize(Textdrawanf_Want[playerid], 0.469999, 1.200000);
    TextDrawColor(Textdrawanf_Want[playerid], -1);
    TextDrawSetOutline(Textdrawanf_Want[playerid], 0);
    TextDrawSetProportional(Textdrawanf_Want[playerid], 1);
    TextDrawSetShadow(Textdrawanf_Want[playerid], 1);
    TextDrawSetSelectable(Textdrawanf_Want[playerid], 0);


    Textdraw1_Want[playerid] = TextDrawCreate(529.000000, 120.000000, "Mord:");
    TextDrawBackgroundColor(Textdraw1_Want[playerid], 255);
    TextDrawFont(Textdraw1_Want[playerid], 1);
    TextDrawLetterSize(Textdraw1_Want[playerid], 0.289999, 1.100000);
    TextDrawColor(Textdraw1_Want[playerid], -1);
    TextDrawSetOutline(Textdraw1_Want[playerid], 0);
    TextDrawSetProportional(Textdraw1_Want[playerid], 1);
    TextDrawSetShadow(Textdraw1_Want[playerid], 1);
    TextDrawSetSelectable(Textdraw1_Want[playerid], 0);


    Textdraw2_Want[playerid] = TextDrawCreate(559.000000, 120.000000, nnewgewalt);
    TextDrawBackgroundColor(Textdraw2_Want[playerid], 255);
    TextDrawFont(Textdraw2_Want[playerid], 1);
    TextDrawLetterSize(Textdraw2_Want[playerid], 0.289999, 1.100000);
    TextDrawColor(Textdraw2_Want[playerid], -1);
    TextDrawSetOutline(Textdraw2_Want[playerid], 0);
    TextDrawSetProportional(Textdraw2_Want[playerid], 1);
    TextDrawSetShadow(Textdraw2_Want[playerid], 1);
    TextDrawSetSelectable(Textdraw2_Want[playerid], 0);


    Textdraw3_Want[playerid] = TextDrawCreate(528.000000, 136.000000, "STVO:");
    TextDrawBackgroundColor(Textdraw3_Want[playerid], 255);
    TextDrawFont(Textdraw3_Want[playerid], 1);
    TextDrawLetterSize(Textdraw3_Want[playerid], 0.289999, 1.100000);
    TextDrawColor(Textdraw3_Want[playerid], -1);
    TextDrawSetOutline(Textdraw3_Want[playerid], 0);
    TextDrawSetProportional(Textdraw3_Want[playerid], 1);
    TextDrawSetShadow(Textdraw3_Want[playerid], 1);
    TextDrawSetSelectable(Textdraw3_Want[playerid], 0);


    Textdraw4_Want[playerid] = TextDrawCreate(559.000000, 136.000000, nnewstvo);
    TextDrawBackgroundColor(Textdraw4_Want[playerid], 255);
    TextDrawFont(Textdraw4_Want[playerid], 1);
    TextDrawLetterSize(Textdraw4_Want[playerid], 0.289999, 1.100000);
    TextDrawColor(Textdraw4_Want[playerid], -1);
    TextDrawSetOutline(Textdraw4_Want[playerid], 0);
    TextDrawSetProportional(Textdraw4_Want[playerid], 1);
    TextDrawSetShadow(Textdraw4_Want[playerid], 1);
    TextDrawSetSelectable(Textdraw4_Want[playerid], 0);


    Textdraw5_Want[playerid] = TextDrawCreate(515.000000, 150.000000, "Sonstige:");
    TextDrawBackgroundColor(Textdraw5_Want[playerid], 255);
    TextDrawFont(Textdraw5_Want[playerid], 1);
    TextDrawLetterSize(Textdraw5_Want[playerid], 0.289999, 1.100000);
    TextDrawColor(Textdraw5_Want[playerid], -1);
    TextDrawSetOutline(Textdraw5_Want[playerid], 0);
    TextDrawSetProportional(Textdraw5_Want[playerid], 1);
    TextDrawSetShadow(Textdraw5_Want[playerid], 1);
    TextDrawSetSelectable(Textdraw5_Want[playerid], 0);


    Textdraw6_Want[playerid] = TextDrawCreate(559.000000, 150.000000, nnewsonstige);
    TextDrawBackgroundColor(Textdraw6_Want[playerid], 255);
    TextDrawFont(Textdraw6_Want[playerid], 1);
    TextDrawLetterSize(Textdraw6_Want[playerid], 0.289999, 1.100000);
    TextDrawColor(Textdraw6_Want[playerid], -1);
    TextDrawSetOutline(Textdraw6_Want[playerid], 0);
    TextDrawSetProportional(Textdraw6_Want[playerid], 1);
    TextDrawSetShadow(Textdraw6_Want[playerid], 1);
    TextDrawSetSelectable(Textdraw6_Want[playerid], 0);


    TextDrawShowForPlayer(playerid, Textdraw0_Want[playerid]);
    TextDrawShowForPlayer(playerid, Textdrawanf_Want[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw1_Want[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw2_Want[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw3_Want[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw4_Want[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw5_Want[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw6_Want[playerid]);


    Bitte um hilfe

    Ein tipp mach ein stock


    stock FrakNameByID(frakid)
    {
    new frakname[64];
    switch(frakid)
    {
    case 0: {frakname = "Zivilist";}
    case 1: {frakname = "SFPD";}
    case 2: {frakname = "FBI";}
    }
    return frakname;
    }


    das ist für die fraktionen


    und wenn du ranks willst machst dus einfach so


    stock FrakRankNameByFrakID(frakid, rankid)
    {
    new rankname[128];
    if(frakid == 1)
    {
    switch(rankid)
    {
    case 1: {rankname = "Apprentice";}
    case 2: {rankname = "Officer";}
    case 3: {rankname = "Corporal";}
    case 4: {rankname = "Investigator";}
    case 5: {rankname = "Detective";}
    case 6: {rankname = "Major";}
    case 7: {rankname = "Sergeant";}
    case 8: {rankname = "Colonel";}
    case 9: {rankname = "Deputy Commissioner";}
    case 10: {rankname = "Police Commissioner";}
    }
    }
    if(frakid == 2)
    {
    switch(rankid)
    {
    case 1: {rankname = "Probationary Agent";}
    case 2: {rankname = "Special Agent";}
    case 3: {rankname = "Senior Agent";}
    case 4: {rankname = "Assistant Agent-in-Charge";}
    case 5: {rankname = "Special Agent-in-Charge";}
    case 6: {rankname = "Section Chief";}
    case 7: {rankname = "Deputy Assistant Director";}
    case 8: {rankname = "Assistant Director";}
    case 9: {rankname = "Deputy Director";}
    case 10: {rankname = "Director";}
    }
    }


    Und wenn du nu das ausgeben willst machst du einfach



    new string[512];
    new frakid = SpielerInfo[targetid][pMember]; //also ich würde dem Leader einen Rang geben. und nicht extra nochma pLeader ist viel einfacher
    format(string, sizeof(string), "Fraktion: %s | Rang: %s ", FrakNameByID(frakid),FrakRankNameByFrakID(frakid, SpielerInfo[targetid][pRank]));
    SendClientMessage(playerid, Deine Farbe, string);

    Komische Frage, aber kann mir irgendjemand sagen warum mein textdraw hin un wieder verschwinden und dan nach gewisser zeit wieder auftaucht


    Unter OnPlayerSpawn

    Textdrawanf_Want[playerid] = TextDrawCreate(516.000000, 101.000000, "Wanteds");
    TextDrawBackgroundColor(Textdrawanf_Want[playerid], 255);
    TextDrawFont(Textdrawanf_Want[playerid], 1);
    TextDrawLetterSize(Textdrawanf_Want[playerid], 0.469999, 1.200000);
    TextDrawColor(Textdrawanf_Want[playerid], -1);
    TextDrawSetOutline(Textdrawanf_Want[playerid], 0);
    TextDrawSetProportional(Textdrawanf_Want[playerid], 1);
    TextDrawSetShadow(Textdrawanf_Want[playerid], 1);
    TextDrawSetSelectable(Textdrawanf_Want[playerid], 0);
    TextDrawShowForPlayer(playerid, Textdraw0_Want[playerid]);