Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum tInfo
- {
- tID,
- tPosX,
- tPosY,
- tPosZ,
- tName[128],
- tSkill,
- tTime
- };
- new TruckInfo[MAX_TRUCK_POS][tInfo];
- new truckss = 0;
- function init_truck() {
- mysql_pquery(SQL, "SELECT * FROM `truck`;", "loadTruck", "");
- }
- function loadTruck()
- {
- truckss = cache_num_rows();
- for(new i = 1; i <= truckss; i++)
- {
- new t = i - 1;
- TruckInfo[i][tID] = cache_get_field_content_int(t, "LocationID");
- TruckInfo[i][tPosX] = cache_get_field_content_int(t, "LocationX");
- TruckInfo[i][tPosY] = cache_get_field_content_int(t, "LocationY");
- TruckInfo[i][tPosZ] = cache_get_field_content_int(t, "LocationZ");
- cache_get_field_content(t, "LocationName", TruckInfo[i][tName], SQL, 130);
- TruckInfo[i][tSkill] = cache_get_field_content_int(t, "LocationSkill");
- TruckInfo[i][tTime] = cache_get_field_content_int(t, "LocationTime");
- }
- printf("[LOADING] %d trucks locations.",truckss);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement