heyho,
ich bin dabei das haussystem von prp zu kopieren, warum? ich find es einfach geial.
nun lädt es aber keine häuser..
ongamemodeinit
mysql_function_query(MySqlConnection,"SELECT * FROM "#SERVERTAG"_properties",true,"OnQueryFinish","siii","SELECT * FROM "#SERVERTAG"_properties",_SQL_HAUS_LOAD,0,MySqlConnection);
und bei onquery finish
case _SQL_HAUS_LOAD:
{
cache_get_data(rows,fields);
new haus = 0;
if(rows)
{
while(haus<rows)
{
HausInfo[haus+1][hauscreatet] = 1;
cache_get_field_content(haus,"haus_besitzer",result);
strmid(HausInfo[haus+1][haus_besitzer],result,0,strlen(result),24);
cache_get_field_content(haus,"haus_Owned",result);
HausInfo[haus+1][haus_Owned] = strval(result);
cache_get_field_content(haus,"haus_innenraum",result);
HausInfo[haus+1][haus_innenraum] = strval(result);
cache_get_field_content(haus,"haus_miete",result);
HausInfo[haus+1][haus_miete] = strval(result);
cache_get_field_content(haus,"haus_beschreibung",result);
strmid(HausInfo[haus+1][haus_beschreibung],result,0,strlen(result),150);
cache_get_field_content(haus,"haus_locked",result);
HausInfo[haus+1][haus_locked] = strval(result);
cache_get_field_content(haus,"haus_slots",result);
HausInfo[haus+1][haus_slots] = strval(result);
cache_get_field_content(haus,"haus_eingemitetenzaehler",result);
HausInfo[haus+1][haus_eingemitetenzaehler] = strval(result);
cache_get_field_content(haus,"haus_x",result);
HausInfo[haus+1][haus_x] = floatstr(result);
cache_get_field_content(haus,"haus_y",result);
HausInfo[haus+1][haus_y] = floatstr(result);
cache_get_field_content(haus,"haus_z",result);
HausInfo[haus+1][haus_z] = floatstr(result);
cache_get_field_content(haus,"haus_preis",result);
HausInfo[haus+1][haus_preis] = strval(result);
cache_get_field_content(haus,"haus_level",result);
HausInfo[haus+1][haus_level] = strval(result);
cache_get_field_content(haus,"haus_geldkasse",result);
HausInfo[haus+1][haus_geldkasse] = strval(result);
cache_get_field_content(haus,"haus_Opium",result);
HausInfo[haus+1][haus_Opium] = strval(result);
cache_get_field_content(haus,"haus_c4",result);
HausInfo[haus+1][haus_c4] = strval(result);
cache_get_field_content(haus,"haus_Ganja",result);
HausInfo[haus+1][haus_Ganja] = strval(result);
cache_get_field_content(haus,"haus_Kokain",result);
HausInfo[haus+1][haus_Kokain] = strval(result);
cache_get_field_content(haus,"haus_materials",result);
HausInfo[haus+1][haus_materials] = strval(result);
cache_get_field_content(haus,"haus_heal",result);
HausInfo[haus+1][haus_heal] = strval(result);
cache_get_field_content(haus,"haus_armour",result);
HausInfo[haus+1][haus_armour] = strval(result);
cache_get_field_content(haus,"haus_hatheal",result);
HausInfo[haus+1][haus_hatheal] = strval(result);
cache_get_field_content(haus,"haus_hatarmour",result);
HausInfo[haus+1][haus_hatarmour] = strval(result);
cache_get_field_content(haus,"hausgundumper",result);
HausInfo[haus+1][haus_waffenschrank] = strval(result);
new savestring[20];
for(new i=0;i<13;i++)
{
format(savestring,sizeof(savestring),"hausgun%i",i);
cache_get_field_content(haus,savestring,result);
HausInfo[haus+1][haus_gun][i] = strval(result);
format(savestring,sizeof(savestring),"hausgunammo%i",i);
cache_get_field_content(haus,savestring,result);
HausInfo[haus+1][haus_gunammo][i] = strval(result);
}
cache_get_field_content(haus,"hausmull",result);
HausInfo[haus+1][hausmull] = strval(result);
cache_get_field_content(haus,"haus_msg",result);
strmid(HausInfo[haus+1][haus_msg],result,0,strlen(result),150);
HausLabel[haus+1] = Create3DTextLabel("LOAD",HAUSCOLOR,HausInfo[haus+1][haus_x],HausInfo[haus+1][haus_y],HausInfo[haus+1][haus_z] +1,20.0,0,1);
if(HausInfo[haus+1][haus_Owned] == 1)
{
HausInfo[haus+1][haus_pickup] = CreatePickup(OWNEDHAUSPICKUP,1,HausInfo[haus+1][haus_x],HausInfo[haus+1][haus_y],HausInfo[haus+1][haus_z],0);
mysql_function_query(MySqlConnection,"SELECT * FROM "#SERVERTAG"_account_main WHERE",true,"OnQueryFinish","siii","SELECT * FROM "#SERVERTAG"_account_main WHERE",_SQL_HAUSTIME_CHECK,haus+1,MySqlConnection);
}
else if(HausInfo[haus+1][haus_Owned] == 0)
{
HausInfo[haus+1][haus_pickup] = CreatePickup(NOTOWNEDHAUSPICKUP,1,HausInfo[haus+1][haus_x],HausInfo[haus+1][haus_y],HausInfo[haus+1][haus_z],0);
}
UpdateHausLabel(haus+1,HausInfo[haus+1][haus_Owned]+1);//funktion 1 wenn das haus ohne besitzer ist,funktion 2 wenn das biz mit besitzer ist
haus++;
}
}
printf("- Häuser geladen %i/%i -",rows,MAX_HAUS);
print("- Aktivität der Hausbesitzer kontrolliert -");
habich da was vergessen??
finde nichts mehr, würde mich nach hilfe freuen.