Jump to content

CosminAK47

Membru
  • Posts

    371
  • Joined

  • Last visited

  • Days Won

    16

Posts posted by CosminAK47

  1. Acum 10 ore, TheRive a spus:

    Vreau sa creez un tabel in baza de date pentru niste apartamente , am incercat dar nu a functionat.

    Daca ma puteti ajuta.

     

    
    function load_apartaments() {
    	new
    	    x,
    	    result[32],
    	    apartaments,
    		Cache: db = mysql_query(SQL, "SELECT * FROM `apartaments` ORDER BY `apartaments`.`ID` ASC");
    
     	for(new i, j = cache_get_row_count (); i != j; ++i) {
           	cache_get_field_content(i, "ID", result); 			x = strval(result);
    		cache_get_field_content(i, "X", result); 			apartamentInfo[x][apPos][0] = floatstr(result);
    		cache_get_field_content(i, "Y", result); 			apartamentInfo[x][apPos][1] = floatstr(result);
    		cache_get_field_content(i, "Z", result); 			apartamentInfo[x][apPos][2] = floatstr(result);
    		cache_get_field_content(i, "Angle", result); 		apartamentInfo[x][apPos][3] = floatstr(result);
            cache_get_field_content(i, "UserID", result); 		apartamentInfo[x][apUser] = strval(result);
            cache_get_field_content(i, "Value", result); 		apartamentInfo[x][apValue] = strval(result);
            cache_get_field_content(i, "Lock", result); 		apartamentInfo[x][apLock] = strval(result);
            
            cache_get_field_content(i, "Owner", result); 		format(apartamentInfo[x][apOwner], 32, result);
            apartaments ++;
            
            apartamentInfo[x][apLabel] = CreateDynamic3DTextLabel("", -1, apartamentInfo[x][apPos][0], apartamentInfo[x][apPos][1], apartamentInfo[x][apPos][2], 25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0);
            refresh_label(x);
    	}
    	cache_delete(db);
    
    
        CreateDynamicMapIcon(apartamentInfo[0][apPos][0], apartamentInfo[0][apPos][1], apartamentInfo[0][apPos][2],31,0,0,0,-1,500.0);    
       	CreateDynamicMapIcon(apartamentInfo[1][apPos][0], apartamentInfo[1][apPos][1], apartamentInfo[1][apPos][2],31,0,0,0,-1,500.0);    
    
            
    	for(new i = 0; i < 24; i++)
    		apartament_door_status[i] = 0;

     

    tabel-ul cu tot cu apartamente

    apartaments.sql

  2. Salut, am facut un fel de sistem de cersetori, dar cand creez cersetorul se salveaza coordonatele in baza de date corect unde ar fi trebuit sa stea , dar daca dau restart la srv dispare dar in baza raman coordonatele.

    Aceata este comanda, poate nu am facut eu ceva corect

    YCMD:createcersetor(playerid, params[], help) {
        if(PlayerInfo[playerid][pAdmin] >= 6) {
        GetPlayerPos(playerid, pcersetor[0], pcersetor[1], pcersetor[2]);
        cersetor = CreateActor(200, pcersetor[0], pcersetor[1], pcersetor[2], 0.0);
        new  query[256];
        format(query, sizeof(query), "INSERT INTO `cersetor` (`cersetorX`, `cersetorY`, `cersetorZ`) VALUES ('%f', '%f', '%f')", pcersetor[0], pcersetor[1], pcersetor[2]);
        mysql_tquery(SQL, query, "", "");
        ApplyActorAnimation(cersetor, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
        CreatePlayer3DTextLabel(playerid,"{FFFFFF}Press {FF0000}Y{FFFFFF} to help this beggar",0x008080FF,pcersetor[0], pcersetor[1], pcersetor[2],10.0);
        SetPlayerPos(playerid, pcersetor[0], pcersetor[1], pcersetor[2]);
        }
        else return SCM(playerid, -1, AdminOnly);
        return 1;
    }

  3. Acum 21 minute, xDaniX a spus:

    Cum rezolv bugul cand dau /buycar ai ecranu negru am facut sistemu de la zero si tot negru e ce pot face??

    daca il faceai de la 0 nu mai aparea acel bug, tre sa schimbii coordonatele din comanda /buycar

  4. Acum 1 oră, MyhayADV a spus:

    Baietiiii luati o gura de apa ca asta nu e versiunea aia noua, versiunea asta are peste 30 buguri. Pe cea noua o am doar eu si cativa baietasi.

    Scrie clar in titlu ce e prima versiune(v1), asa ca nu mai comenta să te afli și tu în treaba

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.