08.04.2014, 15:17
hi all , some1 can help me to create from database the vehicles please ? i created this stock :
but ... i want to create the cars...like name of car owner... like that Ph0eniX = CreateVehicle...
i want to create like that becouse i want to make private car system...pls help me
PS:Srry for my bad englesh
Код:
stock CreateVehicles() { new CQuery[200]; //-------------------------------------------------------------------------- format(CQuery, sizeof(CQuery), "SELECT * FROM `Cars` ORDER BY `ID` DESC LIMIT 15"); Result = db_query(Database, CQuery); //-------------------------------------------------------------------------- for(new i; i < db_num_rows(Result); i++) { new string[30], string1[30], string2[30], string3[30], string4[30], string5[30], string6[30]; //---------------------------------------------------------------------- db_get_field_assoc(Result, "CarOwner", string, 30); db_get_field_assoc(Result, "CarID", string1, 30); db_get_field_assoc(Result, "CarPosX", string2, 30); db_get_field_assoc(Result, "CarPosY", string3, 30); db_get_field_assoc(Result, "CarPosZ", string4, 30); db_get_field_assoc(Result, "color1", string5, 30); db_get_field_assoc(Result, "color2", string6, 30); //---------------------------------------------------------------------- **** = CreateVehicle(string1,string2,string3,string4,0.0,string5,strin6,-1); //---------------------------------------------------------------------- db_next_row(Result); } db_free_result(Result); return 1; }
i want to create like that becouse i want to make private car system...pls help me

PS:Srry for my bad englesh