Create Vehicle
#1

hi all , some1 can help me to create from database the vehicles please ? i created this stock :

Код:
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;
}
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
Reply


Messages In This Thread
Create Vehicle - by Ph0eniX - 08.04.2014, 15:17
Re: Create Vehicle - by Micheal123 - 08.04.2014, 15:21
Re: Create Vehicle - by Ph0eniX - 08.04.2014, 15:23
Re: Create Vehicle - by Micheal123 - 08.04.2014, 15:29
Re: Create Vehicle - by UnknownOwner - 08.04.2014, 15:50
Re: Create Vehicle - by Ph0eniX - 08.04.2014, 15:57
Re: Create Vehicle - by azzerking - 08.04.2014, 16:01
Re: Create Vehicle - by SickAttack - 08.04.2014, 16:07
Re: Create Vehicle - by UnknownOwner - 08.04.2014, 16:30
Re: Create Vehicle - by AhmedMohamed - 08.04.2014, 16:34

Forum Jump:


Users browsing this thread: 3 Guest(s)