Wanted-Labels und 3DLabels für Häuser und Bizzes

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo,
    Ich hab da ein paar Fragen.
    Ich würde gerne 3D Textlabels über gesuchte Spieler schreiben.
    Dann soll da zum Beispiel 20 Wanteds stehen oder so.
    Diese sollen nur für Cops stehen
    abfrage für Cops ist.
    if(IsACop(playerid))
    Die Variable der Wanteds ist
    PlayerInfo[playerid][Wantedlevel]


    Dann würde ich noch gerne die 3D Textlabels für Häuser und Businesse haben.



    mfg

  • hier für häuser den rest musste selber machen mit update ...:


    public LoadProperty()
    {
    new arrCoords[29][64];
    new strFromFile2[256];
    //new labels[256];
    new string2[256];
    new File: file = fopen("property.cfg", io_read);
    if (file)
    {
    new idx;
    while (idx < sizeof(HouseInfo))
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, ',');
    HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
    HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
    HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
    HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
    HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
    HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
    HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
    HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
    HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
    HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
    HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
    HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
    //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
    strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
    strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
    HouseInfo[idx][hValue] = strval(arrCoords[14]);
    HouseInfo[idx][hHel] = strval(arrCoords[15]);
    HouseInfo[idx][hArm] = strval(arrCoords[16]);
    HouseInfo[idx][hInt] = strval(arrCoords[17]);
    HouseInfo[idx][hLock] = strval(arrCoords[18]);
    HouseInfo[idx][hOwned] = strval(arrCoords[19]);
    HouseInfo[idx][hRooms] = strval(arrCoords[20]);
    HouseInfo[idx][hRent] = strval(arrCoords[21]);
    HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
    HouseInfo[idx][hTakings] = strval(arrCoords[23]);
    HouseInfo[idx][hVec] = strval(arrCoords[24]);
    if(HouseInfo[idx][hVec] == 457)
    {
    HouseInfo[idx][hVec] = 411;
    }
    if(HouseInfo[idx][hOwned] == 0)
    {
    format(string2, sizeof(string2), "Dieses Haus steht zum Verkauf.\nPreis: $%d\nLevel: %d\nZum kaufen gib /buyhouse ein",HouseInfo[idx][hValue],HouseInfo[idx][hLevel]);
    housetext[idx] = Create3DTextLabel(string2,COLOR_GREEN,HouseInfo[idx][hEntrancex],HouseInfo[idx][hEntrancey],HouseInfo[idx][hEntrancez],10.0,0,0);
    }
    if(HouseInfo[idx][hOwned] == 1)
    {
    if(HouseInfo[idx][hRentabil] == 0)
    {
    format(string2, sizeof(string2), "Hausbesitzer\n%s\nLevel: %d",HouseInfo[idx][hOwner],HouseInfo[idx][hLevel]);
    housetext[idx] = Create3DTextLabel(string2,COLOR_GREEN,HouseInfo[idx][hEntrancex],HouseInfo[idx][hEntrancey],HouseInfo[idx][hEntrancez],10.0,0,0);
    }
    else
    {
    format(string2, sizeof(string2), "Hausbesitzer\n%s\nMiete: $%d\nLevel: %d\n/rentroom um ein Zimmer zu mieten",HouseInfo[idx][hOwner],HouseInfo[idx][hRent],HouseInfo[idx][hLevel]);
    housetext[idx] = Create3DTextLabel(string2,COLOR_GREEN,HouseInfo[idx][hEntrancex],HouseInfo[idx][hEntrancey],HouseInfo[idx][hEntrancez],10.0,0,0);
    }
    }
    HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
    HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
    HouseInfo[idx][hDate] = strval(arrCoords[27]);
    HouseInfo[idx][hLevel] = strval(arrCoords[28]);
    printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
    idx++;
    }
    fclose(file);
    }
    return 1;
    }