Jump to content

Question

Posted

Salut, cum pot obtine coordonate diferite din baza de date ( mysql r8) pentru a spawna niste masini? ma refer la acel query SELECT * FROM ....

ceva in genul cum e la player, atunci cand il selectezi din baza de date sa ii dai banii. Dar acum vreau sa setez coods pentru fiecare masina in parte. Daca cineva stie cum se face, va rog sa imi spuneti. Sanatate

1 answer to this question

Recommended Posts

Posted

forward LoadCar(vehicleid);

public LoadCar(vehicleid)

{

new query[128];

format(query, sizeof(query), "SELECT * FROM `cars` WHERE `id` = '%d' LIMIT 1", vehicleid);

mysql_function_query(v_Handle, query, true, "OnVehicleCheck", "d", vehicleid);

}

forward OnVehicleCheck(vehicleid);

public OnVehicleCheck(vehicleid)

{

new rows, fields;

cache_get_data(rows, fields, v_Handle);

if(rows)

{

OnLoadCars(vehicleid);

}

}

forward OnLoadCars(vehid);

public OnLoadCars(vehid)

{

VehInfo[vehid][spawnx]          = cache_get_row_float(0, 1, v_Handle);

VehInfo[vehid][spawny]          = cache_get_row_float(0, 2, v_Handle);

VehInfo[vehid][spawnz]          = cache_get_row_float(0, 3, v_Handle);

VehInfo[vehid][spawna]          = cache_get_row_float(0, 4, v_Handle);

return 1;

}

Acesta este un exemplu

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.