Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:reloadfactioncars(playerid, params[]) {
- mysql_format(SQL, SQLStringg, sizeof(SQLStringg), "SELECT * FROM `faction`");
- new Cache: facc = mysql_query(SQL, SQLStringg);
- for(new faccc=1; faccc<=cache_get_row_count(); faccc++) {
- cache_delete(facc);
- mysql_format(SQL, SQLStringg2, sizeof(SQLStringg2), "SELECT * FROM `faction_cars` WHERE `Faction`='%d'", faccc);
- new Cache: MASINI = mysql_query(SQL, SQLStringg2);
- for(new car=1; car<=cache_get_row_count(); car++) {
- if(cache_get_row_count() < 1) return SCM(playerid, COLOR_WHITE, "Nu exista masini pentru aceasta factiune.");
- if(FactionCar[faccc][car] != 0) DestroyVehicle(FactionCar[faccc][car]);
- new strcarplate[512];
- format(strcarplate, sizeof(strcarplate), "{%s}%s %d", cache_get_field_content_int(faccc, "ColorPickup2"), cache_get_field_content_int(faccc, "Name2"), car);
- FactionCar[faccc][car] = AddStaticVehicleEx(cache_get_field_content_int(car, "Model"), cache_get_field_content_float(car, "LocX"), cache_get_field_content_int(car, "LocY"), cache_get_field_content_float(car, "LocZ"), cache_get_field_content_float(car, "Angle"), cache_get_field_content_int(car, "Color1"), cache_get_field_content_int(car, "Color2"), -1, cache_get_field_content_int(car, "Siren"));
- SetVehicleNumberPlate(FactionCar[faccc][car], strcarplate);
- }
- cache_delete(MASINI);
- }
- format(PString, sizeof(PString), "%s a reincarcat masinile tuturor factiunilor.", GetName(playerid));
- ABroadCast(COLOR_WHITE, PString, 1);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement