Jump to content

[REZOLVAT] Intrebare MapIcon


iPanter
 Share

Recommended Posts

@Leonard Asta cred ca e ca nu am LoadHouses

function LoadProperty() {
new result[100],index = 0;
    mysql_query(SQL,"SELECT * FROM `houses` ORDER BY `houses`.`ID` ASC");
    mysql_store_result();
    while(mysql_retrieve_row()) {
        housess++;
index++;
new i = index;
 
mysql_get_field("ID", result); HouseInfo[i][hID] = strval(result);
        mysql_get_field("Entrancex", result); HouseInfo[i][hEntrancex] = floatstr(result);
     mysql_get_field("Entrancey", result); HouseInfo[i][hEntrancey] = floatstr(result);
        mysql_get_field("Entrancez", result); HouseInfo[i][hEntrancez] = floatstr(result);
        mysql_get_field("Exitx", result); HouseInfo[i][hExitx] = floatstr(result);
        mysql_get_field("Exity", result); HouseInfo[i][hExity] = floatstr(result);
        mysql_get_field("Exitz", result); HouseInfo[i][hExitz] = floatstr(result);
        mysql_get_field("Owner", result); strmid(HouseInfo[i][hOwner], result, 0, 32, 32);
        mysql_get_field("Discription", result); strmid(HouseInfo[i][hDiscription], result, 0, 24, 24);
        mysql_get_field("Value", result); HouseInfo[i][hValue] = strval(result);
        mysql_get_field("Hel", result); HouseInfo[i][hHel] = strval(result);
        mysql_get_field("Arm", result); HouseInfo[i][hArm] = strval(result);
        mysql_get_field("Interior", result); HouseInfo[i][hInterior] = strval(result);
        mysql_get_field("Lockk", result); HouseInfo[i][hLock] = strval(result);
        mysql_get_field("Owned", result); HouseInfo[i][hOwned] = strval(result);
        mysql_get_field("Rent", result); HouseInfo[i][hRent] = strval(result);
        mysql_get_field("Rentabil", result); HouseInfo[i][hRentabil] = strval(result);
        mysql_get_field("Takings", result); HouseInfo[i][hTakings] = strval(result);
        mysql_get_field("Level", result); HouseInfo[i][hLevel] = strval(result);
        mysql_get_field("Virtual", result); HouseInfo[i][hVirtual] = strval(result);
        mysql_get_field("Radio", result); HouseInfo[i][hRadio] = strval(result); 
 
UpdateLabel(1,HouseInfo[i][hID]); 
}
mysql_free_result();
printf("Houses: %d", index);
return 1;
}
Edited by iPanter
Link to comment
Share on other sites

  • Administrator

Pentru a creea un mapicon pentru toate odata, te folosesti de CreateDynamicMapIcon

 

Mai jos, dupa UpdateLabel(1, HouseInfo[hID] adaugi:

CreateDynamicMapIcon(HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez], 25, 0xFFFFFFFF, 0, 0, playerid);

Asta e doar un exemplu, pentru documentatie: 

CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0, style = MAPICON_LOCAL);
x - 1
y - 2
z - 3
type - 4
color - 5
worldid - 6
interior - 7
playerid - 8
stramdistance - 9
style - 10

iar normal ar venii:

CreateDynamicMapIcon(0.0, 0.0, 0.0, 10, 0, 0, 0, playerid, 100.0);

Sper ca ai inteles.

Link to comment
Share on other sites

  • Retired

Folosesti MySQL R34 .. ? 

Trece si tu pe r41-4 , e mult mai ok.

 

 

CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0, style = MAPICON_LOCAL);

 

Asta e functia si te folosesti de ea ca sa creeze icon-u ala de casa. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...