Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public LoadCar(playerid)
- {
- for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
- {
- PlayerInfo[playerid][pCarModel][idd] = 0;
- PlayerInfo[playerid][pCarLocX][idd] = 0.0;
- PlayerInfo[playerid][pCarLocY][idd] = 0.0;
- PlayerInfo[playerid][pCarLocZ][idd] = 0.0;
- PlayerInfo[playerid][pCarAngle][idd] = 0.0;
- PlayerInfo[playerid][pCarLLocX][idd] = 0.0;
- PlayerInfo[playerid][pCarLLocY][idd] = 0.0;
- PlayerInfo[playerid][pCarLLocZ][idd] = 0.0;
- PlayerInfo[playerid][pCarAngle2][idd] = 0.0;
- PlayerInfo[playerid][pCarBuyTime][idd] = 0;
- PlayerInfo[playerid][pCarColor1][idd] = 1;
- PlayerInfo[playerid][pCarColor2][idd] = 1;
- PlayerInfo[playerid][pCarLock][idd] = 0;
- PlayerInfo[playerid][pCarInsPrice][idd] = 0;
- PlayerInfo[playerid][pCarIns][idd] = 0;
- PlayerInfo[playerid][pCarKM][idd] = 0.0;
- PlayerInfo[playerid][pCarKMLast][idd] = 0;
- PlayerInfo[playerid][pCarVIP][idd] = 0;
- PlayerInfo[playerid][pCarVipColors][idd] = 0;
- PlayerInfo[playerid][pCarHP][idd] = 0.0;
- PlayerInfo[playerid][pCarDamage1][idd] = 0;
- PlayerInfo[playerid][pCarDamage2][idd] = 0;
- PlayerInfo[playerid][pCarDamage3][idd] = 0;
- PlayerInfo[playerid][pCarDamage4][idd] = 0;
- PlayerInfo[playerid][pCarGas][idd] = 100;
- PlayerInfo[playerid][pCarPaintJ][idd] = 6;
- PlayerInfo[playerid][pCarBlock][idd] = 0;
- CarVipName[playerid][idd] = "";
- CarPlate[playerid][idd] = "";
- CarOwner[playerid][idd] = "";
- for(new s; s < 17; s++)
- {
- CarMod[playerid][idd][s] = 0;
- }
- }
- new query[256],string[20];
- for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
- {
- format(query, sizeof(query), "SELECT * FROM `cars` WHERE `ID`='%d'", PlayerInfo[playerid][pCar][idd]);
- new Cache: result = mysql_query(SQL, query);
- if(cache_get_row_count() > 0)
- {
- PlayerInfo[playerid][pCarModel][idd] = cache_get_field_content_int(0, "Model");
- PlayerInfo[playerid][pCarLocX][idd] = cache_get_field_content_float(0, "Locationx");
- PlayerInfo[playerid][pCarLocY][idd] = cache_get_field_content_float(0, "Locationy");
- PlayerInfo[playerid][pCarLocZ][idd] = cache_get_field_content_float(0, "Locationz");
- PlayerInfo[playerid][pCarAngle][idd] = cache_get_field_content_float(0, "Angle");
- PlayerInfo[playerid][pCarLLocX][idd] = cache_get_field_content_float(0, "Locationx2");
- PlayerInfo[playerid][pCarLLocY][idd] = cache_get_field_content_float(0, "Locationy2");
- PlayerInfo[playerid][pCarLLocZ][idd] = cache_get_field_content_float(0, "Locationz2");
- PlayerInfo[playerid][pCarAngle2][idd] = cache_get_field_content_float(0, "Angle2");
- PlayerInfo[playerid][pCarBuyTime][idd] = cache_get_field_content_int(0, "BuyTime");
- PlayerInfo[playerid][pCarColor1][idd] = cache_get_field_content_int(0, "ColorOne");
- PlayerInfo[playerid][pCarColor2][idd] = cache_get_field_content_int(0, "ColorTwo");
- PlayerInfo[playerid][pCarLock][idd] = cache_get_field_content_int(0, "Lockk");
- PlayerInfo[playerid][pCarInsPrice][idd] = cache_get_field_content_int(0, "Inscarprice");
- PlayerInfo[playerid][pCarIns][idd] = cache_get_field_content_int(0, "Insurancecar");
- PlayerInfo[playerid][pCarKM][idd] = cache_get_field_content_float(0, "KM");
- PlayerInfo[playerid][pCarKMLast][idd] = cache_get_field_content_int(0, "LastKM");
- PlayerInfo[playerid][pCarVIP][idd] = cache_get_field_content_int(0, "VIP");
- PlayerInfo[playerid][pCarVipColors][idd] = cache_get_field_content_int(0, "VipColors");
- PlayerInfo[playerid][pCarHP][idd] = cache_get_field_content_float(0, "HP");
- PlayerInfo[playerid][pCarDamage1][idd] = cache_get_field_content_int(0, "Damage1");
- PlayerInfo[playerid][pCarDamage2][idd] = cache_get_field_content_int(0, "Damage2");
- PlayerInfo[playerid][pCarDamage3][idd] = cache_get_field_content_int(0, "Damage3");
- PlayerInfo[playerid][pCarDamage4][idd] = cache_get_field_content_int(0, "Damage4");
- PlayerInfo[playerid][pCarGas][idd] = cache_get_field_content_int(0, "Gas");
- PlayerInfo[playerid][pCarPaintJ][idd] = cache_get_field_content_int(0, "PaintJ");
- PlayerInfo[playerid][pCarBlock][idd] = cache_get_field_content_int(0, "Block");
- cache_get_field_content(0, "VipText", CarVipName[playerid][idd]);
- cache_get_field_content(0, "License", CarPlate[playerid][idd], SQL, 30);
- cache_get_field_content(0, "Owner", CarOwner[playerid][idd], SQL, 50);
- for(new s=1; s <= 17; s++)
- {
- format(string,sizeof(string),"mod%d",s);
- new ids = s-1;
- CarMod[playerid][idd][ids] = cache_get_field_content_int(0, string);
- }
- }
- cache_delete(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement